MDL-43152 JavaScript: Fix linting issues with moodle-core-blocks
This commit is contained in:
@@ -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
@@ -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');
|
||||
}
|
||||
|
||||
Vendored
+3
-3
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user