%PDF- %PDF-
Direktori : /home/vacivi36/ava/calendar/amd/build/ |
Current File : /home/vacivi36/ava/calendar/amd/build/modal_delete.min.js |
/** * Contain the logic for the delete modal. * * @module core_calendar/modal_delete * @copyright 2017 Andrew Nicols <andrew@nicols.co.uk> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core_calendar/modal_delete",["jquery","core/notification","core/custom_interaction_events","core/modal","core/modal_events","core/modal_registry","core_calendar/events"],(function($,Notification,CustomEvents,Modal,ModalEvents,ModalRegistry,CalendarEvents){var registered=!1,SELECTORS_DELETE_ONE_BUTTON='[data-action="deleteone"]',SELECTORS_DELETE_ALL_BUTTON='[data-action="deleteall"]',SELECTORS_CANCEL_BUTTON='[data-action="cancel"]',ModalDelete=function(root){Modal.call(this,root),this.setRemoveOnClose(!0)};return ModalDelete.TYPE="core_calendar-modal_delete",(ModalDelete.prototype=Object.create(Modal.prototype)).constructor=ModalDelete,ModalDelete.prototype.registerEventListeners=function(){Modal.prototype.registerEventListeners.call(this),this.getModal().on(CustomEvents.events.activate,SELECTORS_DELETE_ONE_BUTTON,function(e,data){var saveEvent=$.Event(ModalEvents.save);this.getRoot().trigger(saveEvent,this),saveEvent.isDefaultPrevented()||(this.hide(),data.originalEvent.preventDefault())}.bind(this)),this.getModal().on(CustomEvents.events.activate,SELECTORS_DELETE_ALL_BUTTON,function(e,data){var saveEvent=$.Event(CalendarEvents.deleteAll);this.getRoot().trigger(saveEvent,this),saveEvent.isDefaultPrevented()||(this.hide(),data.originalEvent.preventDefault())}.bind(this)),this.getModal().on(CustomEvents.events.activate,SELECTORS_CANCEL_BUTTON,function(e,data){var cancelEvent=$.Event(ModalEvents.cancel);this.getRoot().trigger(cancelEvent,this),cancelEvent.isDefaultPrevented()||(this.hide(),data.originalEvent.preventDefault())}.bind(this))},registered||(ModalRegistry.register(ModalDelete.TYPE,ModalDelete,"calendar/event_delete_modal"),registered=!0),ModalDelete})); //# sourceMappingURL=modal_delete.min.js.map