Browse Source

Clean ExportTemplate command

pull/1069/head
Artur Arseniev 9 years ago
parent
commit
dbb81a2b62
  1. 2
      src/commands/view/ExportTemplate.js
  2. 4
      src/editor/config/config.js
  3. 5
      src/editor/model/Editor.js

2
src/commands/view/ExportTemplate.js

@ -22,7 +22,7 @@ module.exports = {
modal.setContent(this.$editors);
modal.open();
this.htmlEditor.setContent(editor.getHtml());
this.cssEditor.setContent(editor.getCss({ dumpUnusedSelectors: 1 }));
this.cssEditor.setContent(editor.getCss());
},
stop(editor) {

4
src/editor/config/config.js

@ -281,6 +281,6 @@ module.exports = {
// Texts
textViewCode: 'Code',
// Dump unused styles within the editor.
dumpUnusedStyles: false
// Dump unused styles within the editor
dumpUnusedStyles: 0
};

5
src/editor/model/Editor.js

@ -305,8 +305,9 @@ module.exports = Backbone.Model.extend({
const config = this.config;
const wrappesIsBody = config.wrappesIsBody;
const avoidProt = opts.avoidProtected;
const dumpUnusedStyles =
opts.dumpUnusedStyles || this.config.dumpUnusedStyles;
const dumpUnusedStyles = !isUndefined(opts.dumpUnusedStyles)
? opts.dumpUnusedStyles
: config.dumpUnusedStyles;
const cssc = this.get('CssComposer');
const wrp = this.get('DomComponents').getComponent();
const protCss = !avoidProt ? config.protectedCss : '';

Loading…
Cancel
Save