diff --git a/src/commands/view/CreateComponent.js b/src/commands/view/CreateComponent.js index 766c06f8b..55b7d0147 100644 --- a/src/commands/view/CreateComponent.js +++ b/src/commands/view/CreateComponent.js @@ -14,8 +14,8 @@ module.exports = _.extend({}, SelectPosition, { * Start with enabling to select position and listening to start drawning * @private * */ - enable: function() { - SelectPosition.enable.apply(this, arguments); + enable: function(...args) { + SelectPosition.enable.apply(this, args); this.$wr.css('cursor','crosshair'); if(this.allowDraw) this.$wr.on('mousedown', this.startDraw); diff --git a/src/commands/view/InsertCustom.js b/src/commands/view/InsertCustom.js index 98aec61cd..5f583a3e4 100644 --- a/src/commands/view/InsertCustom.js +++ b/src/commands/view/InsertCustom.js @@ -3,8 +3,8 @@ var CreateComponent = require('./CreateComponent'); module.exports = _.extend({}, CreateComponent, { - init: function(){ - CreateComponent.init.apply(this, arguments); + init: function(...args) { + CreateComponent.init.apply(this, args); _.bindAll(this, 'insertComponent'); this.allowDraw = 0; }, @@ -21,8 +21,8 @@ module.exports = _.extend({}, CreateComponent, { this.enable(); }, - enable: function(){ - CreateComponent.enable.apply(this, arguments); + enable: function(...args) { + CreateComponent.enable.apply(this, args); this.$wr.on('click', this.insertComponent); }, diff --git a/src/commands/view/MoveComponent.js b/src/commands/view/MoveComponent.js index 21f24cd64..e1826d968 100644 --- a/src/commands/view/MoveComponent.js +++ b/src/commands/view/MoveComponent.js @@ -13,8 +13,8 @@ module.exports = _.extend({}, SelectPosition, SelectComponent, { this.noSelClass = this.ppfx + 'no-select'; }, - enable: function() { - SelectComponent.enable.apply(this, arguments); + enable: function(...args) { + SelectComponent.enable.apply(this, args); this.getBadgeEl().addClass(this.badgeClass); this.getHighlighterEl().addClass(this.hoverClass); var wp = this.$wrapper; @@ -138,8 +138,8 @@ module.exports = _.extend({}, SelectPosition, SelectComponent, { return this.$hl; }, - stop: function(){ - SelectComponent.stop.apply(this, arguments); + stop: function(...args) { + SelectComponent.stop.apply(this, args); this.getBadgeEl().removeClass(this.badgeClass); this.getHighlighterEl().removeClass(this.hoverClass); var wp = this.$wrapper; diff --git a/src/dom_components/model/Component.js b/src/dom_components/model/Component.js index ae0905da5..e01014c7b 100644 --- a/src/dom_components/model/Component.js +++ b/src/dom_components/model/Component.js @@ -321,8 +321,8 @@ module.exports = Backbone.Model.extend({ * @return {Object} * @private */ - toJSON: function() { - var obj = Backbone.Model.prototype.toJSON.apply(this, arguments); + toJSON: function(...args) { + var obj = Backbone.Model.prototype.toJSON.apply(this, args); var scriptStr = this.getScriptString(); if (scriptStr) { diff --git a/src/dom_components/model/ComponentImage.js b/src/dom_components/model/ComponentImage.js index 388fdb3a2..8cb6742b0 100644 --- a/src/dom_components/model/ComponentImage.js +++ b/src/dom_components/model/ComponentImage.js @@ -19,8 +19,8 @@ module.exports = Component.extend({ this.set('src', attr.src); }, - initToolbar: function() { - Component.prototype.initToolbar.apply(this, arguments); + initToolbar: function(...args) { + Component.prototype.initToolbar.apply(this, args); if (this.sm && this.sm.get) { var cmd = this.sm.get('Commands'); @@ -43,8 +43,8 @@ module.exports = Component.extend({ * @return {Object} * @private */ - getAttrToHTML: function() { - var attr = Component.prototype.getAttrToHTML.apply(this, arguments); + getAttrToHTML: function(...args) { + var attr = Component.prototype.getAttrToHTML.apply(this, args); delete attr.onmousedown; var src = this.get('src'); if(src) diff --git a/src/dom_components/model/ComponentLink.js b/src/dom_components/model/ComponentLink.js index c7daafe67..4aa102a3b 100644 --- a/src/dom_components/model/ComponentLink.js +++ b/src/dom_components/model/ComponentLink.js @@ -13,8 +13,8 @@ module.exports = Component.extend({ * @return {Object} * @private */ - getAttrToHTML: function() { - var attr = Component.prototype.getAttrToHTML.apply(this, arguments); + getAttrToHTML: function(...args) { + var attr = Component.prototype.getAttrToHTML.apply(this, args); delete attr.onmousedown; return attr; }, diff --git a/src/dom_components/model/ComponentVideo.js b/src/dom_components/model/ComponentVideo.js index 844b4a345..e93d345c2 100644 --- a/src/dom_components/model/ComponentVideo.js +++ b/src/dom_components/model/ComponentVideo.js @@ -90,8 +90,8 @@ module.exports = Component.extend({ * @return {Object} * @private */ - getAttrToHTML: function() { - var attr = Component.prototype.getAttrToHTML.apply(this, arguments); + getAttrToHTML: function(...args) { + var attr = Component.prototype.getAttrToHTML.apply(this, args); var prov = this.get('provider'); switch (prov) { case yt: case vi: diff --git a/src/dom_components/view/ComponentLinkView.js b/src/dom_components/view/ComponentLinkView.js index ae2f673d4..b274f8081 100644 --- a/src/dom_components/view/ComponentLinkView.js +++ b/src/dom_components/view/ComponentLinkView.js @@ -7,8 +7,8 @@ module.exports = ComponentView.extend({ 'dblclick': 'enableEditing', }, - render: function() { - ComponentView.prototype.render.apply(this, arguments); + render: function(...args) { + ComponentView.prototype.render.apply(this, args); // I need capturing instead of bubbling as bubbled clicks from other // children will execute the link event diff --git a/src/dom_components/view/ComponentMapView.js b/src/dom_components/view/ComponentMapView.js index 031222d56..ee7d31647 100644 --- a/src/dom_components/view/ComponentMapView.js +++ b/src/dom_components/view/ComponentMapView.js @@ -33,8 +33,8 @@ module.exports = ComponentView.extend({ return this.iframe; }, - render: function() { - ComponentView.prototype.render.apply(this, arguments); + render: function(...args) { + ComponentView.prototype.render.apply(this, args); this.updateClasses(); this.el.appendChild(this.getIframe()); return this; diff --git a/src/dom_components/view/ComponentVideoView.js b/src/dom_components/view/ComponentVideoView.js index bfff8ee3d..bd43f8abd 100644 --- a/src/dom_components/view/ComponentVideoView.js +++ b/src/dom_components/view/ComponentVideoView.js @@ -107,8 +107,8 @@ module.exports = ComponentView.extend({ el.style.width = '100%'; }, - render: function() { - ComponentView.prototype.render.apply(this, arguments); + render: function(...args) { + ComponentView.prototype.render.apply(this, args); this.updateClasses(); var prov = this.model.get('provider'); this.el.appendChild(this.renderByProvider(prov)); diff --git a/src/domain_abstract/ui/InputColor.js b/src/domain_abstract/ui/InputColor.js index 4f27a93e2..7ac574267 100644 --- a/src/domain_abstract/ui/InputColor.js +++ b/src/domain_abstract/ui/InputColor.js @@ -25,8 +25,8 @@ module.exports = Input.extend({ /** * Updates the view when the model is changed * */ - handleModelChange: function() { - Input.prototype.handleModelChange.apply(this, arguments); + handleModelChange: function(...args) { + Input.prototype.handleModelChange.apply(this, args); var value = this.model.get('value'); var colorEl = this.getColorEl(); @@ -71,8 +71,8 @@ module.exports = Input.extend({ return this.colorEl; }, - render: function() { - Input.prototype.render.apply(this, arguments); + render: function(...args) { + Input.prototype.render.apply(this, args); this.$el.find('.' + this.colorHolderClass).html(this.getColorEl()); return this; } diff --git a/src/rich_text_editor/view/CommandButtonSelectView.js b/src/rich_text_editor/view/CommandButtonSelectView.js index 61b57886e..428e110b1 100644 --- a/src/rich_text_editor/view/CommandButtonSelectView.js +++ b/src/rich_text_editor/view/CommandButtonSelectView.js @@ -34,8 +34,8 @@ module.exports = CommandButtonView.extend({ return cont.append(input); }, - render: function() { - CommandButtonView.prototype.render.apply(this, arguments); + render: function(...args) { + CommandButtonView.prototype.render.apply(this, args); this.$el.html(this.getInputCont()); return this; } diff --git a/src/style_manager/view/PropertyCompositeView.js b/src/style_manager/view/PropertyCompositeView.js index bda368854..8f68ec700 100644 --- a/src/style_manager/view/PropertyCompositeView.js +++ b/src/style_manager/view/PropertyCompositeView.js @@ -19,9 +19,9 @@ module.exports = PropertyView.extend({ /** * Fired when the input value is updated */ - valueUpdated: function(){ + valueUpdated: function(...args) { if(!this.model.get('detached')) - PropertyView.prototype.valueUpdated.apply(this, arguments); + PropertyView.prototype.valueUpdated.apply(this, args); }, /** diff --git a/src/style_manager/view/PropertyFileView.js b/src/style_manager/view/PropertyFileView.js index 678fdfb05..5caa50d7a 100644 --- a/src/style_manager/view/PropertyFileView.js +++ b/src/style_manager/view/PropertyFileView.js @@ -110,9 +110,9 @@ module.exports = PropertyView.extend({ * * @return void * */ - removeFile:function(){ + removeFile:function(...args) { this.model.set('value',this.defaultValue); - PropertyView.prototype.cleanValue.apply(this, arguments); + PropertyView.prototype.cleanValue.apply(this, args); this.setPreviewView(0); }, diff --git a/src/style_manager/view/PropertyStackView.js b/src/style_manager/view/PropertyStackView.js index f0e37bf30..809155386 100644 --- a/src/style_manager/view/PropertyStackView.js +++ b/src/style_manager/view/PropertyStackView.js @@ -27,9 +27,9 @@ module.exports = PropertyCompositeView.extend({ * With detached mode the component will be always empty as its value * so we gonna check all props and fine if there is some differences. * */ - targetUpdated: function(){ + targetUpdated: function(...args) { if(!this.model.get('detached')) - PropertyCompositeView.prototype.targetUpdated.apply(this, arguments); + PropertyCompositeView.prototype.targetUpdated.apply(this, args); else { this.checkVisibility(); this.refreshLayers(); @@ -138,11 +138,11 @@ module.exports = PropertyCompositeView.extend({ * Build composite value * @private * */ - build: function() { + build: function(...args) { var stackIndex = this.model.get('stackIndex'); if(stackIndex === null) return; - var result = PropertyCompositeView.prototype.build.apply(this, arguments); + var result = PropertyCompositeView.prototype.build.apply(this, args); var model = this.getLayers().at(stackIndex); if(!model) return; @@ -231,8 +231,8 @@ module.exports = PropertyCompositeView.extend({ }, /** @inheritdoc */ - renderInput: function() { - PropertyCompositeView.prototype.renderInput.apply(this, arguments); + renderInput: function(...args) { + PropertyCompositeView.prototype.renderInput.apply(this, args); this.refreshLayers(); }, diff --git a/src/trait_manager/view/TraitCheckboxView.js b/src/trait_manager/view/TraitCheckboxView.js index 6f4a0d95b..44d5a7a7d 100644 --- a/src/trait_manager/view/TraitCheckboxView.js +++ b/src/trait_manager/view/TraitCheckboxView.js @@ -21,11 +21,11 @@ module.exports = TraitView.extend({ * @return {HTMLElement} * @private */ - getInputEl: function() { + getInputEl: function(...args) { var first; if(!this.$input) first = 1; - var el = TraitView.prototype.getInputEl.apply(this, arguments); + var el = TraitView.prototype.getInputEl.apply(this, args); if(first){ var md = this.model; var name = md.get('name');