Roo/form/HtmlEditor/ToolbarContext.js
authorAlan Knowles <alan@roojs.com>
Thu, 15 Nov 2012 06:16:30 +0000 (14:16 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 15 Nov 2012 06:16:30 +0000 (14:16 +0800)
Roo/form/HtmlEditor/ToolbarContext.js

index 109e157..20397a4 100644 (file)
@@ -388,7 +388,7 @@ Roo.apply(Roo.form.HtmlEditor.ToolbarContext.prototype,  {
 
         }
         
-        if (!ans) {
+        if (!updateFooter) {
             this.footDisp.dom.innerHTML = ''; 
             return;
         }
@@ -416,7 +416,31 @@ Roo.apply(Roo.form.HtmlEditor.ToolbarContext.prototype,  {
             
         //this.editorsyncValue();
     },
-     
+    
+    updateFooter : function()
+    {
+         var html = '';
+        
+        this.footerEls = ans.reverse();
+        Roo.each(this.footerEls, function(a,i) {
+            if (!a) { return; }
+            html += html.length ? ' &gt; '  :  '';
+            
+            html += '<span class="x-ed-loc-' + i + '">' + a.tagName + '</span>';
+            
+        });
+       
+        // 
+        var sz = this.footDisp.up('td').getSize();
+        this.footDisp.dom.style.width = (sz.width -10) + 'px';
+        this.footDisp.dom.style.marginLeft = '5px';
+        
+        this.footDisp.dom.style.overflow = 'hidden';
+        
+        this.footDisp.dom.innerHTML = html;
+        
+        
+    }