Use proper backbone set and get
[MAILPOET-1568]
This commit is contained in:
@@ -165,6 +165,7 @@ define([
|
|||||||
},
|
},
|
||||||
onRender: function () {
|
onRender: function () {
|
||||||
var classIrregular = '';
|
var classIrregular = '';
|
||||||
|
var columnLayout;
|
||||||
this.toolsView = new Module.ContainerBlockToolsView({
|
this.toolsView = new Module.ContainerBlockToolsView({
|
||||||
model: this.model,
|
model: this.model,
|
||||||
tools: {
|
tools: {
|
||||||
@@ -185,8 +186,9 @@ define([
|
|||||||
// Sets child container orientation HTML class here,
|
// Sets child container orientation HTML class here,
|
||||||
// as child CollectionView won't have access to model
|
// as child CollectionView won't have access to model
|
||||||
// and will overwrite existing region element instead
|
// and will overwrite existing region element instead
|
||||||
if (typeof this.model.columnLayout === 'string') {
|
columnLayout = this.model.get('columnLayout');
|
||||||
classIrregular = 'mailpoet_irregular_width_contents_container column_layout_' + this.model.columnLayout;
|
if (typeof columnLayout === 'string') {
|
||||||
|
classIrregular = 'mailpoet_irregular_width_contents_container column_layout_' + columnLayout;
|
||||||
}
|
}
|
||||||
this.$('> .mailpoet_container').attr('class',
|
this.$('> .mailpoet_container').attr('class',
|
||||||
'mailpoet_container mailpoet_container_' + this.model.get('orientation') + ' ' + classIrregular
|
'mailpoet_container mailpoet_container_' + this.model.get('orientation') + ' ' + classIrregular
|
||||||
@@ -374,7 +376,7 @@ define([
|
|||||||
new Module.ContainerBlockModel()
|
new Module.ContainerBlockModel()
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
block.columnLayout = '1_2';
|
block.set('columnLayout', '1_2');
|
||||||
return block;
|
return block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -395,7 +397,7 @@ define([
|
|||||||
new Module.ContainerBlockModel()
|
new Module.ContainerBlockModel()
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
block.columnLayout = '2_1';
|
block.set('columnLayout', '2_1');
|
||||||
return block;
|
return block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user