MDL-43152 JavaScript: Fix linting issues with moodle-core-blocks

This commit is contained in:
Andrew Nicols
2013-12-06 09:19:39 +08:00
parent 350ef81938
commit 2db015372a
4 changed files with 10 additions and 10 deletions
@@ -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');
}