One Hat Cyber Team
Your IP :
216.73.216.182
Server IP :
203.175.9.166
Server :
Linux tanggamus.iixcp.rumahweb.net 5.14.0-427.28.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 2 03:44:10 EDT 2024 x86_64
Server Software :
LiteSpeed
PHP Version :
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
cite5577
/
www
/
lib
/
pkp
/
js
/
controllers
/
modal
/
View File Name :
WizardModalHandler.js
/** * @file js/controllers/modal/WizardModalHandler.js * * Copyright (c) 2014-2021 Simon Fraser University * Copyright (c) 2000-2021 John Willinsky * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. * * @class WizardModalHandler * @ingroup js_controllers_modal * * @brief A modal that contains a wizard and handles its events. */ (function($) { /** * @constructor * * @extends $.pkp.controllers.modal.AjaxModalHandler * * @param {jQueryObject} $handledElement The clickable element * the modal will be attached to. * @param {Object} options non-default Dialog options * to be passed into the dialog widget. * * Options are: * - all options documented for the AjaxModalHandler. */ $.pkp.controllers.modal.WizardModalHandler = function($handledElement, options) { this.parent($handledElement, options); // Subscribe the modal to wizard events. this.bind('wizardClose', this.wizardClose); this.bind('wizardCancel', this.wizardClose); }; $.pkp.classes.Helper.inherits($.pkp.controllers.modal.WizardModalHandler, $.pkp.controllers.modal.AjaxModalHandler); /** * Overridden version of the modal close button handler acting * as a wizard cancel button. * * @protected * @param {Object=} opt_callingElement The close button. * @param {Event=} opt_event The close button click event. * @param {boolean=} opt_closeWithoutCancel Set to true to immediately * close the modal. * @return {boolean} Should return false to stop event processing. */ $.pkp.controllers.modal.WizardModalHandler.prototype.modalClose = function(opt_callingElement, opt_event, opt_closeWithoutCancel) { if (opt_closeWithoutCancel) { this.parent('modalClose', opt_callingElement, opt_event); } else { // Trigger a cancel event on the wizard. var wizardCancelRequestedEvent = new $.Event('wizardCancelRequested'), $wizard; wizardCancelRequestedEvent.stopPropagation(); $wizard = this.getHtmlElement().children().first(); $wizard.trigger(wizardCancelRequestedEvent); // Only close the modal if the wizard didn't prevent this. if (!wizardCancelRequestedEvent.isDefaultPrevented()) { this.parent('modalClose', opt_callingElement, opt_event); } } return false; }; /** * Handle the wizard close event. * * @param {HTMLElement} wizardElement The calling * wizard. * @param {Event} event The triggered event. */ $.pkp.controllers.modal.WizardModalHandler.prototype.wizardClose = function(wizardElement, event) { this.modalClose(wizardElement, event, true); }; }(jQuery));