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

This commit is contained in:
Sam Hemelryk
2013-12-10 08:43:50 +13:00
15 changed files with 42 additions and 63 deletions
@@ -411,7 +411,7 @@ Y.extend(TREE, Y.Base, TREE.prototype, {
instance : {
value : false,
setter : function(val) {
return parseInt(val);
return parseInt(val, 10);
}
}
}
File diff suppressed because one or more lines are too long
@@ -410,7 +410,7 @@ Y.extend(TREE, Y.Base, TREE.prototype, {
instance : {
value : false,
setter : function(val) {
return parseInt(val);
return parseInt(val, 10);
}
}
}
+1 -1
View File
@@ -409,7 +409,7 @@ Y.extend(TREE, Y.Base, TREE.prototype, {
instance : {
value : false,
setter : function(val) {
return parseInt(val);
return parseInt(val, 10);
}
}
}
@@ -63,7 +63,7 @@ Y.extend(DRAGBLOCK, M.core.dragdrop, {
// See if we are missing either of block regions,
// if yes we need to add an empty one to use as target
if (blockregionlist.size() != this.get('regions').length) {
if (blockregionlist.size() !== this.get('regions').length) {
var blockregion = Y.Node.create('<div></div>')
.addClass(CSS.BLOCKREGION);
var regioncontent = Y.Node.create('<div></div>')
@@ -90,7 +90,7 @@ Y.extend(DRAGBLOCK, M.core.dragdrop, {
// Setting blockregion as droptarget (the case when it is empty)
// The region-post (the right one)
// is very narrow, so add extra padding on the left to drop block on it.
var tar = new Y.DD.Drop({
new Y.DD.Drop({
node: blockregionnode.one('div.'+CSS.REGIONCONTENT),
groups: this.groups,
padding: '40 240 40 240'
@@ -199,7 +199,7 @@ Y.extend(DRAGBLOCK, M.core.dragdrop, {
// Moving from empty region-content towards the opposite one,
// hide empty one (only for region-pre, region-post areas at the moment).
regionname = this.get_region_id(drop.ancestor('div.'+CSS.BLOCKREGION));
if (this.dragsourceregion.all('.'+CSS.BLOCK).size() == 0 && this.dragsourceregion.get('id').match(/(region-pre|region-post)/i)) {
if (this.dragsourceregion.all('.'+CSS.BLOCK).size() === 0 && this.dragsourceregion.get('id').match(/(region-pre|region-post)/i)) {
if (!documentbody.hasClass('side-'+regionname+'-only')) {
documentbody.addClass('side-'+regionname+'-only');
}
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -63,7 +63,7 @@ Y.extend(DRAGBLOCK, M.core.dragdrop, {
// See if we are missing either of block regions,
// if yes we need to add an empty one to use as target
if (blockregionlist.size() != this.get('regions').length) {
if (blockregionlist.size() !== this.get('regions').length) {
var blockregion = Y.Node.create('<div></div>')
.addClass(CSS.BLOCKREGION);
var regioncontent = Y.Node.create('<div></div>')
@@ -90,7 +90,7 @@ Y.extend(DRAGBLOCK, M.core.dragdrop, {
// Setting blockregion as droptarget (the case when it is empty)
// The region-post (the right one)
// is very narrow, so add extra padding on the left to drop block on it.
var tar = new Y.DD.Drop({
new Y.DD.Drop({
node: blockregionnode.one('div.'+CSS.REGIONCONTENT),
groups: this.groups,
padding: '40 240 40 240'
@@ -199,7 +199,7 @@ Y.extend(DRAGBLOCK, M.core.dragdrop, {
// Moving from empty region-content towards the opposite one,
// hide empty one (only for region-pre, region-post areas at the moment).
regionname = this.get_region_id(drop.ancestor('div.'+CSS.BLOCKREGION));
if (this.dragsourceregion.all('.'+CSS.BLOCK).size() == 0 && this.dragsourceregion.get('id').match(/(region-pre|region-post)/i)) {
if (this.dragsourceregion.all('.'+CSS.BLOCK).size() === 0 && this.dragsourceregion.get('id').match(/(region-pre|region-post)/i)) {
if (!documentbody.hasClass('side-'+regionname+'-only')) {
documentbody.addClass('side-'+regionname+'-only');
}
+3 -3
View File
@@ -61,7 +61,7 @@ Y.extend(DRAGBLOCK, M.core.dragdrop, {
// See if we are missing either of block regions,
// if yes we need to add an empty one to use as target
if (blockregionlist.size() != this.get('regions').length) {
if (blockregionlist.size() !== this.get('regions').length) {
var blockregion = Y.Node.create('<div></div>')
.addClass(CSS.BLOCKREGION);
var regioncontent = Y.Node.create('<div></div>')
@@ -88,7 +88,7 @@ Y.extend(DRAGBLOCK, M.core.dragdrop, {
// Setting blockregion as droptarget (the case when it is empty)
// The region-post (the right one)
// is very narrow, so add extra padding on the left to drop block on it.
var tar = new Y.DD.Drop({
new Y.DD.Drop({
node: blockregionnode.one('div.'+CSS.REGIONCONTENT),
groups: this.groups,
padding: '40 240 40 240'
@@ -197,7 +197,7 @@ Y.extend(DRAGBLOCK, M.core.dragdrop, {
// Moving from empty region-content towards the opposite one,
// hide empty one (only for region-pre, region-post areas at the moment).
regionname = this.get_region_id(drop.ancestor('div.'+CSS.BLOCKREGION));
if (this.dragsourceregion.all('.'+CSS.BLOCK).size() == 0 && this.dragsourceregion.get('id').match(/(region-pre|region-post)/i)) {
if (this.dragsourceregion.all('.'+CSS.BLOCK).size() === 0 && this.dragsourceregion.get('id').match(/(region-pre|region-post)/i)) {
if (!documentbody.hasClass('side-'+regionname+'-only')) {
documentbody.addClass('side-'+regionname+'-only');
}
+10 -12
View File
@@ -32,19 +32,17 @@ To update to the latest release of html5shiv:
bootstrapcollapse.js, bootstrapdropdown.js, bootstrapengine.js
--------------------------------------------------------------
This theme uses YUI ports of the Twitter bootstrap jQuery based libs. These ported files are available on:
This theme uses YUI ports of the Twitter bootstrap jQuery based libs.
https://github.com/jshirley/yui3-gallery/blob/master/src/gallery-bootstrap-collapse/js/bootstrap-collapse.js
https://github.com/jshirley/yui3-gallery/blob/master/src/gallery-bootstrap-dropdown/js/bootstrap-dropdown.js
https://github.com/jshirley/yui3-gallery/blob/master/src/gallery-bootstrap-engine/js/bootstrap-engine.js
The content of these files are slightly modified to make sure all required YUI libraries are loaded. To achieve
that the first and last line of each of these files has been modified.
Upgrade procedure:
* git clone https://github.com/jshirley/yui-gallery.git
* from that repository copy:
** build/gallery-bootstrap-collapse/gallery-bootstrap-collapse-debug.js to js/gallery-bootstrapcollapse.js
** build/gallery-bootstrap-dropdown/gallery-bootstrap-dropdown-debug.js to js/gallery-bootstrapdropdown.js
** build/gallery-bootstrap-engine/gallery-bootstrap-engine-debug.js to js/gallery-bootstrapengine.js
* apply patches from MDL-43152 to address linting issues
* run shifter on this directory as required
* update ../../../thirdpartylibs.xml
The YUI port of the Twitter bootstrap libs are now longer maintained. If you need all of the Bootstrap JavaScript
functionality consider switching to the original jQuery version of these file
If you do want to update use these file locations:
theme/bootstrapbase/yui/src/bootstrap/js/bootstrap-collapse.js
theme/bootstrapbase/yui/src/bootstrap/js/bootstrap-dropdown.js
theme/bootstrapbase/yui/src/bootstrap/js/bootstrap-engine.js
@@ -271,7 +271,6 @@ Y.BootstrapEngine = BootstrapEngine;
}, '@VERSION@' ,{requires:['node','base-base']});
;
YUI.add('gallery-bootstrap-collapse', function(Y) {
@@ -301,7 +300,7 @@ However, it can be manually plugged into any node or node list.
@class Bootstrap.Collapse
**/
function CollapsePlugin(config) {
function CollapsePlugin() {
CollapsePlugin.superclass.constructor.apply(this, arguments);
}
@@ -351,9 +350,7 @@ Y.extend(CollapsePlugin, Y.Plugin.Base, {
* <code>data-target</code> or <code>href</code> attribute.
*/
hide: function() {
var showClass = this.config.showClass,
hideClass = this.config.hideClass,
node = this._getTarget();
var node = this._getTarget();
if ( this.transitioning ) {
return;
@@ -370,9 +367,7 @@ Y.extend(CollapsePlugin, Y.Plugin.Base, {
* <code>data-target</code> or <code>href</code> attribute.
*/
show: function() {
var showClass = this.config.showClass,
hideClass = this.config.hideClass,
node = this._getTarget(),
var node = this._getTarget(),
host = this._node,
self = this,
parent,
@@ -496,7 +491,7 @@ Y.namespace('Bootstrap').Collapse = CollapsePlugin;
}, '@VERSION@' ,{requires:['plugin','transition','event','event-delegate']});
;
YUI.add('gallery-bootstrap-dropdown', function(Y) {
/**
@@ -526,7 +521,7 @@ It can also be plugged into any node or node list.
var NS = Y.namespace('Bootstrap');
function DropdownPlugin(config) {
function DropdownPlugin() {
DropdownPlugin.superclass.constructor.apply(this, arguments);
}
@@ -555,7 +550,7 @@ Y.extend( DropdownPlugin, Y.Plugin.Base, {
className = this.config.className;
target.toggleClass( className );
target.once('clickoutside', function(e) {
target.once('clickoutside', function() {
target.toggleClass( className );
});
},
@@ -611,7 +606,6 @@ NS.dropdown_delegation = function() {
}, '@VERSION@' ,{requires:['plugin','event','event-outside']});
;
YUI.add('moodle-theme_bootstrapbase-bootstrap', function (Y, NAME) {
/**
File diff suppressed because one or more lines are too long
@@ -263,7 +263,6 @@ Y.BootstrapEngine = BootstrapEngine;
}, '@VERSION@' ,{requires:['node','base-base']});
;
YUI.add('gallery-bootstrap-collapse', function(Y) {
@@ -293,7 +292,7 @@ However, it can be manually plugged into any node or node list.
@class Bootstrap.Collapse
**/
function CollapsePlugin(config) {
function CollapsePlugin() {
CollapsePlugin.superclass.constructor.apply(this, arguments);
}
@@ -342,9 +341,7 @@ Y.extend(CollapsePlugin, Y.Plugin.Base, {
* <code>data-target</code> or <code>href</code> attribute.
*/
hide: function() {
var showClass = this.config.showClass,
hideClass = this.config.hideClass,
node = this._getTarget();
var node = this._getTarget();
if ( this.transitioning ) {
return;
@@ -361,9 +358,7 @@ Y.extend(CollapsePlugin, Y.Plugin.Base, {
* <code>data-target</code> or <code>href</code> attribute.
*/
show: function() {
var showClass = this.config.showClass,
hideClass = this.config.hideClass,
node = this._getTarget(),
var node = this._getTarget(),
host = this._node,
self = this,
parent,
@@ -486,7 +481,7 @@ Y.namespace('Bootstrap').Collapse = CollapsePlugin;
}, '@VERSION@' ,{requires:['plugin','transition','event','event-delegate']});
;
YUI.add('gallery-bootstrap-dropdown', function(Y) {
/**
@@ -516,7 +511,7 @@ It can also be plugged into any node or node list.
var NS = Y.namespace('Bootstrap');
function DropdownPlugin(config) {
function DropdownPlugin() {
DropdownPlugin.superclass.constructor.apply(this, arguments);
}
@@ -545,7 +540,7 @@ Y.extend( DropdownPlugin, Y.Plugin.Base, {
className = this.config.className;
target.toggleClass( className );
target.once('clickoutside', function(e) {
target.once('clickoutside', function() {
target.toggleClass( className );
});
},
@@ -601,7 +596,6 @@ NS.dropdown_delegation = function() {
}, '@VERSION@' ,{requires:['plugin','event','event-outside']});
;
YUI.add('moodle-theme_bootstrapbase-bootstrap', function (Y, NAME) {
/**
@@ -26,7 +26,7 @@ However, it can be manually plugged into any node or node list.
@class Bootstrap.Collapse
**/
function CollapsePlugin(config) {
function CollapsePlugin() {
CollapsePlugin.superclass.constructor.apply(this, arguments);
}
@@ -76,9 +76,7 @@ Y.extend(CollapsePlugin, Y.Plugin.Base, {
* <code>data-target</code> or <code>href</code> attribute.
*/
hide: function() {
var showClass = this.config.showClass,
hideClass = this.config.hideClass,
node = this._getTarget();
var node = this._getTarget();
if ( this.transitioning ) {
return;
@@ -95,9 +93,7 @@ Y.extend(CollapsePlugin, Y.Plugin.Base, {
* <code>data-target</code> or <code>href</code> attribute.
*/
show: function() {
var showClass = this.config.showClass,
hideClass = this.config.hideClass,
node = this._getTarget(),
var node = this._getTarget(),
host = this._node,
self = this,
parent,
@@ -221,4 +217,3 @@ Y.namespace('Bootstrap').Collapse = CollapsePlugin;
}, '@VERSION@' ,{requires:['plugin','transition','event','event-delegate']});
;
@@ -27,7 +27,7 @@ It can also be plugged into any node or node list.
var NS = Y.namespace('Bootstrap');
function DropdownPlugin(config) {
function DropdownPlugin() {
DropdownPlugin.superclass.constructor.apply(this, arguments);
}
@@ -56,7 +56,7 @@ Y.extend( DropdownPlugin, Y.Plugin.Base, {
className = this.config.className;
target.toggleClass( className );
target.once('clickoutside', function(e) {
target.once('clickoutside', function() {
target.toggleClass( className );
});
},
@@ -112,4 +112,3 @@ NS.dropdown_delegation = function() {
}, '@VERSION@' ,{requires:['plugin','event','event-outside']});
;
@@ -271,4 +271,3 @@ Y.BootstrapEngine = BootstrapEngine;
}, '@VERSION@' ,{requires:['node','base-base']});
;