Browse Source

Change the name for the buffer

pull/14/head
Artur Arseniev 10 years ago
parent
commit
e0ee6b9317
  1. 6
      src/code_manager/model/CssGenerator.js
  2. 2
      src/commands/view/ExportTemplate.js

6
src/code_manager/model/CssGenerator.js

@ -6,7 +6,7 @@ define(['backbone'],
return Backbone.Model.extend({ return Backbone.Model.extend({
initialize: function(){ initialize: function(){
this.printed = []; this.buff = [];
}, },
/** @inheritdoc */ /** @inheritdoc */
@ -46,8 +46,8 @@ define(['backbone'],
selectors.each(function(selector){ selectors.each(function(selector){
strSel += '.' + selector.get('name'); strSel += '.' + selector.get('name');
}); });
if(this.printed.indexOf(strSel) < 0){ if(this.buff.indexOf(strSel) < 0){
this.printed.push(strSel); this.buff.push(strSel);
code += strSel + '{'; code += strSel + '{';
if(ruleStyle && Object.keys(ruleStyle).length !== 0){ if(ruleStyle && Object.keys(ruleStyle).length !== 0){
for(var prop2 in ruleStyle) for(var prop2 in ruleStyle)

2
src/commands/view/ExportTemplate.js

@ -63,7 +63,7 @@ define(function() {
} }
this.htmlEditor.setContent( this.cm.getCode(this.components, 'html') ); this.htmlEditor.setContent( this.cm.getCode(this.components, 'html') );
this.cm.getGenerator('css').printed = []; this.cm.getGenerator('css').buff = [];
this.cssEditor.setContent( this.cm.getCode(this.components, 'css', this.cssc)); this.cssEditor.setContent( this.cm.getCode(this.components, 'css', this.cssc));
if(this.sender) if(this.sender)

Loading…
Cancel
Save