mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 20:50:21 +01:00
MDL-54722 javascript: Add YUI depend wrapper to global event
This commit is contained in:
parent
a5ea5149b8
commit
05263307d7
2
blocks/navigation/amd/build/navblock.min.js
vendored
2
blocks/navigation/amd/build/navblock.min.js
vendored
@ -1 +1 @@
|
|||||||
define(["jquery","core/tree"],function(a,b){return{init:function(a){var c=new b(".block_navigation .block_tree");c.finishExpandingGroup=function(c){b.prototype.finishExpandingGroup.call(this,c),Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED,{instanceid:a})},c.collapseGroup=function(c){b.prototype.collapseGroup.call(this,c),Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED,{instanceid:a})}}}});
|
define(["jquery","core/tree"],function(a,b){return{init:function(a){var c=new b(".block_navigation .block_tree");c.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})})},c.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})})}}}});
|
@ -27,15 +27,19 @@ define(['jquery', 'core/tree'], function($, Tree) {
|
|||||||
var navTree = new Tree(".block_navigation .block_tree");
|
var navTree = new Tree(".block_navigation .block_tree");
|
||||||
navTree.finishExpandingGroup = function(item) {
|
navTree.finishExpandingGroup = function(item) {
|
||||||
Tree.prototype.finishExpandingGroup.call(this, item);
|
Tree.prototype.finishExpandingGroup.call(this, item);
|
||||||
|
Y.use('moodle-core-event', function() {
|
||||||
Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {
|
Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {
|
||||||
instanceid: instanceid
|
instanceid: instanceid
|
||||||
});
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
navTree.collapseGroup = function(item) {
|
navTree.collapseGroup = function(item) {
|
||||||
Tree.prototype.collapseGroup.call(this, item);
|
Tree.prototype.collapseGroup.call(this, item);
|
||||||
|
Y.use('moodle-core-event', function() {
|
||||||
Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {
|
Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {
|
||||||
instanceid: instanceid
|
instanceid: instanceid
|
||||||
});
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -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.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})}}}});
|
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})})}}}});
|
@ -32,15 +32,22 @@ define(['jquery', 'core/tree'], function($, Tree) {
|
|||||||
}
|
}
|
||||||
adminTree.finishExpandingGroup = function(item) {
|
adminTree.finishExpandingGroup = function(item) {
|
||||||
Tree.prototype.finishExpandingGroup.call(this, item);
|
Tree.prototype.finishExpandingGroup.call(this, item);
|
||||||
|
Y.use('moodle-core-event', function() {
|
||||||
Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {
|
Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {
|
||||||
instanceid: instanceid
|
instanceid: instanceid
|
||||||
});
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
adminTree.collapseGroup = function(item) {
|
adminTree.collapseGroup = function(item) {
|
||||||
Tree.prototype.collapseGroup.call(this, item);
|
Tree.prototype.collapseGroup.call(this, item);
|
||||||
Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {
|
Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {
|
||||||
instanceid: instanceid
|
instanceid: instanceid
|
||||||
});
|
});
|
||||||
|
Y.use('moodle-core-event', function() {
|
||||||
|
Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {
|
||||||
|
instanceid: instanceid
|
||||||
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user