MDL-56052 block_settings: race condition
YUI events module must be loaded before global events can be used.
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
define(["jquery","core/tree"],function(a,b){return{init:function(a,c){var d=new b(".block_settings .block_tree");if(c){var e=d.treeRoot.find("#"+c),f=e.children("a").first();f.replaceWith('<span tabindex="0">'+f.html()+"</span>")}d.finishExpandingGroup=function(c){b.prototype.finishExpandingGroup.call(this,c),Y.use("moodle-core-event",function(){Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED,{instanceid:a})})},d.collapseGroup=function(c){b.prototype.collapseGroup.call(this,c),Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED,{instanceid:a}),Y.use("moodle-core-event",function(){Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED,{instanceid:a})})}}}});
|
||||
define(["jquery","core/tree"],function(a,b){return{init:function(a,c){var d=new b(".block_settings .block_tree");if(c){var e=d.treeRoot.find("#"+c),f=e.children("a").first();f.replaceWith('<span tabindex="0">'+f.html()+"</span>")}d.finishExpandingGroup=function(c){b.prototype.finishExpandingGroup.call(this,c),Y.use("moodle-core-event",function(){Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED,{instanceid:a})})},d.collapseGroup=function(c){b.prototype.collapseGroup.call(this,c),Y.use("moodle-core-event",function(){Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED,{instanceid:a})})}}}});
|
||||
@@ -40,9 +40,6 @@ define(['jquery', 'core/tree'], function($, Tree) {
|
||||
};
|
||||
adminTree.collapseGroup = function(item) {
|
||||
Tree.prototype.collapseGroup.call(this, item);
|
||||
Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {
|
||||
instanceid: instanceid
|
||||
});
|
||||
Y.use('moodle-core-event', function() {
|
||||
Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {
|
||||
instanceid: instanceid
|
||||
|
||||
Reference in New Issue
Block a user