mirror of
https://github.com/moodle/moodle.git
synced 2025-07-18 21:01:27 +02:00
3 lines
1.1 KiB
JavaScript
3 lines
1.1 KiB
JavaScript
define ("core/event",["jquery","core/yui"],function(a,b){return{Events:{FORM_FIELD_VALIDATION:"core_form-field-validation"},getLegacyEvents:function getLegacyEvents(){var c=a.Deferred();b.use("event","moodle-core-event",function(){c.resolve(window.M.core.event)});return c.promise()},notifyFilterContentUpdated:function notifyFilterContentUpdated(c){c=a(c);b.use("event","moodle-core-event",function(b){a(document).trigger(M.core.event.FILTER_CONTENT_UPDATED,[c]);var d=new b.NodeList(c.get());b.fire(M.core.event.FILTER_CONTENT_UPDATED,{nodes:d})})},notifyFormSubmitAjax:function notifyFormSubmitAjax(c,d){d=d||!1;b.use("event","moodle-core-event",function(b){if(d){window.skipClientValidation=!0}a(c).trigger(M.core.event.FORM_SUBMIT_AJAX);b.one(c).fire(M.core.event.FORM_SUBMIT_AJAX,{currentTarget:b.one(c)});if(d){window.skipClientValidation=!1}})},notifyEditorContentRestored:function notifyEditorContentRestored(){b.use("event","moodle-core-event",function(b){a(document).trigger(M.core.event.EDITOR_CONTENT_RESTORED);b.fire(M.core.event.EDITOR_CONTENT_RESTORED)})}}});
|
|
//# sourceMappingURL=event.min.js.map
|