docs/default.css
[roojs1] / roojs-bootstrap-debug.js
index 40493b7..6371ccf 100644 (file)
@@ -447,7 +447,7 @@ Roo.extend(Roo.bootstrap.ButtonGroup, Roo.bootstrap.Component,  {
         var cfg = {
             cls: 'btn-group',
             html : null
-        }
+        };
         
         cfg.html = this.html || cfg.html;
         
@@ -455,7 +455,7 @@ Roo.extend(Roo.bootstrap.ButtonGroup, Roo.bootstrap.Component,  {
             cfg = {
                 cls: 'btn-toolbar',
                 html: null
-            }
+            };
             
             return cfg;
         }
@@ -1378,7 +1378,7 @@ Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component,  {
             tag: 'div',
             cls: 'roo-image-responsive-group',
             cn: []
-        }
+        };
         var _this = this;
         
         Roo.each(['xs', 'sm', 'md', 'lg'], function(size){
@@ -1392,7 +1392,7 @@ Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component,  {
                 cls: (_this.imgResponsive) ? 'img-responsive' : '',
                 html: _this.html || cfg.html,
                 src: _this[size + 'Url']
-            }
+            };
             
             img.cls += ' roo-image-responsive-' + size;
             
@@ -1419,7 +1419,7 @@ Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component,  {
                     cn: [
                         img
                     ]
-                }
+                };
 
                 if(this.target){
                     a.target = _this.target;
@@ -1439,7 +1439,7 @@ Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component,  {
             tag: 'img',
             cls: (this.imgResponsive) ? 'img-responsive' : '',
             html : null
-        }
+        };
         
         cfg.html = this.html || cfg.html;
         
@@ -1458,9 +1458,9 @@ Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component,  {
                 tag: 'a',
                 href: this.href,
                 cn: [
-                   cfg
-               ]
-            }
+                    cfg
+                ]
+            };
             
             if(this.target){
                 a.target = this.target;
@@ -1947,7 +1947,7 @@ Roo.extend(Roo.bootstrap.Menu, Roo.bootstrap.Component,  {
             cls : 'dropdown-menu' ,
             style : 'z-index:1000'
             
-        }
+        };
        
         if (this.type === 'submenu') {
             cfg.cls = 'submenu active';
@@ -1965,7 +1965,14 @@ Roo.extend(Roo.bootstrap.Menu, Roo.bootstrap.Component,  {
         this.triggerEl.on(Roo.isTouch ? 'touchstart' : 'mouseup', this.onTriggerPress, this);
         
         this.triggerEl.addClass('dropdown-toggle');
-        this.el.on(Roo.isTouch ? 'touchstart' : 'click' , this.onClick, this);
+        
+        
+        
+        
+        if (Roo.isTouch) {
+            this.el.on('touchstart'  , this.onTouch, this);
+        }
+        this.el.on('click' , this.onClick, this);
 
         this.el.on("mouseover", this.onMouseOver, this);
         this.el.on("mouseout", this.onMouseOut, this);
@@ -1987,6 +1994,12 @@ Roo.extend(Roo.bootstrap.Menu, Roo.bootstrap.Component,  {
         
         return false;
     },
+    
+    onTouch : function(e) {
+        e.stopEvent();
+        this.onClick(e);
+    },
+    
     onClick : function(e){
         Roo.log("menu.onClick");
         var t = this.findTargetItem(e);
@@ -3336,7 +3349,7 @@ Roo.extend(Roo.bootstrap.Navbar, Roo.bootstrap.Component,  {
         var mark = {
             tag: "div",
             cls:"x-dlg-mask"
-        }
+        };
         
         this.maskEl = Roo.DomHelper.append(this.el, mark, true);
         
@@ -3764,7 +3777,7 @@ Roo.extend(Roo.bootstrap.NavGroup, Roo.bootstrap.Component,  {
         cfg = {
             tag : 'ul',
             cls: 'nav' 
-        }
+        };
         
         if (['tabs','pills'].indexOf(this.type)!==-1) {
             cfg.cls += ' nav-' + this.type
@@ -3779,7 +3792,7 @@ Roo.extend(Roo.bootstrap.NavGroup, Roo.bootstrap.Component,  {
             cfg = {
                 tag: 'ul',
                 cls: 'dashboard-menu sidebar-menu'
-            }
+            };
             
             return cfg;
         }
@@ -3788,7 +3801,7 @@ Roo.extend(Roo.bootstrap.NavGroup, Roo.bootstrap.Component,  {
             cfg = {
                 tag: 'form',
                 cls: 'navbar-form'
-            }
+            };
             
             if (this.align === 'right') {
                 cfg.cls += ' navbar-right';
@@ -4067,7 +4080,8 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component,  {
             tag: 'li',
             cls: 'nav-item'
             
-        }
+        };
+        
         if (this.active) {
             cfg.cls = typeof(cfg.cls) == 'undefined' ? 'active' : cfg.cls + ' active';
         }
@@ -4283,7 +4297,7 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component,  {
         var options = {
             target : target,
             value : o[1]
-        }
+        };
         
         this.fireEvent('scrollto', this, options, e);
         
@@ -4309,6 +4323,7 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component,  {
  * @class Roo.bootstrap.NavSidebarItem
  * @extends Roo.bootstrap.NavItem
  * Bootstrap Navbar.NavSidebarItem class
+ * {String} badgeWeight (default|primary|success|info|warning|danger)the extra classes for the badge
  * @constructor
  * Create a new Navbar Button
  * @param {Object} config The config object
@@ -4337,6 +4352,7 @@ Roo.bootstrap.NavSidebarItem = function(config){
 
 Roo.extend(Roo.bootstrap.NavSidebarItem, Roo.bootstrap.NavItem,  {
     
+    badgeWeight : 'default',
     
     getAutoCreate : function(){
         
@@ -4352,17 +4368,21 @@ Roo.extend(Roo.bootstrap.NavSidebarItem, Roo.bootstrap.NavItem,  {
             tag: 'li',
             cls: '',
             cn: [ a ]
-        }
+        };
         var span = {
             tag: 'span',
             html : this.html || ''
-        }
+        };
         
         
         if (this.active) {
             cfg.cls += ' active';
         }
         
+        if (this.disabled) {
+            cfg.cls += ' disabled';
+        }
+        
         // left icon..
         if (this.glyphicon || this.icon) {
             var c = this.glyphicon  ? ('glyphicon glyphicon-'+this.glyphicon)  : this.icon;
@@ -4372,7 +4392,8 @@ Roo.extend(Roo.bootstrap.NavSidebarItem, Roo.bootstrap.NavItem,  {
         a.cn.push(span);
         // then badge..
         if (this.badge !== '') {
-            a.cn.push({ tag: 'span',  cls : 'badge pull-right ' + (this.badgecls || ''), html: this.badge }); 
+            
+            a.cn.push({ tag: 'span',  cls : 'badge pull-right badge-' + this.badgeWeight, html: this.badge }); 
         }
         // fi
         if (this.menu) {
@@ -4386,7 +4407,94 @@ Roo.extend(Roo.bootstrap.NavSidebarItem, Roo.bootstrap.NavItem,  {
         return cfg;
          
           
+    },
+    
+    initEvents : function()
+    { 
+        this.el.on('click', this.onClick, this);
+       
+    
+        if(this.badge !== ''){
+            this.badgeEl = this.el.select('.badge', true).first().setVisibilityMode(Roo.Element.DISPLAY);
+        }
+        
+    },
+    
+    onClick : function(e)
+    {
+        if(this.disabled){
+            e.preventDefault();
+            return;
+        }
+        
+        if(this.preventDefault){
+            e.preventDefault();
+        }
+        
+        this.fireEvent('click', this);
+    },
+    
+    disable : function()
+    {
+        this.setDisabled(true);
+    },
+    
+    enable : function()
+    {
+        this.setDisabled(false);
+    },
+    
+    setDisabled : function(state)
+    {
+        if(this.disabled == state){
+            return;
+        }
+        
+        this.disabled = state;
+        
+        if (state) {
+            this.el.addClass('disabled');
+            return;
+        }
+        
+        this.el.removeClass('disabled');
+        
+        return;
+    },
+    
+    setActive : function(state)
+    {
+        if(this.active == state){
+            return;
+        }
+        
+        this.active = state;
+        
+        if (state) {
+            this.el.addClass('active');
+            return;
+        }
+        
+        this.el.removeClass('active');
+        
+        return;
+    },
+    
+    isActive: function () 
+    {
+        return this.active;
+    },
+    
+    setBadge : function(str)
+    {
+        if(!this.badgeEl){
+            return;
+        }
+        
+        this.badgeEl.dom.innerHTML = str;
     }
+    
    
      
  
@@ -4478,7 +4586,7 @@ Roo.extend(Roo.bootstrap.Element, Roo.bootstrap.Component,  {
             tag: this.tag,
             cls: this.cls,
             html: this.html
-        }
+        };
         
         return cfg;
     },
@@ -4698,7 +4806,7 @@ Roo.extend(Roo.bootstrap.Slider, Roo.bootstrap.Component,  {
                     cls: 'ui-slider-handle ui-state-default ui-corner-all'
                 }
             ]
-        }
+        };
         
         return cfg;
     }
@@ -4875,6 +4983,18 @@ Roo.extend(Roo.grid.ColumnModel, Roo.util.Observable, {
     /**
      * @cfg {String} tooltip (Optional)
      */
+    /**
+     * @cfg {Number} xs (Optional)
+     */
+    /**
+     * @cfg {Number} sm (Optional)
+     */
+    /**
+     * @cfg {Number} md (Optional)
+     */
+    /**
+     * @cfg {Number} lg (Optional)
+     */
     /**
      * Returns the id of the column at the specified index.
      * @param {Number} index The column index
@@ -5544,7 +5664,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
             tag: 'table',
             cls : 'table',
             cn : []
-        }
+        };
             
         if (this.striped) {
             cfg.cls += ' table-striped';
@@ -5868,6 +5988,21 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
                 c.cls = (typeof(c.cls) == 'undefined') ? config.cls : (c.cls + ' ' + config.cls);
             }
             
+            ['xs','sm','md','lg'].map(function(size){
+                
+                if(typeof(config[size]) == 'undefined'){
+                    return;
+                }
+                
+                if (!config[size]) { // 0 = hidden
+                    cfg.cls += ' hidden-' + size;
+                    return;
+                }
+                
+                cfg.cls += ' col-' + size + '-' + config[size];
+
+            });
+            
             header.cn.push(c)
         }
         
@@ -6106,7 +6241,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
                 rowIndex : rowIndex,
                 colIndex : i,
                 rowClass : ''
-            }
+            };
 
             this.fireEvent('rowclass', this, rowcfg);
             
@@ -6144,6 +6279,21 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
             if(typeof(config.cls) != 'undefined'){
                 td.cls = (typeof(td.cls) == 'undefined') ? config.cls : (td.cls + ' ' + config.cls);
             }
+            
+            ['xs','sm','md','lg'].map(function(size){
+                
+                if(typeof(config[size]) == 'undefined'){
+                    return;
+                }
+                
+                if (!config[size]) { // 0 = hidden
+                    td.cls += ' hidden-' + size;
+                    return;
+                }
+                
+                td.cls += ' col-' + size + '-' + config[size];
+
+            });
              
             row.cn.push(td);
            
@@ -6212,7 +6362,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
                 var child = {
                     container: t.getChildContainer(),
                     cfg: c
-                }
+                };
                 _this.renderCellObject(child);
             })
         }
@@ -6297,9 +6447,9 @@ Roo.extend(Roo.bootstrap.TableCell, Roo.bootstrap.Component,  {
     getAutoCreate : function(){
         var cfg = Roo.apply({}, Roo.bootstrap.TableCell.superclass.getAutoCreate.call(this));
        
-       cfg = {
-           tag: 'td'
-       }
+        cfg = {
+            tag: 'td'
+        };
         
         if(this.tag){
             cfg.tag = this.tag;
@@ -6398,7 +6548,7 @@ Roo.extend(Roo.bootstrap.TableRow, Roo.bootstrap.Component,  {
        
         cfg = {
             tag: 'tr'
-        }
+        };
             
         if(this.cls){
             cfg.cls = this.cls;
@@ -6462,7 +6612,7 @@ Roo.extend(Roo.bootstrap.TableBody, Roo.bootstrap.Component,  {
        
         cfg = {
             tag: 'tbody'
-        }
+        };
             
         if (this.cls) {
             cfg.cls=this.cls
@@ -6967,7 +7117,7 @@ Roo.extend(Roo.bootstrap.Form, Roo.bootstrap.Component,  {
             method : this.method || 'POST',
             id : this.id || Roo.id(),
             cls : ''
-        }
+        };
         if (this.parent().xtype.match(/^Nav/)) {
             cfg.cls = 'navbar-form navbar-' + this.align;
             
@@ -7489,11 +7639,9 @@ Roo.form.VTypes = function(){
  * @extends Roo.bootstrap.Component
  * Bootstrap Input class
  * @cfg {Boolean} disabled is it disabled
- * @cfg {String} fieldLabel - the label associated
  * @cfg {String} inputType button | checkbox | email | file | hidden | image | number | password | radio | range | reset | search | submit | text
  * @cfg {String} name name of the input
  * @cfg {string} fieldLabel - the label associated
- * @cfg {string}  inputType - input / file submit ...
  * @cfg {string} placeholder - placeholder to put in text.
  * @cfg {string}  before - input group add on before
  * @cfg {string} after - input group add on after
@@ -8187,6 +8335,16 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
         }
         this.el.removeClass(this.invalidClass);
         
+        if(this.hasFeedback && this.inputType != 'hidden' && !this.allowBlank){
+            
+            var feedback = this.el.select('.form-control-feedback', true).first();
+            
+            if(feedback){
+                this.el.select('.form-control-feedback', true).first().removeClass(this.invalidFeedbackClass);
+            }
+            
+        }
+        
         this.fireEvent('valid', this);
     },
     
@@ -8230,7 +8388,8 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
      * Mark this field as invalid
      * @param {String} msg The validation message
      */
-    markInvalid : function(msg){
+    markInvalid : function(msg)
+    {
         if(!this.el  || this.preventMark){ // not rendered
             return;
         }
@@ -11103,6 +11262,7 @@ Roo.extend(Roo.data.ArrayReader, Roo.data.JsonReader, {
  * @cfg {String} btnPosition set the position of the trigger button (left | right) default right
  * @cfg {Boolean} animate default true
  * @cfg {Boolean} emptyResultText only for touch device
+ * @cfg {String} triggerText multiple combobox trigger button text default 'Select'
  * @constructor
  * Create a new ComboBox.
  * @param {Object} config Configuration options
@@ -11393,6 +11553,8 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
     showToggleBtn : true,
     animate : true,
     emptyResultText: 'Empty',
+    triggerText : 'Select',
+    
     // element that contains real text value.. (when hidden is used..)
     
     getAutoCreate : function()
@@ -11434,7 +11596,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
                     tag : 'button',
                     type : 'button',
                     cls : 'btn btn-link btn-edit pull-' + this.btnPosition,
-                    html : 'Edit'
+                    html : this.triggerText
                 },
                 {
                     tag : 'button',
@@ -11495,7 +11657,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
                     ]
                 }
             ]
-        }
+        };
         
         var combobox = {
             cls: 'select2-container input-group select2-container-multi',
@@ -11573,16 +11735,44 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
         
     },
     
+    _initEventsCalled : false,
+    
     // private
     initEvents: function()
     {
         
+        if (this._initEventsCalled) { // as we call render... prevent looping...
+            return;
+        }
+        this._initEventsCalled = true;
+        
         if (!this.store) {
             throw "can not find store for combo";
         }
         
         this.store = Roo.factory(this.store, Roo.data);
         
+        // if we are building from html. then this element is so complex, that we can not really
+        // use the rendered HTML.
+        // so we have to trash and replace the previous code.
+        if (Roo.XComponent.build_from_html) {
+            
+            // remove this element....
+            var e = this.el.dom, k=0;
+            while (e ) { e = e.previousSibling;  ++k;}
+
+            this.el.remove();
+            
+            this.el=false;
+            this.rendered = false;
+            
+            this.render(this.parent().getChildContainer(true), k);
+            
+            
+            
+        }
+        
+        
         /*
          * Touch Devices
          */
@@ -13768,7 +13958,7 @@ Roo.View = function(config, depreciated_tpl, depreciated_config){
            
          var fctr = this.wrapEl.appendChild(document.createElement("div"));
         
-        this.footer.dataSource = this.store
+        this.footer.dataSource = this.store;
         this.footer.container = fctr;
         this.footer = Roo.factory(this.footer, Roo);
         fctr.insertFirst(this.el);
@@ -14611,7 +14801,7 @@ Roo.extend(Roo.bootstrap.Calendar, Roo.bootstrap.Component,  {
                     ]
                 }
             ]
-        }
+        };
         this.maskEl = Roo.DomHelper.append(this.el.select('.fc-content', true).first(), mark, true);
         
         var size = this.el.select('.fc-content', true).first().getSize();
@@ -15160,7 +15350,7 @@ Roo.extend(Roo.bootstrap.Calendar, Roo.bootstrap.Component,  {
             var cfg = {
                 cls : 'fc-event-hori fc-event-draggable',
                 html : m.title
-            }
+            };
             var cg = ctr.createChild(cfg);
             
             cg.on('click', _this.onEventClick, _this, m);
@@ -16138,7 +16328,14 @@ Roo.bootstrap.DateField = function(config){
              * @param {Roo.bootstrap.DateField} this
              * @param {Mixed} date The date value
              */
-            select : true
+            select : true,
+            /**
+             * @event beforeselect
+             * Fires when before select a date.
+             * @param {Roo.bootstrap.DateField} this
+             * @param {Mixed} date The date value
+             */
+            beforeselect : true
         });
 };
 
@@ -16359,7 +16556,7 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
                 tag: 'span',
                 cls: 'month',
                 html: Roo.bootstrap.DateField.dates[this.language].monthsShort[i++]
-            }
+            };
             
             months.createChild(month);
         }
@@ -16636,28 +16833,25 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
 
     setValue: function(v)
     {
+        if(this.fireEvent('beforeselect', this, v) !== false){
+            var d = new Date(this.parseDate(v) ).clearTime();
         
-        // v can be a string or a date..
-        
-        
-        var d = new Date(this.parseDate(v) ).clearTime();
-        
-        if(isNaN(d.getTime())){
-            this.date = this.viewDate = '';
-            Roo.bootstrap.DateField.superclass.setValue.call(this, '');
-            return;
-        }
-        
-        v = this.formatDate(d);
-        
-        Roo.bootstrap.DateField.superclass.setValue.call(this, v);
-        
-        this.date = new Date(d.getTime() - d.getTimezoneOffset()*60000);
-     
-        this.update();
+            if(isNaN(d.getTime())){
+                this.date = this.viewDate = '';
+                Roo.bootstrap.DateField.superclass.setValue.call(this, '');
+                return;
+            }
 
-        this.fireEvent('select', this, this.date);
-        
+            v = this.formatDate(d);
+
+            Roo.bootstrap.DateField.superclass.setValue.call(this, v);
+
+            this.date = new Date(d.getTime() - d.getTimezoneOffset()*60000);
+
+            this.update();
+
+            this.fireEvent('select', this, this.date);
+        }
     },
     
     getValue: function()
@@ -17809,7 +18003,7 @@ Roo.extend(Roo.bootstrap.MonthField, Roo.bootstrap.Input,  {
                 tag: 'span',
                 cls: 'month',
                 html: Roo.bootstrap.MonthField.dates[this.language].monthsShort[i++]
-            }
+            };
             
             months.createChild(month);
         }
@@ -18224,7 +18418,7 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input,  {
                 //'for': id, // box label is handled by onclick - so no for...
                 cls: 'box-label',
                 html: this.boxLabel
-            }
+            };
             
             if(this.tooltip){
                 boxLabelCfg.tooltip = this.tooltip;
@@ -22044,7 +22238,7 @@ Roo.extend(Roo.bootstrap.MessageBar, Roo.bootstrap.Component,  {
                     html: this.html || ''
                 }
             ]
-        }
+        };
         
         if(this.fixed){
             cfg.cls += ' alert-messages-fixed';
@@ -22207,7 +22401,7 @@ Roo.extend(Roo.bootstrap.Graph, Roo.bootstrap.Component,  {
         var cfg = {
             tag: 'div',
             html : null
-        }
+        };
         
         
         return  cfg;
@@ -22389,7 +22583,7 @@ Roo.extend(Roo.bootstrap.dash.NumberBox, Roo.bootstrap.Component,  {
                     ]
                 }
             ]
-        }
+        };
         
         if(this.icon){
             cfg.cn.push({
@@ -22550,7 +22744,7 @@ Roo.extend(Roo.bootstrap.dash.TabBox, Roo.bootstrap.Component,  {
                         ]
                     }
                 ]
-            }
+            };
         }
         
         var cfg = {
@@ -22564,7 +22758,7 @@ Roo.extend(Roo.bootstrap.dash.TabBox, Roo.bootstrap.Component,  {
                     cn: []
                 }
             ]
-        }
+        };
 
         return  cfg;
     },
@@ -22704,7 +22898,7 @@ Roo.extend(Roo.bootstrap.dash.TabPane, Roo.bootstrap.Component,  {
         var cfg = {
             tag: 'div',
             cls: 'tab-pane'
-        }
+        };
         
         if(this.active){
             cfg.cls += ' active';
@@ -23558,7 +23752,13 @@ Roo.bootstrap.LocationPicker = function(config){
          * Fires when OverlayView Draw
          * @param {Roo.bootstrap.LocationPicker} this
          */
-        OverlayViewHide : true
+        OverlayViewHide : true,
+        /**
+         * @event loadexception
+         * Fires when load google lib failed.
+         * @param {Roo.bootstrap.LocationPicker} this
+         */
+        loadexception : true
     });
         
 };
@@ -23606,6 +23806,11 @@ Roo.extend(Roo.bootstrap.LocationPicker, Roo.bootstrap.Component,  {
     
     initial: function()
     {
+        if(typeof(google) == 'undefined' || typeof(google.maps) == 'undefined'){
+            this.fireEvent('loadexception', this);
+            return;
+        }
+        
         if(!this.mapTypeId){
             this.mapTypeId = google.maps.MapTypeId.ROADMAP;
         }
@@ -23693,7 +23898,7 @@ Roo.extend(Roo.bootstrap.LocationPicker, Roo.bootstrap.Component,  {
     
     getGmapContext: function() 
     {
-        return this.gMapContext
+        return (typeof(this.gMapContext) == 'undefined') ? false : this.gMapContext;
     },
     
     GMapContext: function() 
@@ -24003,7 +24208,7 @@ Roo.extend(Roo.bootstrap.Alert, Roo.bootstrap.Component,  {
             this.el.select('.roo-alert-icon',true).first().removeClass(['fa', 'fa-' + this.faicon]);
         }
         
-        this.faicon = icon
+        this.faicon = icon;
         
         this.el.select('.roo-alert-icon',true).first().addClass(['fa', 'fa-' + this.faicon]);
     },
@@ -24039,6 +24244,8 @@ Roo.extend(Roo.bootstrap.Alert, Roo.bootstrap.Component,  {
  * @cfg {String} url action url
  * @cfg {String} paramName default 'imageUpload'
  * @cfg {String} method default POST
+ * @cfg {Boolean} loadMask (true|false) default true
+ * @cfg {Boolean} loadingText default 'Loading...'
  * 
  * @constructor
  * Create a new UploadCropbox
@@ -24171,6 +24378,9 @@ Roo.extend(Roo.bootstrap.UploadCropbox, Roo.bootstrap.Component,  {
     isDocument : false,
     method : 'POST',
     paramName : 'imageUpload',
+    loadMask : true,
+    loadingText : 'Loading...',
+    maskEl : false,
     
     getAutoCreate : function()
     {
@@ -24237,6 +24447,10 @@ Roo.extend(Roo.bootstrap.UploadCropbox, Roo.bootstrap.Component,  {
                 
             }, this);
         }
+        
+        if(this.loadMask){
+            this.maskEl = this.el;
+        }
     },
     
     initEvents : function()
@@ -24249,7 +24463,6 @@ Roo.extend(Roo.bootstrap.UploadCropbox, Roo.bootstrap.Component,  {
         this.bodyEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay = 'block';
         
         this.selectorEl = this.el.select('.roo-upload-cropbox-selector', true).first();
-        this.selectorEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay = 'block';
         this.selectorEl.hide();
         
         this.previewEl = this.el.select('.roo-upload-cropbox-preview', true).first();
@@ -24435,6 +24648,10 @@ Roo.extend(Roo.bootstrap.UploadCropbox, Roo.bootstrap.Component,  {
         
         this.canvasLoaded = true;
         
+        if(this.loadMask){
+            this.maskEl.unmask();
+        }
+        
     },
     
     setCanvasPosition : function()
@@ -25236,6 +25453,10 @@ Roo.extend(Roo.bootstrap.UploadCropbox, Roo.bootstrap.Component,  {
     
     process : function(file, crop)
     {
+        if(this.loadMask){
+            this.maskEl.mask(this.loadingText);
+        }
+        
         this.xhr = new XMLHttpRequest();
         
         file.xhr = this.xhr;
@@ -25294,6 +25515,10 @@ Roo.extend(Roo.bootstrap.UploadCropbox, Roo.bootstrap.Component,  {
     
     xhrOnLoad : function(xhr)
     {
+        if(this.loadMask){
+            this.maskEl.unmask();
+        }
+        
         if (xhr.readyState !== 4) {
             this.fireEvent('exception', this, xhr);
             return;
@@ -25314,6 +25539,10 @@ Roo.extend(Roo.bootstrap.UploadCropbox, Roo.bootstrap.Component,  {
     
     xhrOnError : function()
     {
+        if(this.loadMask){
+            this.maskEl.unmask();
+        }
+        
         Roo.log('xhr on error');
         
         var response = Roo.decode(xhr.responseText);
@@ -25324,6 +25553,10 @@ Roo.extend(Roo.bootstrap.UploadCropbox, Roo.bootstrap.Component,  {
     
     prepare : function(file)
     {   
+        if(this.loadMask){
+            this.maskEl.mask(this.loadingText);
+        }
+        
         this.file = false;
         this.exif = {};
         
@@ -25860,6 +26093,9 @@ Roo.extend(Roo.bootstrap.DocumentManager, Roo.bootstrap.Component,  {
     editable : true,
     delegates : [],
     
+    
+    xhr : false, 
+    
     getAutoCreate : function()
     {   
         var managerWidget = {
@@ -25942,7 +26178,6 @@ Roo.extend(Roo.bootstrap.DocumentManager, Roo.bootstrap.Component,  {
         this.managerEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay = 'block';
         
         this.selectorEl = this.el.select('.roo-document-manager-selector', true).first();
-        this.selectorEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay = 'block';
         this.selectorEl.hide();
         
         if(this.multiple){
@@ -26012,7 +26247,7 @@ Roo.extend(Roo.bootstrap.DocumentManager, Roo.bootstrap.Component,  {
     onUploaderClick : function(e)
     {
         e.preventDefault();
-        
+     
         if(this.fireEvent('beforeselectfile', this) != false){
             this.selectorEl.dom.click();
         }
@@ -26325,7 +26560,10 @@ Roo.extend(Roo.bootstrap.DocumentManager, Roo.bootstrap.Component,  {
     
     uploadCancel : function()
     {
-        this.xhr.abort();
+        if (this.xhr) {
+            this.xhr.abort();
+        }
+        
         
         this.delegates = [];
         
@@ -26642,20 +26880,46 @@ Roo.extend(Roo.bootstrap.NavProgressBar, Roo.bootstrap.Component,  {
     bullets : [],
     barItems : [],
     
-    
     getAutoCreate : function()
     {
         var cfg = Roo.apply({}, Roo.bootstrap.NavProgressBar.superclass.getAutoCreate.call(this));
         
         cfg = {
-            tag : 'ul',
-            cls: 'roo-navigation-bar' 
-        }
+            tag : 'div',
+            cls : 'roo-navigation-bar-group',
+            cn : [
+                {
+                    tag : 'div',
+                    cls : 'roo-navigation-top-bar'
+                },
+                {
+                    tag : 'div',
+                    cls : 'roo-navigation-bullets-bar',
+                    cn : [
+                        {
+                            tag : 'ul',
+                            cls : 'roo-navigation-bar'
+                        }
+                    ]
+                },
+                
+                {
+                    tag : 'div',
+                    cls : 'roo-navigation-bottom-bar'
+                }
+            ]
+            
+        };
         
         return cfg;
         
     },
     
+    initEvents: function() 
+    {
+        
+    },
+    
     onRender : function(ct, position) 
     {
         Roo.bootstrap.NavProgressBar.superclass.onRender.call(this, ct, position);
@@ -26666,6 +26930,8 @@ Roo.extend(Roo.bootstrap.NavProgressBar, Roo.bootstrap.Component,  {
             }, this);
         }
         
+        this.format();
+        
     },
     
     addItem : function(cfg)
@@ -26673,11 +26939,40 @@ Roo.extend(Roo.bootstrap.NavProgressBar, Roo.bootstrap.Component,  {
         var item = new Roo.bootstrap.NavProgressItem(cfg);
         
         item.parentId = this.id;
-        item.render(this.el, null);
+        item.render(this.el.select('.roo-navigation-bar', true).first(), null);
         
-        this.barItems.push(item);
+        if(cfg.html){
+            var top = new Roo.bootstrap.Element({
+                tag : 'div',
+                cls : 'roo-navigation-bar-text'
+            });
+            
+            var bottom = new Roo.bootstrap.Element({
+                tag : 'div',
+                cls : 'roo-navigation-bar-text'
+            });
+            
+            top.onRender(this.el.select('.roo-navigation-top-bar', true).first(), null);
+            bottom.onRender(this.el.select('.roo-navigation-bottom-bar', true).first(), null);
+            
+            var topText = new Roo.bootstrap.Element({
+                tag : 'span',
+                html : (typeof(cfg.position) != 'undefined' && cfg.position == 'top') ? cfg.html : ''
+            });
+            
+            var bottomText = new Roo.bootstrap.Element({
+                tag : 'span',
+                html : (typeof(cfg.position) != 'undefined' && cfg.position == 'top') ? '' : cfg.html
+            });
+            
+            topText.onRender(top.el, null);
+            bottomText.onRender(bottom.el, null);
+            
+            item.topEl = top;
+            item.bottomEl = bottom;
+        }
         
-        this.formatBullets();
+        this.barItems.push(item);
         
         return item;
     },
@@ -26775,17 +27070,20 @@ Roo.extend(Roo.bootstrap.NavProgressBar, Roo.bootstrap.Component,  {
         this.setActiveItem(this.barItems[i-1]);
     },
     
-    formatBullets : function()
+    format : function()
     {
         if(!this.barItems.length){
             return;
         }
-        
+     
         var width = 100 / this.barItems.length;
         
         Roo.each(this.barItems, function(i){
             i.el.setStyle('width', width + '%');
+            i.topEl.el.setStyle('width', width + '%');
+            i.bottomEl.el.setStyle('width', width + '%');
         }, this);
+        
     }
     
 });
@@ -26806,7 +27104,6 @@ Roo.extend(Roo.bootstrap.NavProgressBar, Roo.bootstrap.Component,  {
  * @cfg {String} html
  * @cfg {String} position (top|bottom) text position default bottom
  * @cfg {String} icon show icon instead of number
- * @cfg {Boolean} forceIcon (true|false) true to force show icon..if set to false, Roo.isTouch showing icon, otherwish number
  * 
  * @constructor
  * Create a new NavProgressItem
@@ -26835,15 +27132,12 @@ Roo.extend(Roo.bootstrap.NavProgressItem, Roo.bootstrap.Component,  {
     html : '',
     position : 'bottom',
     icon : false,
-    forceIcon : false,
     
     getAutoCreate : function()
     {
         var iconCls = 'roo-navigation-bar-item-icon';
         
-        if((this.forceIcon && this.icon) || !this.forceIcon && Roo.isTouch){
-            iconCls += ' ' + this.icon;
-        }
+        iconCls += ((this.icon) ? (' ' + this.icon) : (' step-number')) ;
         
         var cfg = {
             tag: 'li',
@@ -26852,14 +27146,9 @@ Roo.extend(Roo.bootstrap.NavProgressItem, Roo.bootstrap.Component,  {
                 {
                     tag : 'i',
                     cls : iconCls
-                },
-                {
-                    tag : 'span',
-                    cls : 'roo-navigation-bar-item-text ' + this.position,
-                    html : this.html
                 }
             ]
-        }
+        };
         
         if(this.active){
             cfg.cls += ' active';
@@ -26884,14 +27173,8 @@ Roo.extend(Roo.bootstrap.NavProgressItem, Roo.bootstrap.Component,  {
     initEvents: function() 
     {
         this.iconEl = this.el.select('.roo-navigation-bar-item-icon', true).first();
-        this.textEl = this.el.select('.roo-navigation-bar-item-text', true).first();
-        
-        if(Roo.isTouch){
-            this.textEl.setVisibilityMode(Roo.Element.DISPLAY).hide();
-        }
         
         this.iconEl.on('click', this.onClick, this);
-        
     },
     
     onClick : function(e)