Merge branch 'MDL-41986-master' of git://github.com/andrewnicols/moodle

This commit is contained in:
Dan Poltawski 2013-10-09 16:28:53 +08:00
commit bbe834a152
10 changed files with 42 additions and 38 deletions

View File

@ -89,17 +89,17 @@ M.core.dock.loader.delegationEvents = [];
* @method initLoader
*/
M.core.dock.loader.initLoader = function() {
Y.log('Dock loader initialising', 'note', LOADERNAME);
Y.log('Dock loader initialising', 'debug', LOADERNAME);
var dockedblocks = Y.all('.block[data-instanceid][data-dockable]'),
body = Y.one(document.body),
callback;
dockedblocks.each(function() {
var id = parseInt(this.getData('instanceid'), 10);
Y.log('Dock loader watching block with instance id: '+id, 'note', LOADERNAME);
Y.log('Dock loader watching block with instance id: '+id, 'debug', LOADERNAME);
M.core.dock.ensureMoveToIconExists(this);
});
if (dockedblocks.some(function(node){return node.hasClass('dock_on_load');})) {
Y.log('Loading dock module', 'note', LOADERNAME);
Y.log('Loading dock module', 'debug', LOADERNAME);
Y.use('moodle-core-dock', function() {
M.core.dock.init();
});
@ -115,7 +115,7 @@ M.core.dock.loader.initLoader = function() {
}
}
block.addClass('dock_on_load');
Y.log('Loading dock module', 'note', LOADERNAME);
Y.log('Loading dock module', 'debug', LOADERNAME);
Y.use('moodle-core-dock', function(){
M.util.set_user_preference('docked_block_instance_'+instanceid, 1);
M.core.dock.init();
@ -126,4 +126,5 @@ M.core.dock.loader.initLoader = function() {
}
};
}, '@VERSION@', {"requires": ["escape"]});

View File

@ -122,4 +122,5 @@ M.core.dock.loader.initLoader = function() {
}
};
}, '@VERSION@', {"requires": ["escape"]});

View File

@ -331,7 +331,7 @@ DOCK.prototype = {
* @method initializer
*/
initializer : function() {
Y.log('Dock initialising', 'note', LOGNS);
Y.log('Dock initialising', 'debug', LOGNS);
// Publish the events the dock has
/**
@ -533,7 +533,7 @@ DOCK.prototype = {
warned = true;
}
// Damn, the've set something.
Y.log('Note for customise_dock_for_theme code: M.core_dock.cfg.'+key+' is now dock.set(\''+key+'\', value)', 'info', LOGNS);
Y.log('Note for customise_dock_for_theme code: M.core_dock.cfg.'+key+' is now dock.set(\''+key+'\', value)', 'debug', LOGNS);
this.set(cfgmap[key], value);
}
}
@ -549,7 +549,7 @@ DOCK.prototype = {
warned = true;
}
// Damn, they've set something.
Y.log('Note for customise_dock_for_theme code: M.core_dock.css.'+key+' is now CSS.'+key+' = value', 'info', LOGNS);
Y.log('Note for customise_dock_for_theme code: M.core_dock.css.'+key+' is now CSS.'+key+' = value', 'debug', LOGNS);
CSS[key] = value;
}
}
@ -831,7 +831,7 @@ DOCK.prototype = {
add : function(item) {
// Set the dockitem id to the total count and then increment it.
item.set('id', this.totalcount);
Y.log('Adding block '+item._getLogDescription()+' to the dock.', 'info', LOGNS);
Y.log('Adding block '+item._getLogDescription()+' to the dock.', 'debug', LOGNS);
this.count++;
this.totalcount++;
this.dockeditems[item.get('id')] = item;
@ -866,7 +866,7 @@ DOCK.prototype = {
if (!this.dockeditems[id]) {
return false;
}
Y.log('Removing block '+this.dockeditems[id]._getLogDescription()+' from the dock.', 'info', LOGNS);
Y.log('Removing block '+this.dockeditems[id]._getLogDescription()+' from the dock.', 'debug', LOGNS);
this.dockeditems[id].remove();
delete this.dockeditems[id];
this.count--;
@ -890,7 +890,7 @@ DOCK.prototype = {
* @return {Boolean}
*/
removeAll : function() {
Y.log('Undocking all '+this.dockeditems.length+' blocks', 'note', LOGNS);
Y.log('Undocking all '+this.dockeditems.length+' blocks', 'debug', LOGNS);
var i;
for (i in this.dockeditems) {
if (Y.Lang.isNumber(i) || Y.Lang.isString(i)) {
@ -1151,7 +1151,7 @@ DOCKPANEL.prototype = {
* @method initializer
*/
initializer : function() {
Y.log('Panel initialising', 'note', LOGNS);
Y.log('Panel initialising', 'debug', LOGNS);
/**
* Fired before the panel is shown.
* @event dockpane::beforeshow
@ -1425,7 +1425,7 @@ TABHEIGHTMANAGER.prototype = {
runningcount = 0,
usedheight = 0,
id, itemtitle, itemheight, offsetheight;
Y.log('Enabling the dock tab sizer.', 'note', LOGNS);
Y.log('Enabling the dock tab sizer.', 'debug', LOGNS);
this.set('enabled', true);
for (id in items) {
if (Y.Lang.isNumber(id) || Y.Lang.isString(id)) {
@ -1656,7 +1656,7 @@ BLOCK.prototype = {
return false;
}
Y.log('Initialised block with instance id:'+this.get('id'), 'note', LOGNS);
Y.log('Initialised block with instance id:'+this.get('id'), 'debug', LOGNS);
M.core.dock.ensureMoveToIconExists(node);
@ -1721,7 +1721,7 @@ BLOCK.prototype = {
return;
}
Y.log('Moving block to the dock:'+this.get('id'), 'note', LOGNS);
Y.log('Moving block to the dock:'+this.get('id'), 'debug', LOGNS);
this.recordBlockState();
@ -1792,7 +1792,7 @@ BLOCK.prototype = {
var id = this.get('id'),
commands;
Y.log('Moving block out of the dock:'+this.get('id'), 'note', LOGNS);
Y.log('Moving block out of the dock:'+this.get('id'), 'debug', LOGNS);
// Enable the skip anchor when going back to block mode
if (this.contentskipanchor) {
@ -1926,7 +1926,7 @@ DOCKEDITEM.prototype = {
this.set('title', title);
this.set('titlestring', titlestring);
}
Y.log('Initialised dockeditem for block with title "'+this._getLogDescription(), 'note', LOGNS);
Y.log('Initialised dockeditem for block with title "'+this._getLogDescription(), 'debug', LOGNS);
},
/**
* This function draws the item on the dock.
@ -1979,7 +1979,7 @@ DOCKEDITEM.prototype = {
dock.hideActive();
this.fire('dockeditem:showstart');
Y.log('Showing '+this._getLogDescription(), 'info', LOGNS);
Y.log('Showing '+this._getLogDescription(), 'debug', LOGNS);
panel.setHeader(this.get('titlestring'), this.get('commands'));
panel.setBody(Y.Node.create('<div class="block_'+this.get('blockclass')+' block_docked"></div>').append(this.get('contents')));
panel.show();
@ -2000,7 +2000,7 @@ DOCKEDITEM.prototype = {
*/
hide : function() {
this.fire('dockeditem:hidestart');
Y.log('Hiding "'+this._getLogDescription(), 'info', LOGNS);
Y.log('Hiding "'+this._getLogDescription(), 'debug', LOGNS);
if (this.active) {
// No longer active
this.active = false;
@ -2164,6 +2164,7 @@ Y.extend(DOCKEDITEM, Y.Base, DOCKEDITEM.prototype, {
});
Y.augment(DOCKEDITEM, Y.EventTarget);
}, '@VERSION@', {
"requires": [
"base",

View File

@ -2146,6 +2146,7 @@ Y.extend(DOCKEDITEM, Y.Base, DOCKEDITEM.prototype, {
});
Y.augment(DOCKEDITEM, Y.EventTarget);
}, '@VERSION@', {
"requires": [
"base",

View File

@ -64,7 +64,7 @@ BLOCK.prototype = {
return false;
}
Y.log('Initialised block with instance id:'+this.get('id'), 'note', LOGNS);
Y.log('Initialised block with instance id:'+this.get('id'), 'debug', LOGNS);
M.core.dock.ensureMoveToIconExists(node);
@ -129,7 +129,7 @@ BLOCK.prototype = {
return;
}
Y.log('Moving block to the dock:'+this.get('id'), 'note', LOGNS);
Y.log('Moving block to the dock:'+this.get('id'), 'debug', LOGNS);
this.recordBlockState();
@ -200,7 +200,7 @@ BLOCK.prototype = {
var id = this.get('id'),
commands;
Y.log('Moving block out of the dock:'+this.get('id'), 'note', LOGNS);
Y.log('Moving block out of the dock:'+this.get('id'), 'debug', LOGNS);
// Enable the skip anchor when going back to block mode
if (this.contentskipanchor) {

View File

@ -329,7 +329,7 @@ DOCK.prototype = {
* @method initializer
*/
initializer : function() {
Y.log('Dock initialising', 'note', LOGNS);
Y.log('Dock initialising', 'debug', LOGNS);
// Publish the events the dock has
/**
@ -531,7 +531,7 @@ DOCK.prototype = {
warned = true;
}
// Damn, the've set something.
Y.log('Note for customise_dock_for_theme code: M.core_dock.cfg.'+key+' is now dock.set(\''+key+'\', value)', 'info', LOGNS);
Y.log('Note for customise_dock_for_theme code: M.core_dock.cfg.'+key+' is now dock.set(\''+key+'\', value)', 'debug', LOGNS);
this.set(cfgmap[key], value);
}
}
@ -547,7 +547,7 @@ DOCK.prototype = {
warned = true;
}
// Damn, they've set something.
Y.log('Note for customise_dock_for_theme code: M.core_dock.css.'+key+' is now CSS.'+key+' = value', 'info', LOGNS);
Y.log('Note for customise_dock_for_theme code: M.core_dock.css.'+key+' is now CSS.'+key+' = value', 'debug', LOGNS);
CSS[key] = value;
}
}
@ -829,7 +829,7 @@ DOCK.prototype = {
add : function(item) {
// Set the dockitem id to the total count and then increment it.
item.set('id', this.totalcount);
Y.log('Adding block '+item._getLogDescription()+' to the dock.', 'info', LOGNS);
Y.log('Adding block '+item._getLogDescription()+' to the dock.', 'debug', LOGNS);
this.count++;
this.totalcount++;
this.dockeditems[item.get('id')] = item;
@ -864,7 +864,7 @@ DOCK.prototype = {
if (!this.dockeditems[id]) {
return false;
}
Y.log('Removing block '+this.dockeditems[id]._getLogDescription()+' from the dock.', 'info', LOGNS);
Y.log('Removing block '+this.dockeditems[id]._getLogDescription()+' from the dock.', 'debug', LOGNS);
this.dockeditems[id].remove();
delete this.dockeditems[id];
this.count--;
@ -888,7 +888,7 @@ DOCK.prototype = {
* @return {Boolean}
*/
removeAll : function() {
Y.log('Undocking all '+this.dockeditems.length+' blocks', 'note', LOGNS);
Y.log('Undocking all '+this.dockeditems.length+' blocks', 'debug', LOGNS);
var i;
for (i in this.dockeditems) {
if (Y.Lang.isNumber(i) || Y.Lang.isString(i)) {

View File

@ -77,7 +77,7 @@ DOCKEDITEM.prototype = {
this.set('title', title);
this.set('titlestring', titlestring);
}
Y.log('Initialised dockeditem for block with title "'+this._getLogDescription(), 'note', LOGNS);
Y.log('Initialised dockeditem for block with title "'+this._getLogDescription(), 'debug', LOGNS);
},
/**
* This function draws the item on the dock.
@ -130,7 +130,7 @@ DOCKEDITEM.prototype = {
dock.hideActive();
this.fire('dockeditem:showstart');
Y.log('Showing '+this._getLogDescription(), 'info', LOGNS);
Y.log('Showing '+this._getLogDescription(), 'debug', LOGNS);
panel.setHeader(this.get('titlestring'), this.get('commands'));
panel.setBody(Y.Node.create('<div class="block_'+this.get('blockclass')+' block_docked"></div>').append(this.get('contents')));
panel.show();
@ -151,7 +151,7 @@ DOCKEDITEM.prototype = {
*/
hide : function() {
this.fire('dockeditem:hidestart');
Y.log('Hiding "'+this._getLogDescription(), 'info', LOGNS);
Y.log('Hiding "'+this._getLogDescription(), 'debug', LOGNS);
if (this.active) {
// No longer active
this.active = false;
@ -313,4 +313,4 @@ Y.extend(DOCKEDITEM, Y.Base, DOCKEDITEM.prototype, {
}
}
});
Y.augment(DOCKEDITEM, Y.EventTarget);
Y.augment(DOCKEDITEM, Y.EventTarget);

View File

@ -87,17 +87,17 @@ M.core.dock.loader.delegationEvents = [];
* @method initLoader
*/
M.core.dock.loader.initLoader = function() {
Y.log('Dock loader initialising', 'note', LOADERNAME);
Y.log('Dock loader initialising', 'debug', LOADERNAME);
var dockedblocks = Y.all('.block[data-instanceid][data-dockable]'),
body = Y.one(document.body),
callback;
dockedblocks.each(function() {
var id = parseInt(this.getData('instanceid'), 10);
Y.log('Dock loader watching block with instance id: '+id, 'note', LOADERNAME);
Y.log('Dock loader watching block with instance id: '+id, 'debug', LOADERNAME);
M.core.dock.ensureMoveToIconExists(this);
});
if (dockedblocks.some(function(node){return node.hasClass('dock_on_load');})) {
Y.log('Loading dock module', 'note', LOADERNAME);
Y.log('Loading dock module', 'debug', LOADERNAME);
Y.use('moodle-core-dock', function() {
M.core.dock.init();
});
@ -113,7 +113,7 @@ M.core.dock.loader.initLoader = function() {
}
}
block.addClass('dock_on_load');
Y.log('Loading dock module', 'note', LOADERNAME);
Y.log('Loading dock module', 'debug', LOADERNAME);
Y.use('moodle-core-dock', function(){
M.util.set_user_preference('docked_block_instance_'+instanceid, 1);
M.core.dock.init();
@ -122,4 +122,4 @@ M.core.dock.loader.initLoader = function() {
M.core.dock.loader.delegationEvents.push(body.delegate('click', callback, '.moveto'));
M.core.dock.loader.delegationEvents.push(body.delegate('key', callback, '.moveto', 'enter'));
}
};
};

View File

@ -31,7 +31,7 @@ DOCKPANEL.prototype = {
* @method initializer
*/
initializer : function() {
Y.log('Panel initialising', 'note', LOGNS);
Y.log('Panel initialising', 'debug', LOGNS);
/**
* Fired before the panel is shown.
* @event dockpane::beforeshow

View File

@ -69,7 +69,7 @@ TABHEIGHTMANAGER.prototype = {
runningcount = 0,
usedheight = 0,
id, itemtitle, itemheight, offsetheight;
Y.log('Enabling the dock tab sizer.', 'note', LOGNS);
Y.log('Enabling the dock tab sizer.', 'debug', LOGNS);
this.set('enabled', true);
for (id in items) {
if (Y.Lang.isNumber(id) || Y.Lang.isString(id)) {