|
|
|
@ -36,17 +36,18 @@ function(Backbone, FrameView) { |
|
|
|
renderBody: function(){ |
|
|
|
var wrap = this.model.get('frame').get('wrapper'); |
|
|
|
if(wrap){ |
|
|
|
var ppfx = this.ppfx; |
|
|
|
var body = this.frame.$el.contents().find('body'); |
|
|
|
var cssc = this.config.em.get('CssComposer'); |
|
|
|
var conf = this.config.em.get('Config'); |
|
|
|
body.append(wrap.render()).append(cssc.render()); |
|
|
|
var protCss = conf.protectedCss; |
|
|
|
var frameCss = '.' + this.ppfx + 'dashed *{outline: 1px dashed rgba(170,170,170,0.7); outline-offset: -2px}' + |
|
|
|
'.' + this.ppfx + 'comp-selected{outline: 3px solid #3b97e3 !important}' + |
|
|
|
'.' + this.ppfx + 'no-select{user-select: none; -webkit-user-select:none; -moz-user-select: none}'+ |
|
|
|
'.' + this.ppfx + 'freezed{opacity: 0.5; pointer-events: none}' + |
|
|
|
'.' + this.ppfx + 'no-pointer{pointer-events: none}' + |
|
|
|
'.' + this.ppfx + 'plh-image{background:#f5f5f5; border:none; height:50px; width:50px; display:block; outline:3px solid #ffca6f; cursor:pointer}'; |
|
|
|
var frameCss = '.' + ppfx + 'dashed *{outline: 1px dashed rgba(170,170,170,0.7); outline-offset: -2px}' + |
|
|
|
'.' + ppfx + 'comp-selected{outline: 3px solid #3b97e3 !important}' + |
|
|
|
'.' + ppfx + 'no-select{user-select: none; -webkit-user-select:none; -moz-user-select: none}'+ |
|
|
|
'.' + ppfx + 'freezed{opacity: 0.5; pointer-events: none}' + |
|
|
|
'.' + ppfx + 'no-pointer{pointer-events: none}' + |
|
|
|
'.' + ppfx + 'plh-image{background:#f5f5f5; border:none; height:50px; width:50px; display:block; outline:3px solid #ffca6f; cursor:pointer}'; |
|
|
|
if(protCss) |
|
|
|
body.append('<style>' + frameCss + protCss + '</style>'); |
|
|
|
this.config.em.trigger('loaded'); |
|
|
|
@ -135,17 +136,20 @@ function(Backbone, FrameView) { |
|
|
|
var frame = this.frame; |
|
|
|
frame.el.onload = this.renderBody; |
|
|
|
} |
|
|
|
this.toolsEl = $('<div>', { id: this.ppfx + 'tools' }).get(0); |
|
|
|
this.hlEl = $('<div>', { class: this.ppfx + 'highlighter' }).get(0); |
|
|
|
this.badgeEl = $('<div>', {class: this.ppfx + 'badge'}).get(0); |
|
|
|
this.placerEl = $('<div>', {class: this.ppfx + 'placeholder'}).get(0); |
|
|
|
this.placerIntEl = $('<div>', {class: this.ppfx + 'placeholder-int'}).get(0); |
|
|
|
this.ghostEl = $('<div>', {class: this.ppfx + 'ghost'}).get(0); |
|
|
|
this.placerEl.appendChild(this.placerIntEl); |
|
|
|
this.toolsEl.appendChild(this.hlEl); |
|
|
|
this.toolsEl.appendChild(this.badgeEl); |
|
|
|
this.toolsEl.appendChild(this.placerEl); |
|
|
|
this.toolsEl.appendChild(this.ghostEl); |
|
|
|
var ppfx = this.ppfx; |
|
|
|
this.toolsEl = $('<div>', { id: ppfx + 'tools' }).get(0); |
|
|
|
this.hlEl = $('<div>', { class: ppfx + 'highlighter' }).get(0); |
|
|
|
this.badgeEl = $('<div>', {class: ppfx + 'badge'}).get(0); |
|
|
|
this.placerEl = $('<div>', {class: ppfx + 'placeholder'}).get(0); |
|
|
|
this.placerIntEl = $('<div>', {class: ppfx + 'placeholder-int'}).get(0); |
|
|
|
this.ghostEl = $('<div>', {class: ppfx + 'ghost'}).get(0); |
|
|
|
this.toolbarEl = $('<div>', {class: ppfx + 'toolbar'}).get(0); |
|
|
|
this.placerEl.appendChild(this.placerIntEl); |
|
|
|
this.toolsEl.appendChild(this.hlEl); |
|
|
|
this.toolsEl.appendChild(this.badgeEl); |
|
|
|
this.toolsEl.appendChild(this.placerEl); |
|
|
|
this.toolsEl.appendChild(this.ghostEl); |
|
|
|
this.toolsEl.appendChild(this.toolbarEl); |
|
|
|
this.$el.append(this.toolsEl); |
|
|
|
var rte = this.em.get('rte'); |
|
|
|
|
|
|
|
|