Roo/bootstrap/ComboBox.js
[roojs1] / roojs-ui-debug.js
index 483281c..468bfa7 100644 (file)
@@ -10791,7 +10791,11 @@ Roo.extend(Roo.TabPanelItem, Roo.util.Observable, {
     autoSize : function(){
         //this.el.beginMeasure();
         this.textEl.setWidth(1);
-        this.setWidth(this.textEl.dom.scrollWidth+this.pnode.getPadding("lr")+this.inner.getPadding("lr"));
+        /*
+         *  #2804 [new] Tabs in Roojs
+         *  increase the width by 2-4 pixels to prevent the ellipssis showing in chrome
+         */
+        this.setWidth(this.textEl.dom.scrollWidth+this.pnode.getPadding("lr")+this.inner.getPadding("lr") + 2);
         //this.el.endMeasure();
     },
 
@@ -24974,10 +24978,12 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component,  {
         //var ss = this.el.getStyles('font-size', 'font-family', 'background-image', 'background-repeat');
         // this copies styles from the containing element into thsi one..
         // not sure why we need all of this..
-        var ss = this.el.getStyles('font-size', 'background-image', 'background-repeat');
-        ss['background-attachment'] = 'fixed'; // w3c
+        //var ss = this.el.getStyles('font-size', 'background-image', 'background-repeat');
+        
+        //var ss = this.el.getStyles( 'background-image', 'background-repeat');
+        //ss['background-attachment'] = 'fixed'; // w3c
         dbody.bgProperties = 'fixed'; // ie
-        Roo.DomHelper.applyStyles(dbody, ss);
+        //Roo.DomHelper.applyStyles(dbody, ss);
         Roo.EventManager.on(this.doc, {
             //'mousedown': this.onEditorEvent,
             'mouseup': this.onEditorEvent,
@@ -25840,7 +25846,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component,  {
             if (['IMG', 'BR', 'HR', 'INPUT'].indexOf(tagName) > -1) {
                 return ret;
             }
-            if (['PRE', 'TEXTAREA', 'TD', 'A'].indexOf(tagName) > -1) { // or code?
+            if (['PRE', 'TEXTAREA', 'TD', 'A', 'SPAN'].indexOf(tagName) > -1) { // or code?
                 nopadtext = true;
             }
             
@@ -25850,25 +25856,33 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component,  {
             var currentElementChild = currentElement.childNodes.item(i);
             var allText = true;
             var innerHTML  = '';
+            lastnode = '';
             while (currentElementChild) {
                 // Formatting code (indent the tree so it looks nice on the screen)
-                
+                var nopad = nopadtext;
+                if (lastnode == 'SPAN') {
+                    nopad  = true;
+                }
+                // text
                 if  (currentElementChild.nodeName == '#text') {
                     var toadd = Roo.util.Format.htmlEncode(currentElementChild.nodeValue);
-                    if (!nopadtext && toadd.length > 80) {
+                    if (!nopad && toadd.length > 80) {
                         innerHTML  += "\n" + (new Array( depth + 1 )).join( "  "  );
                     }
                     innerHTML  += toadd;
                     
                     i++;
                     currentElementChild = currentElement.childNodes.item(i);
+                    lastNode = '';
                     continue;
-                }   
+                }
                 allText = false;
-                innerHTML  += nopadtext ? '' : "\n" + (new Array( depth + 1 )).join( "  "  );
+                
+                innerHTML  += nopad ? '' : "\n" + (new Array( depth + 1 )).join( "  "  );
                     
                 // Recursively traverse the tree structure of the child node
                 innerHTML   += this.domToHTML(currentElementChild, depth+1, nopadtext);
+                lastnode = currentElementChild.nodeName;
                 i++;
                 currentElementChild=currentElement.childNodes.item(i);
             }
@@ -26832,7 +26846,7 @@ Roo.apply(Roo.form.HtmlEditor.ToolbarStandard.prototype,  {
                         c.select('[style]').each(function(s) {
                             s.dom.style.removeProperty(a.actiontype);
                         });
-                        
+                        editorcore.syncValue();
                     },
                     tabIndex:-1
                 });
@@ -26842,7 +26856,7 @@ Roo.apply(Roo.form.HtmlEditor.ToolbarStandard.prototype,  {
                 html: 'Remove MS Word Formating',
                 handler: function(a,b) {
                     editorcore.cleanWord();
-                    
+                    editorcore.syncValue();
                 },
                 tabIndex:-1
             });
@@ -26856,7 +26870,7 @@ Roo.apply(Roo.form.HtmlEditor.ToolbarStandard.prototype,  {
                     c.select('[style]').each(function(s) {
                         s.dom.removeAttribute('style');
                     });
-                    
+                    editorcore.syncValue();
                 },
                 tabIndex:-1
             });
@@ -26865,7 +26879,7 @@ Roo.apply(Roo.form.HtmlEditor.ToolbarStandard.prototype,  {
                 html: 'Tidy HTML Source',
                 handler: function(a,b) {
                     editorcore.doc.body.innerHTML = editorcore.domToHTML();
-                    
+                    editorcore.syncValue();
                 },
                 tabIndex:-1
             });