mirror of
https://github.com/moodle/moodle.git
synced 2025-07-26 00:31:35 +02:00
* Update component library for new features of single_button and modal * Update core_notification javascript
10 lines
1.3 KiB
JavaScript
10 lines
1.3 KiB
JavaScript
define("core/modal_delete_cancel",["exports","core/modal","core/notification"],(function(_exports,_modal,_notification){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}
|
|
/**
|
|
* Contain the logic for the delete/cancel modal.
|
|
*
|
|
* @module core/modal_delete_cancel
|
|
* @copyright 2022 Laurent David <laurent.david@moodle.com>
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
*/Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_modal=_interopRequireDefault(_modal),_notification=_interopRequireDefault(_notification);class _default extends _modal.default{constructor(root){super(root),this.getFooter().find(this.getActionSelector("delete")).length||_notification.default.exception({message:"No delete button found"}),this.getFooter().find(this.getActionSelector("cancel")).length||_notification.default.exception({message:"No cancel button found"})}registerEventListeners(){super.registerEventListeners(),this.registerCloseOnDelete(),this.registerCloseOnCancel()}setFooter(){_notification.default.exception({message:"Can not change the footer of a delete cancel modal"})}setDeleteButtonText(value){return this.setButtonText("delete",value)}}return _exports.default=_default,_exports.default}));
|
|
|
|
//# sourceMappingURL=modal_delete_cancel.min.js.map
|