mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
Merge branch 'mdl-56831-master' of https://github.com/Dagefoerde/moodle
This commit is contained in:
commit
585ba846da
2 changed files with 11 additions and 9 deletions
2
mod/quiz/amd/build/preflightcheck.min.js
vendored
2
mod/quiz/amd/build/preflightcheck.min.js
vendored
|
@ -1 +1 @@
|
|||
define(["jquery","core/yui"],function(a,b){var c={confirmDialogue:null,init:function(a,d,e,f){var g=a;b.use("moodle-core-notification","moodle-core-formchangechecker","io-form",function(){b.one(e)&&(c.confirmDialogue=new M.core.dialogue({headerContent:d,bodyContent:b.one(e),draggable:!0,visible:!1,center:!0,modal:!0,width:null,extraClasses:["mod_quiz_preflight_popup"]}),b.one(a).on("click",c.displayDialogue),b.one("#id_cancel").on("click",c.hideDialogue),g=c.confirmDialogue.get("boundingBox").one('[name="submitbutton"]')),f&&b.one(g).on("click",c.launchQuizPopup,c,f)})},displayDialogue:function(a){a&&a.halt(),c.confirmDialogue.show()},hideDialogue:function(a){a&&a.halt(),c.confirmDialogue.hide(a)},launchQuizPopup:function(a,c){a.halt(),M.core_formchangechecker.reset_form_dirty_state();var d=a.target.ancestor("form");window.openpopup(a,{url:d.get("action")+"?"+b.IO.stringify(d).replace(/\bcancel=/,"x="),windowname:"quizpopup",options:c,fullscreen:!0})}};return c});
|
||||
define(["jquery","core/yui"],function(a,b){var c={confirmDialogue:null,init:function(a,d,e,f){var g=a;b.use("moodle-core-notification",function(){b.one(e)&&(c.confirmDialogue=new M.core.dialogue({headerContent:d,bodyContent:b.one(e),draggable:!0,visible:!1,center:!0,modal:!0,width:null,extraClasses:["mod_quiz_preflight_popup"]}),b.one(a).on("click",c.displayDialogue),b.one("#id_cancel").on("click",c.hideDialogue),g=c.confirmDialogue.get("boundingBox").one('[name="submitbutton"]')),f&&b.one(g).on("click",c.launchQuizPopup,c,f)})},displayDialogue:function(a){a&&a.halt(),c.confirmDialogue.show()},hideDialogue:function(a){a&&a.halt(),c.confirmDialogue.hide(a)},launchQuizPopup:function(a,c){a.halt(),b.use("moodle-core-formchangechecker","io-form",function(){M.core_formchangechecker.reset_form_dirty_state();var d=a.target.ancestor("form");window.openpopup(a,{url:d.get("action")+"?"+b.IO.stringify(d).replace(/\bcancel=/,"x="),windowname:"quizpopup",options:c,fullscreen:!0})})}};return c});
|
|
@ -45,7 +45,7 @@ define(['jquery', 'core/yui'], function($, Y) {
|
|||
init: function(startButton, confirmationTitle, confirmationForm, popupoptions) {
|
||||
var finalStartButton = startButton;
|
||||
|
||||
Y.use('moodle-core-notification', 'moodle-core-formchangechecker', 'io-form', function() {
|
||||
Y.use('moodle-core-notification', function() {
|
||||
if (Y.one(confirmationForm)) {
|
||||
t.confirmDialogue = new M.core.dialogue({
|
||||
headerContent: confirmationTitle,
|
||||
|
@ -99,13 +99,15 @@ define(['jquery', 'core/yui'], function($, Y) {
|
|||
*/
|
||||
launchQuizPopup: function(e, popupoptions) {
|
||||
e.halt();
|
||||
M.core_formchangechecker.reset_form_dirty_state();
|
||||
var form = e.target.ancestor('form');
|
||||
window.openpopup(e, {
|
||||
url: form.get('action') + '?' + Y.IO.stringify(form).replace(/\bcancel=/, 'x='),
|
||||
windowname: 'quizpopup',
|
||||
options: popupoptions,
|
||||
fullscreen: true,
|
||||
Y.use('moodle-core-formchangechecker', 'io-form', function() {
|
||||
M.core_formchangechecker.reset_form_dirty_state();
|
||||
var form = e.target.ancestor('form');
|
||||
window.openpopup(e, {
|
||||
url: form.get('action') + '?' + Y.IO.stringify(form).replace(/\bcancel=/, 'x='),
|
||||
windowname: 'quizpopup',
|
||||
options: popupoptions,
|
||||
fullscreen: true,
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue