|
|
|
@ -5,16 +5,11 @@ define(['StyleManager'], function(StyleManager) { |
|
|
|
* */ |
|
|
|
return { |
|
|
|
|
|
|
|
run: function(em, sender) |
|
|
|
{ |
|
|
|
run: function(em, sender) { |
|
|
|
this.sender = sender; |
|
|
|
if(!this.$cn){ |
|
|
|
var config = em.getConfig(), |
|
|
|
panels = em.Panels, |
|
|
|
pfx = config.styleManager.stylePrefix || 'sm-'; |
|
|
|
|
|
|
|
config.styleManager.stylePrefix = config.stylePrefix + pfx; |
|
|
|
config.styleManager.target = em.editor; |
|
|
|
panels = em.Panels; |
|
|
|
|
|
|
|
// Main container
|
|
|
|
this.$cn = $('<div/>'); |
|
|
|
@ -32,10 +27,7 @@ define(['StyleManager'], function(StyleManager) { |
|
|
|
this.$cn2.append(this.$clm); |
|
|
|
} |
|
|
|
|
|
|
|
// Style Manager manager container
|
|
|
|
this.sm = new StyleManager(config.styleManager); |
|
|
|
this.$sm = this.sm.render(); |
|
|
|
this.$cn2.append(this.$sm); |
|
|
|
this.$cn2.append(em.StyleManager.render()); |
|
|
|
|
|
|
|
// Create header
|
|
|
|
this.$header = $('<div>', { |
|
|
|
@ -64,8 +56,7 @@ define(['StyleManager'], function(StyleManager) { |
|
|
|
* Toggle Style Manager visibility |
|
|
|
* @private |
|
|
|
*/ |
|
|
|
toggleSm: function() |
|
|
|
{ |
|
|
|
toggleSm: function() { |
|
|
|
if(!this.sender.get('active')) |
|
|
|
return; |
|
|
|
if(this.target.get('selectedComponent')){ |
|
|
|
@ -77,8 +68,7 @@ define(['StyleManager'], function(StyleManager) { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
stop: function() |
|
|
|
{ |
|
|
|
stop: function() { |
|
|
|
// Hide secondary container if exists
|
|
|
|
if(this.$cn2) |
|
|
|
this.$cn2.hide(); |
|
|
|
|