From 9280f62e38fad0a5a8737f43c5028e7981a00bbc Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Tue, 8 Nov 2016 14:27:26 +0800 Subject: [PATCH] MDL-56196 mod_lti: Fix popups and secret form in boost --- .../moodle-core-notification-alert-debug.js | 4 ++-- .../moodle-core-notification-alert-min.js | 2 +- .../moodle-core-notification-alert.js | 4 ++-- .../moodle-core-notification-confirm-debug.js | 6 +++--- .../moodle-core-notification-confirm-min.js | 2 +- .../moodle-core-notification-confirm.js | 6 +++--- lib/yui/src/notification/js/alert.js | 4 ++-- lib/yui/src/notification/js/confirm.js | 6 +++--- .../templates/cartridge_registration_form.mustache | 6 +++--- theme/boost/scss/moodle/core.scss | 12 ------------ 10 files changed, 20 insertions(+), 32 deletions(-) diff --git a/lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert-debug.js b/lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert-debug.js index d6ff0a905c4..46234329300 100644 --- a/lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert-debug.js +++ b/lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert-debug.js @@ -64,11 +64,11 @@ Y.extend(ALERT, M.core.notification.info, { initializer: function() { this._closeEvents = []; this.publish('complete'); - var yes = Y.Node.create(''), content = Y.Node.create('
') .append(Y.Node.create('
' + this.get('message') + '
')) - .append(Y.Node.create('
') + .append(Y.Node.create('
') .append(yes)); this.get(BASE).addClass('moodle-dialogue-confirm'); this.setStdModContent(Y.WidgetStdMod.BODY, content, Y.WidgetStdMod.REPLACE); diff --git a/lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert-min.js b/lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert-min.js index b437acc9e31..abc86e2b16e 100644 --- a/lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert-min.js +++ b/lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert-min.js @@ -1 +1 @@ -YUI.add("moodle-core-notification-alert",function(e,t){var n,r,i,s,o,u,a;n="moodle-dialogue",r="notificationBase",i="yesLabel",s="noLabel",o="title",u="question",a={BASE:"moodle-dialogue-base",WRAP:"moodle-dialogue-wrap",HEADER:"moodle-dialogue-hd",BODY:"moodle-dialogue-bd",CONTENT:"moodle-dialogue-content",FOOTER:"moodle-dialogue-ft",HIDDEN:"hidden",LIGHTBOX:"moodle-dialogue-lightbox"},M.core=M.core||{};var f="Moodle alert",l;l=function(e){e.closeButton=!1,l.superclass.constructor.apply(this,[e])},e.extend(l,M.core.notification.info,{_closeEvents:null,initializer:function(){this._closeEvents=[],this.publish("complete");var t=e.Node.create(''),n=e.Node.create('
').append(e.Node.create('
'+this.get("message")+"
")).append(e.Node.create('
').append(t));this.get(r).addClass("moodle-dialogue-confirm"),this.setStdModContent(e.WidgetStdMod.BODY,n,e.WidgetStdMod.REPLACE),this.setStdModContent(e.WidgetStdMod.HEADER,'

'+this.get(o)+"

",e.WidgetStdMod.REPLACE),this._closeEvents.push(e.on("key",this.submit,window,"down:13",this),t.on("click",this.submit,this));var s=this.get("boundingBox").one(".closebutton");s&&this._closeEvents.push(s.on("click",this.submit,this))},submit:function(){(new e.EventHandle(this._closeEvents)).detach(),this.fire("complete"),this.hide(),this.destroy()}},{NAME:f,CSS_PREFIX:n,ATTRS:{title:{validator:e.Lang.isString,value:"Alert"},message:{validator:e.Lang.isString,value:"Confirm"},yesLabel:{validator:e.Lang.isString,setter:function(e){return e||(e="Ok"),e},value:"Ok"}}}),M.core.alert=l},"@VERSION@",{requires:["moodle-core-notification-dialogue"]}); +YUI.add("moodle-core-notification-alert",function(e,t){var n,r,i,s,o,u,a;n="moodle-dialogue",r="notificationBase",i="yesLabel",s="noLabel",o="title",u="question",a={BASE:"moodle-dialogue-base",WRAP:"moodle-dialogue-wrap",HEADER:"moodle-dialogue-hd",BODY:"moodle-dialogue-bd",CONTENT:"moodle-dialogue-content",FOOTER:"moodle-dialogue-ft",HIDDEN:"hidden",LIGHTBOX:"moodle-dialogue-lightbox"},M.core=M.core||{};var f="Moodle alert",l;l=function(e){e.closeButton=!1,l.superclass.constructor.apply(this,[e])},e.extend(l,M.core.notification.info,{_closeEvents:null,initializer:function(){this._closeEvents=[],this.publish("complete");var t=e.Node.create(''),n=e.Node.create('
').append(e.Node.create('
'+this.get("message")+"
")).append(e.Node.create('
').append(t));this.get(r).addClass("moodle-dialogue-confirm"),this.setStdModContent(e.WidgetStdMod.BODY,n,e.WidgetStdMod.REPLACE),this.setStdModContent(e.WidgetStdMod.HEADER,'

'+this.get(o)+"

",e.WidgetStdMod.REPLACE),this._closeEvents.push(e.on("key",this.submit,window,"down:13",this),t.on("click",this.submit,this));var s=this.get("boundingBox").one(".closebutton");s&&this._closeEvents.push(s.on("click",this.submit,this))},submit:function(){(new e.EventHandle(this._closeEvents)).detach(),this.fire("complete"),this.hide(),this.destroy()}},{NAME:f,CSS_PREFIX:n,ATTRS:{title:{validator:e.Lang.isString,value:"Alert"},message:{validator:e.Lang.isString,value:"Confirm"},yesLabel:{validator:e.Lang.isString,setter:function(e){return e||(e="Ok"),e},value:"Ok"}}}),M.core.alert=l},"@VERSION@",{requires:["moodle-core-notification-dialogue"]}); diff --git a/lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert.js b/lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert.js index d6ff0a905c4..46234329300 100644 --- a/lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert.js +++ b/lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert.js @@ -64,11 +64,11 @@ Y.extend(ALERT, M.core.notification.info, { initializer: function() { this._closeEvents = []; this.publish('complete'); - var yes = Y.Node.create(''), content = Y.Node.create('
') .append(Y.Node.create('
' + this.get('message') + '
')) - .append(Y.Node.create('
') + .append(Y.Node.create('
') .append(yes)); this.get(BASE).addClass('moodle-dialogue-confirm'); this.setStdModContent(Y.WidgetStdMod.BODY, content, Y.WidgetStdMod.REPLACE); diff --git a/lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm-debug.js b/lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm-debug.js index d4170ba3716..d8ec0126123 100644 --- a/lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm-debug.js +++ b/lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm-debug.js @@ -93,14 +93,14 @@ Y.extend(CONFIRM, M.core.notification.info, { this.publish('complete'); this.publish('complete-yes'); this.publish('complete-no'); - this._yesButton = Y.Node.create(''); - this._noButton = Y.Node.create(''); this._question = Y.Node.create('
' + this.get(QUESTION) + '
'); var content = Y.Node.create('
') .append(this._question) - .append(Y.Node.create('
') + .append(Y.Node.create('
') .append(this._yesButton) .append(this._noButton)); this.get(BASE).addClass('moodle-dialogue-confirm'); diff --git a/lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm-min.js b/lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm-min.js index ee9b63b2601..07e6c82157f 100644 --- a/lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm-min.js +++ b/lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm-min.js @@ -1 +1 @@ -YUI.add("moodle-core-notification-confirm",function(e,t){var n,r,i,s,o,u,a;n="moodle-dialogue",r="notificationBase",i="yesLabel",s="noLabel",o="title",u="question",a={BASE:"moodle-dialogue-base",WRAP:"moodle-dialogue-wrap",HEADER:"moodle-dialogue-hd",BODY:"moodle-dialogue-bd",CONTENT:"moodle-dialogue-content",FOOTER:"moodle-dialogue-ft",HIDDEN:"hidden",LIGHTBOX:"moodle-dialogue-lightbox"},M.core=M.core||{};var f="Moodle confirmation dialogue",l;l=function(e){l.superclass.constructor.apply(this,[e])},e.extend(l,M.core.notification.info,{_closeEvents:null,_yesButton:null,_noButton:null,_question:null,initializer:function(){this._closeEvents=[],this.publish("complete"),this.publish("complete-yes"),this.publish("complete-no"),this._yesButton=e.Node.create(''),this._noButton=e.Node.create(''),this._question=e.Node.create('
'+this.get(u)+"
");var t=e.Node.create('
').append(this._question).append(e.Node.create('
').append(this._yesButton).append(this._noButton));this.get(r).addClass("moodle-dialogue-confirm"),this.setStdModContent(e.WidgetStdMod.BODY,t,e.WidgetStdMod.REPLACE),this.setStdModContent(e.WidgetStdMod.HEADER,'

'+this.get(o)+"

",e.WidgetStdMod.REPLACE),this._closeEvents.push(e.on("key",this.submit,window,"down:27",this,!1),this._yesButton.on("click",this.submit,this,!0),this._noButton.on("click",this.submit,this,!1));var n=this.get("boundingBox").one(".closebutton");n&&this._closeEvents.push(n.on("click",this.submit,this))},submit:function(t,n){(new e.EventHandle(this._closeEvents)).detach(),this.fire("complete",n),n?this.fire("complete-yes"):this.fire("complete-no"),this.hide(),this.destroy()}},{NAME:f,CSS_PREFIX:n,ATTRS:{yesLabel:{validator:e.Lang.isString,valueFn:function(){return M.util.get_string("yes","moodle")},setter:function(e){return this._yesButton&&this._yesButton.set("value",e),e}},noLabel:{validator:e.Lang.isString,valueFn:function(){return M.util.get_string("no","moodle")},setter:function(e){return this._noButton&&this._noButton.set("value",e),e}},title:{validator:e.Lang.isString,value:M.util.get_string("confirm","moodle")},question:{validator:e.Lang.isString,valueFn:function(){return M.util.get_string("areyousure","moodle")},setter:function(e){return this._question&&this._question.set("value",e),e}}}}),e.augment(l,e.EventTarget),M.core.confirm=l},"@VERSION@",{requires:["moodle-core-notification-dialogue"]}); +YUI.add("moodle-core-notification-confirm",function(e,t){var n,r,i,s,o,u,a;n="moodle-dialogue",r="notificationBase",i="yesLabel",s="noLabel",o="title",u="question",a={BASE:"moodle-dialogue-base",WRAP:"moodle-dialogue-wrap",HEADER:"moodle-dialogue-hd",BODY:"moodle-dialogue-bd",CONTENT:"moodle-dialogue-content",FOOTER:"moodle-dialogue-ft",HIDDEN:"hidden",LIGHTBOX:"moodle-dialogue-lightbox"},M.core=M.core||{};var f="Moodle confirmation dialogue",l;l=function(e){l.superclass.constructor.apply(this,[e])},e.extend(l,M.core.notification.info,{_closeEvents:null,_yesButton:null,_noButton:null,_question:null,initializer:function(){this._closeEvents=[],this.publish("complete"),this.publish("complete-yes"),this.publish("complete-no"),this._yesButton=e.Node.create(''),this._noButton=e.Node.create(''),this._question=e.Node.create('
'+this.get(u)+"
");var t=e.Node.create('
').append(this._question).append(e.Node.create('
').append(this._yesButton).append(this._noButton));this.get(r).addClass("moodle-dialogue-confirm"),this.setStdModContent(e.WidgetStdMod.BODY,t,e.WidgetStdMod.REPLACE),this.setStdModContent(e.WidgetStdMod.HEADER,'

'+this.get(o)+"

",e.WidgetStdMod.REPLACE),this._closeEvents.push(e.on("key",this.submit,window,"down:27",this,!1),this._yesButton.on("click",this.submit,this,!0),this._noButton.on("click",this.submit,this,!1));var n=this.get("boundingBox").one(".closebutton");n&&this._closeEvents.push(n.on("click",this.submit,this))},submit:function(t,n){(new e.EventHandle(this._closeEvents)).detach(),this.fire("complete",n),n?this.fire("complete-yes"):this.fire("complete-no"),this.hide(),this.destroy()}},{NAME:f,CSS_PREFIX:n,ATTRS:{yesLabel:{validator:e.Lang.isString,valueFn:function(){return M.util.get_string("yes","moodle")},setter:function(e){return this._yesButton&&this._yesButton.set("value",e),e}},noLabel:{validator:e.Lang.isString,valueFn:function(){return M.util.get_string("no","moodle")},setter:function(e){return this._noButton&&this._noButton.set("value",e),e}},title:{validator:e.Lang.isString,value:M.util.get_string("confirm","moodle")},question:{validator:e.Lang.isString,valueFn:function(){return M.util.get_string("areyousure","moodle")},setter:function(e){return this._question&&this._question.set("value",e),e}}}}),e.augment(l,e.EventTarget),M.core.confirm=l},"@VERSION@",{requires:["moodle-core-notification-dialogue"]}); diff --git a/lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm.js b/lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm.js index d4170ba3716..d8ec0126123 100644 --- a/lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm.js +++ b/lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm.js @@ -93,14 +93,14 @@ Y.extend(CONFIRM, M.core.notification.info, { this.publish('complete'); this.publish('complete-yes'); this.publish('complete-no'); - this._yesButton = Y.Node.create(''); - this._noButton = Y.Node.create(''); this._question = Y.Node.create('
' + this.get(QUESTION) + '
'); var content = Y.Node.create('
') .append(this._question) - .append(Y.Node.create('
') + .append(Y.Node.create('
') .append(this._yesButton) .append(this._noButton)); this.get(BASE).addClass('moodle-dialogue-confirm'); diff --git a/lib/yui/src/notification/js/alert.js b/lib/yui/src/notification/js/alert.js index 637ef38bd87..bfe172eb7bf 100644 --- a/lib/yui/src/notification/js/alert.js +++ b/lib/yui/src/notification/js/alert.js @@ -34,11 +34,11 @@ Y.extend(ALERT, M.core.notification.info, { initializer: function() { this._closeEvents = []; this.publish('complete'); - var yes = Y.Node.create(''), content = Y.Node.create('
') .append(Y.Node.create('
' + this.get('message') + '
')) - .append(Y.Node.create('
') + .append(Y.Node.create('
') .append(yes)); this.get(BASE).addClass('moodle-dialogue-confirm'); this.setStdModContent(Y.WidgetStdMod.BODY, content, Y.WidgetStdMod.REPLACE); diff --git a/lib/yui/src/notification/js/confirm.js b/lib/yui/src/notification/js/confirm.js index edda4fbff9f..2bf74f36cb4 100644 --- a/lib/yui/src/notification/js/confirm.js +++ b/lib/yui/src/notification/js/confirm.js @@ -63,14 +63,14 @@ Y.extend(CONFIRM, M.core.notification.info, { this.publish('complete'); this.publish('complete-yes'); this.publish('complete-no'); - this._yesButton = Y.Node.create(''); - this._noButton = Y.Node.create(''); this._question = Y.Node.create('
' + this.get(QUESTION) + '
'); var content = Y.Node.create('
') .append(this._question) - .append(Y.Node.create('
') + .append(Y.Node.create('
') .append(this._yesButton) .append(this._noButton)); this.get(BASE).addClass('moodle-dialogue-confirm'); diff --git a/mod/lti/templates/cartridge_registration_form.mustache b/mod/lti/templates/cartridge_registration_form.mustache index ff884483f63..1f75a14bb79 100644 --- a/mod/lti/templates/cartridge_registration_form.mustache +++ b/mod/lti/templates/cartridge_registration_form.mustache @@ -52,7 +52,7 @@
@@ -66,12 +66,12 @@
-
+