Browse Source

Start inline css option

pull/36/head
Artur Arseniev 9 years ago
parent
commit
bb382c4814
  1. 6
      src/code_manager/config/config.js
  2. 7
      src/code_manager/model/HtmlGenerator.js
  3. 6
      src/commands/view/ExportTemplate.js
  4. 2
      styles/css/main.css
  5. 2
      styles/scss/main.scss

6
src/code_manager/config/config.js

@ -1,6 +1,8 @@
define(function () {
return {
// Style prefix
stylePrefix : 'cm-',
stylePrefix: 'cm-',
inlineCss: false,
};
});
});

7
src/code_manager/model/HtmlGenerator.js

@ -6,9 +6,10 @@ define(['backbone'],
return Backbone.Model.extend({
/** @inheritdoc */
build: function(model){
var coll = model.get('components') || model,
code = '';
build: function(model, cssc){
var inlineCss = 1;
var coll = model.get('components') || model,
code = '';
coll.each(function(m){
code += m.toHTML();

6
src/commands/view/ExportTemplate.js

@ -64,8 +64,8 @@ define(function() {
this.modal.open();
}
var addCss = this.protCss || '';
this.htmlEditor.setContent( this.cm.getCode(this.components, 'html') );
this.cssEditor.setContent( addCss + this.cm.getCode(this.components, 'css', this.cssc));
this.htmlEditor.setContent(this.cm.getCode(this.components, 'html', this.cssc));
this.cssEditor.setContent(addCss + this.cm.getCode(this.components, 'css', this.cssc));
if(this.sender)
this.sender.set('active',false);
@ -73,4 +73,4 @@ define(function() {
stop: function(){}
};
});
});

2
styles/css/main.css

@ -3056,7 +3056,7 @@ ol.example li.placeholder:before {
border-left: 1px solid rgba(5, 5, 5, 0.3); }
.gjs-nv-item > .gjs-nv-children {
margin-left: 15px;
margin-left: 10px;
display: none; }
.gjs-nv-item.open > .gjs-nv-children {

2
styles/scss/main.scss

@ -607,7 +607,7 @@ ol.example li.placeholder:before {position: absolute;}
border-left: 1px solid lighten($mainDkColor,2%);
}
.#{$nv-prefix}item > .#{$nv-prefix}children {
margin-left: 15px;
margin-left: 10px;
display: none;
}
.#{$nv-prefix}item.open > .#{$nv-prefix}children { display: block; }

Loading…
Cancel
Save