roojs-bootstrap.js
authoredward <edward@roojs.com>
Tue, 17 Apr 2018 08:21:31 +0000 (16:21 +0800)
committeredward <edward@roojs.com>
Tue, 17 Apr 2018 08:21:31 +0000 (16:21 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index 811f642..3413bc1 100644 (file)
@@ -15227,7 +15227,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
         
         if(this.allowBlank) {
             
-            var default_text = '-- SELECT --';
+            var default_text = (this.placeholder.length) ? this.placeholder : '-- SELECT --';
             
             var opt = this.inputEl().createChild({
                 tag: 'option',
@@ -36670,15 +36670,6 @@ panel.load({
         }
     },
     
-    getTitleItem : function()
-    {
-        if(!this.region || !this.region.tabs){
-            return false;
-        }
-        
-        return this.region.tabs.getTab(this.getEl().id);
-    },
-    
     /**
      * Returns true is this panel was configured to be closable
      * @return {Boolean} 
index a0eda45..f519fae 100644 (file)
@@ -616,12 +616,12 @@ if(this.modalTitle.length){D=D-this.touchViewHeaderEl.getHeight();}var E=this.to
 },this);A.select('.roo-combobox-list-group-item-box > input',true).first().attr('checked',true);this.setFromData(r.data);var C=this.closeTriggerEl();if(C){C.show();}this.hideTouchView();this.fireEvent('select',this,r,B);return;}if(this.valueField&&typeof(r.data[this.valueField])!='undefined'&&this.getValue().indexOf(r.data[this.valueField])!=-1){A.select('.roo-combobox-list-group-item-box > input',true).first().dom.removeAttribute('checked');
 this.tickItems.splice(this.tickItems.indexOf(r.data),1);return;}A.select('.roo-combobox-list-group-item-box > input',true).first().attr('checked',true);this.addItem(r.data);this.tickItems.push(r.data);}},getAutoCreateNativeIOS:function(){var A={cls:'form-group'}
 ;var B={tag:'select',cls:'roo-ios-select'};if(this.name){B.name=this.name;}if(this.disabled){B.disabled=true;}var C=this;['xs','sm','md','lg'].map(function(D){if(C[D]){A.cls+=' col-'+D+'-'+C[D];}});A.cn=B;return A;},initIOSView:function(){this.store.on('load',this.onIOSViewLoad,this);
-return;},onIOSViewLoad:function(){if(this.store.getCount()<1){return;}this.clearIOSView();if(this.allowBlank){var A='-- SELECT --';var B=this.inputEl().createChild({tag:'option',value:0,html:A});var o={};o[this.valueField]=0;o[this.displayField]=A;this.ios_options.push({data:o,el:B}
-);}this.store.data.each(function(d,C){var D='';if(this.displayField&&typeof(d.data[this.displayField])!='undefined'){D=d.data[this.displayField];}var E='';if(this.valueField&&typeof(d.data[this.valueField])!='undefined'){E=d.data[this.valueField];}var F={tag:'option',value:E,html:D}
-;if(this.value==d.data[this.valueField]){F['selected']=true;}var G=this.inputEl().createChild(F);this.ios_options.push({data:d.data,el:G});},this);this.inputEl().on('change',function(){this.fireEvent('select',this);},this);},clearIOSView:function(){this.inputEl().dom.innerHTML='';
-this.ios_options=[];},setIOSValue:function(v){this.value=v;if(!this.ios_options){return;}Roo.each(this.ios_options,function(A){A.el.dom.removeAttribute('selected');if(A.data[this.valueField]!=v){return;}A.el.dom.setAttribute('selected',true);},this);}});Roo.apply(Roo.bootstrap.ComboBox,{header:{tag:'div',cls:'modal-header',cn:[{tag:'h4',cls:'modal-title'}
-]},body:{tag:'div',cls:'modal-body',cn:[{tag:'ul',cls:'list-group'}]},listItemRadio:{tag:'li',cls:'list-group-item',cn:[{tag:'span',cls:'roo-combobox-list-group-item-value'},{tag:'div',cls:'roo-combobox-list-group-item-box pull-xs-right radio-inline radio radio-info',cn:[{tag:'input',type:'radio'}
-,{tag:'label'}]}]},listItemCheckbox:{tag:'li',cls:'list-group-item',cn:[{tag:'span',cls:'roo-combobox-list-group-item-value'},{tag:'div',cls:'roo-combobox-list-group-item-box pull-xs-right checkbox-inline checkbox checkbox-info',cn:[{tag:'input',type:'checkbox'}
+return;},onIOSViewLoad:function(){if(this.store.getCount()<1){return;}this.clearIOSView();if(this.allowBlank){var A=(this.placeholder.length)?this.placeholder:'-- SELECT --';var B=this.inputEl().createChild({tag:'option',value:0,html:A});var o={};o[this.valueField]=0;
+o[this.displayField]=A;this.ios_options.push({data:o,el:B});}this.store.data.each(function(d,C){var D='';if(this.displayField&&typeof(d.data[this.displayField])!='undefined'){D=d.data[this.displayField];}var E='';if(this.valueField&&typeof(d.data[this.valueField])!='undefined'){E=d.data[this.valueField];
+}var F={tag:'option',value:E,html:D};if(this.value==d.data[this.valueField]){F['selected']=true;}var G=this.inputEl().createChild(F);this.ios_options.push({data:d.data,el:G});},this);this.inputEl().on('change',function(){this.fireEvent('select',this);},this);
+},clearIOSView:function(){this.inputEl().dom.innerHTML='';this.ios_options=[];},setIOSValue:function(v){this.value=v;if(!this.ios_options){return;}Roo.each(this.ios_options,function(A){A.el.dom.removeAttribute('selected');if(A.data[this.valueField]!=v){return;
+}A.el.dom.setAttribute('selected',true);},this);}});Roo.apply(Roo.bootstrap.ComboBox,{header:{tag:'div',cls:'modal-header',cn:[{tag:'h4',cls:'modal-title'}]},body:{tag:'div',cls:'modal-body',cn:[{tag:'ul',cls:'list-group'}]},listItemRadio:{tag:'li',cls:'list-group-item',cn:[{tag:'span',cls:'roo-combobox-list-group-item-value'}
+,{tag:'div',cls:'roo-combobox-list-group-item-box pull-xs-right radio-inline radio radio-info',cn:[{tag:'input',type:'radio'},{tag:'label'}]}]},listItemCheckbox:{tag:'li',cls:'list-group-item',cn:[{tag:'span',cls:'roo-combobox-list-group-item-value'},{tag:'div',cls:'roo-combobox-list-group-item-box pull-xs-right checkbox-inline checkbox checkbox-info',cn:[{tag:'input',type:'checkbox'}
 ,{tag:'label'}]}]},emptyResult:{tag:'div',cls:'alert alert-danger roo-combobox-touch-view-empty-result'},footer:{tag:'div',cls:'modal-footer',cn:[{tag:'div',cls:'row',cn:[{tag:'div',cls:'col-xs-6 text-left',cn:{tag:'button',cls:'btn btn-danger roo-touch-view-cancel',html:'Cancel'}
 },{tag:'div',cls:'col-xs-6 text-right',cn:{tag:'button',cls:'btn btn-success roo-touch-view-ok',html:'OK'}}]}]}});Roo.apply(Roo.bootstrap.ComboBox,{touchViewTemplate:{tag:'div',cls:'modal fade roo-combobox-touch-view',cn:[{tag:'div',cls:'modal-dialog',style:'position:fixed',cn:[{tag:'div',cls:'modal-content',cn:[Roo.bootstrap.ComboBox.header,Roo.bootstrap.ComboBox.body,Roo.bootstrap.ComboBox.footer]}
 ]}]}});
@@ -1551,9 +1551,8 @@ this.view=Roo.factory(this.view);this.view.render&&this.view.render(false,'');}t
 te.setWidth(A);B-=te.getHeight();}if(this.footer){var te=this.footer.getEl();te.setWidth(A);B-=te.getHeight();}if(this.adjustments){A+=this.adjustments[0];B+=this.adjustments[1];}return {"width":A,"height":B};},setSize:function(A,B){if(this.fitToFrame&&!this.ignoreResize(A,B)){if(this.fitContainer&&this.resizeEl!=this.el){this.el.setSize(A,B);
 }var C=this.adjustForComponents(A,B);this.resizeEl.setSize(this.autoWidth?"auto":C.width,this.autoHeight?"auto":C.height);this.fireEvent('resize',this,C.width,C.height);}},getTitle:function(){if(typeof(this.title)!='object'){return this.title;}var t='';for(var k in this.title){if(!this.title.hasOwnProperty(k)){continue;
 }if(k.indexOf('-')>=0){var s=k.split('-');for(var i=0;i<s.length;i++){t+="<span class='visible-"+s[i]+"'>"+this.title[k]+"</span>";}}else{t+="<span class='visible-"+k+"'>"+this.title[k]+"</span>";}}return t;},setTitle:function(A){this.title=A;if(this.region){this.region.updatePanelTitle(this,A);
-}},getTitleItem:function(){if(!this.region||!this.region.tabs){return false;}return this.region.tabs.getTab(this.getEl().id);},isClosable:function(){return this.closable;},beforeSlide:function(){this.el.clip();this.resizeEl.clip();},afterSlide:function(){this.el.unclip();
-this.resizeEl.unclip();},refresh:function(){if(this.refreshDelegate){this.loaded=false;this.refreshDelegate();}},destroy:function(){this.el.removeAllListeners();var A=document.createElement("span");A.appendChild(this.el.dom);A.innerHTML="";this.el.remove();
-this.el=null;},form:false,view:false,getChildContainer:function(){return this.getEl();}});
+}},isClosable:function(){return this.closable;},beforeSlide:function(){this.el.clip();this.resizeEl.clip();},afterSlide:function(){this.el.unclip();this.resizeEl.unclip();},refresh:function(){if(this.refreshDelegate){this.loaded=false;this.refreshDelegate();
+}},destroy:function(){this.el.removeAllListeners();var A=document.createElement("span");A.appendChild(this.el.dom);A.innerHTML="";this.el.remove();this.el=null;},form:false,view:false,getChildContainer:function(){return this.getEl();}});
 // Roo/bootstrap/panel/Grid.js
 Roo.bootstrap.panel.Grid=function(A){this.wrapper=Roo.DomHelper.append(document.body,{tag:"div",cls:"roo-layout-grid-wrapper roo-layout-inactive-content"},true);A.el=this.wrapper;if(A.container){this.wrapper.setStyle("overflow","hidden");this.wrapper.addClass('roo-grid-container');
 }if(A.toolbar){var B=this.wrapper.createChild();this.toolbar=Roo.factory(A.toolbar);var ti=[];if(A.toolbar.items){ti=A.toolbar.items;delete A.toolbar.items;}var C=[];this.toolbar.render(B);for(var i=0;i<ti.length;i++){C.push(this.toolbar.addxtype(Roo.apply({}