Browse Source

Lebab arg-res

pull/72/merge
Artur Arseniev 9 years ago
parent
commit
049ab58d4f
  1. 4
      src/commands/view/CreateComponent.js
  2. 8
      src/commands/view/InsertCustom.js
  3. 8
      src/commands/view/MoveComponent.js
  4. 4
      src/dom_components/model/Component.js
  5. 8
      src/dom_components/model/ComponentImage.js
  6. 4
      src/dom_components/model/ComponentLink.js
  7. 4
      src/dom_components/model/ComponentVideo.js
  8. 4
      src/dom_components/view/ComponentLinkView.js
  9. 4
      src/dom_components/view/ComponentMapView.js
  10. 4
      src/dom_components/view/ComponentVideoView.js
  11. 8
      src/domain_abstract/ui/InputColor.js
  12. 4
      src/rich_text_editor/view/CommandButtonSelectView.js
  13. 4
      src/style_manager/view/PropertyCompositeView.js
  14. 4
      src/style_manager/view/PropertyFileView.js
  15. 12
      src/style_manager/view/PropertyStackView.js
  16. 4
      src/trait_manager/view/TraitCheckboxView.js

4
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);

8
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);
},

8
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;

4
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) {

8
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)

4
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;
},

4
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:

4
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

4
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;

4
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));

8
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;
}

4
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;
}

4
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);
},
/**

4
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);
},

12
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();
},

4
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');

Loading…
Cancel
Save