Roo/bootstrap/RadioItem.js
authoredward <edward@roojs.com>
Fri, 17 Nov 2017 05:32:10 +0000 (13:32 +0800)
committeredward <edward@roojs.com>
Fri, 17 Nov 2017 05:32:10 +0000 (13:32 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/bootstrap/RadioItem.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 70e08c5..5f981ee 100644 (file)
@@ -36,7 +36,7 @@ Roo.extend(Roo.bootstrap.RadioItem, Roo.bootstrap.Component,  {
                         tag : 'input',
                         cls : 'roo-radio roo-radio-set-item-input',
                         type : 'radio',
-                        value : this.value,
+                        value : this.value
                     },
                     {
                         tag : 'label',
index 9df60e4..df64c24 100644 (file)
@@ -7577,14 +7577,41 @@ Roo.extend(Roo.bootstrap.Form, Roo.bootstrap.Component,  {
         var items = this.getItems();
         var valid = true;
         var target = false;
+        var radioSet = [];
+        
         items.each(function(f){
-           if(!f.validate()){
-               valid = false;
-               
-               if(!target){
-                   target = f;
-               }
-           }
+            
+            if(f.xtype == 'RadioItem'){
+                
+                if(radioSet.indexOf(f.parent().name) === -1){
+                    
+                    radioSet.push(f.parent().name);
+                
+                    if(f.parent().validate()){
+                        return;
+                    }
+
+                    valid = false;
+
+                    if(!target){
+                        target = f.parent();
+                    }
+                    
+                }
+                
+                return;
+            }
+            
+            if(f.validate()){
+                return;
+            }
+            
+            valid = false;
+
+            if(!target){
+                target = f;
+            }
+           
         });
         
         if(this.errPopover && !valid){
@@ -7596,8 +7623,6 @@ Roo.extend(Roo.bootstrap.Form, Roo.bootstrap.Component,  {
     
     showErrPopover : function(target)
     {
-        return;
-        
         if(!this.errPopover){
             return;
         }
@@ -12376,6 +12401,16 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
             cls : 'form-group roo-combobox-tickable' //input-group
         };
         
+        var btn_text_select = '';
+        var btn_text_done = '';
+        var btn_text_cancel = '';
+        
+        if (this.btn_text_show) {
+            btn_text_select = 'Select';
+            btn_text_done = 'Done';
+            btn_text_cancel = 'Cancel'; 
+        }
+        
         var buttons = {
             tag : 'div',
             cls : 'tickable-buttons',
@@ -12384,21 +12419,24 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
                     tag : 'button',
                     type : 'button',
                     cls : 'btn btn-link btn-edit pull-' + this.btnPosition,
-                    html : this.triggerText
+                    //html : this.triggerText
+                    html: btn_text_select
                 },
                 {
                     tag : 'button',
                     type : 'button',
                     name : 'ok',
                     cls : 'btn btn-link btn-ok pull-' + this.btnPosition,
-                    html : 'Done'
+                    //html : 'Done'
+                    html: btn_text_done
                 },
                 {
                     tag : 'button',
                     type : 'button',
                     name : 'cancel',
                     cls : 'btn btn-link btn-cancel pull-' + this.btnPosition,
-                    html : 'Cancel'
+                    //html : 'Cancel'
+                    html: btn_text_cancel
                 }
             ]
         };
@@ -32080,6 +32118,303 @@ Roo.extend(Roo.bootstrap.DocumentSlider, Roo.bootstrap.Component,  {
     }
 });
 /*
+ * - LGPL
+ *
+ * RadioSet
+ *
+ *
+ */
+
+/**
+ * @class Roo.bootstrap.RadioSet
+ * @extends Roo.bootstrap.Component
+ * Bootstrap RadioSet class
+ * @cfg {Boolean} disabled (true|false) default false
+ * @cfg {Boolean} allowBlank (true|false) default true
+ * @cfg {String} name name of the radio
+ * @cfg {String} fieldLabel - the label associated
+ * @cfg {String} value default value of the input
+ * @cfg {Number} labelWidth set the width of label (0-12)
+ * @cfg {String} labelAlign (top|left)
+ * @cfg {String} indicatorpos (left|right) default left
+ * @cfg {Boolean} inline (true|false) inline the element (default true)
+ * @cfg {String} weight (primary|warning|info|danger|success) The text that appears beside the radio
+ * @cfg {String} invalidClass The CSS class to use when marking a field invalid
+ * @cfg {String} validClass The CSS class to use when marking a field valid
+ * @constructor
+ * Create a new RadioSet
+ * @param {Object} config The config object
+ */
+
+Roo.bootstrap.RadioSet = function(config){
+    
+    Roo.bootstrap.RadioSet.superclass.constructor.call(this, config);
+
+    this.itmes = [];
+    
+    Roo.bootstrap.RadioSet.register(this);
+    
+};
+
+Roo.extend(Roo.bootstrap.RadioSet, Roo.bootstrap.Component,  {
+
+    items : false,
+    
+    inline : true,
+    
+    name : '',
+    
+    weight : '',
+    
+    fieldLabel : '',
+    
+    disabled : false,
+    
+    allowBlank : true,
+    
+    invalidClass : 'has-warning',
+    
+    validClass : 'has-success',
+    
+    indicatorpos : 'left',
+    
+    getAutoCreate : function()
+    {
+        var label = {
+            tag : 'label',
+            cls : 'roo-radio-set-field-label',
+            cn : [
+                {
+                    tag : 'span',
+                    cls : 'roo-radio-set-field-label-text',
+                    html : this.fieldLabel
+                }
+            ]
+        };
+        
+        if(this.indicatorpos == 'left'){
+            label.cn.unshift({
+                tag : 'i',
+                cls : 'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',
+                tooltip : 'This field is required'
+            });
+        } else {
+            label.cn.push({
+                tag : 'i',
+                cls : 'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',
+                tooltip : 'This field is required'
+            });
+        }
+        
+        var cfg = {
+            tag : 'div',
+            cls : 'roo-radio-set',
+            cn : [
+                label,
+                {
+                    tag : 'div',
+                    cls : 'roo-radio-set-items'
+                }
+            ]
+        };
+        
+        
+        
+        return cfg;
+        
+    },
+
+    initEvents : function()
+    {
+        this.fieldLabelEl = this.el.select('.roo-radio-set-field-label', true).first();
+        this.fieldLabelEl.setVisibilityMode(Roo.Element.DISPLAY);
+        
+        this.itemsEl = this.el.select('.roo-radio-set-items', true).first();
+        this.itemsEl.setVisibilityMode(Roo.Element.DISPLAY);
+        
+        this.indicatorEl = this.el.select('.roo-required-indicator', true).first();
+        this.indicatorEl.setVisibilityMode(Roo.Element.DISPLAY);
+        this.indicatorEl.hide();
+        
+    },
+    
+    getChildContainer : function()
+    {
+        return this.itemsEl;
+    },
+    
+    register : function(item)
+    {
+        this.items.push(item);
+        
+        item.inputEl().attr('name', this.name);
+        
+        if(this.inline){
+            item.el.addClass('radio-inline');
+        }
+        
+    },
+    
+    validate : function()
+    {   
+        var valid = false;
+        
+        Roo.each(this.items, function(i){
+            if(!i.checked){
+                return;
+            }
+            
+            valid = true;
+            return false;
+        });
+        
+        if(this.disabled || this.allowBlank || valid){
+            this.markValid();
+            return true;
+        }
+        
+        this.markInvalid();
+        return false;
+        
+    },
+    
+    markValid : function()
+    {
+        this.indicatorEl.hide();
+        this.el.removeClass([this.invalidClass, this.validClass]);
+        this.el.addClass(this.validClass);
+        
+        this.fireEvent('valid', this);
+    },
+    
+    markInvalid : function(msg)
+    {
+        if(this.allowBlank || this.disabled){
+            return;
+        }
+        
+        this.indicatorEl.show();
+        this.el.removeClass([this.invalidClass, this.validClass]);
+        this.el.addClass(this.invalidClass);
+        
+        this.fireEvent('invalid', this, msg);
+        
+    }
+
+});
+
+Roo.apply(Roo.bootstrap.RadioSet, {
+    
+    groups: {},
+    
+    register : function(set)
+    {
+        this.groups[set.name] = set;
+    },
+    
+    get: function(name) 
+    {
+        if (typeof(this.groups[name]) == 'undefined') {
+            return false;
+        }
+        
+        return this.groups[name] ;
+    }
+    
+});
+/*
+ * - LGPL
+ *
+ * RadioItem
+ * 
+ */
+
+/**
+ * @class Roo.bootstrap.RadioItem
+ * @extends Roo.bootstrap.Component
+ * Bootstrap RadioItem class
+ * @cfg {String} boxLabel - the label associated
+ * @cfg {String} value - the value of radio
+ * 
+ * @constructor
+ * Create a new RadioItem
+ * @param {Object} config The config object
+ */
+Roo.bootstrap.RadioItem = function(config){
+    Roo.bootstrap.RadioItem.superclass.constructor.call(this, config);
+    
+};
+
+Roo.extend(Roo.bootstrap.RadioItem, Roo.bootstrap.Component,  {
+    
+    boxLabel : '',
+    value : '',
+    
+    getAutoCreate : function()
+    {
+        var cfg = {
+                tag : 'div',
+                cls : 'form-group radio roo-radio-set-item',
+                cn : [
+                    {
+                        tag : 'input',
+                        cls : 'roo-radio roo-radio-set-item-input',
+                        type : 'radio',
+                        value : this.value
+                    },
+                    {
+                        tag : 'label',
+                        cls : 'box-label roo-radio-set-item-box-label',
+                        html : this.boxLabel
+                    }
+                ]
+        };
+        
+        return cfg;
+    },
+    
+    initEvents : function() 
+    {
+        this.parent().register(this);
+        
+        this.inputEl().on('click', this.onClick, this);
+        
+        if (this.boxLabel) {
+            this.el.select('.roo-radio-set-item-box-label',true).first().on('click', this.onClick, this);
+        }
+    },
+    
+    inputEl : function()
+    {
+        return this.el.select('.roo-radio-set-item-input', true).first();
+    },
+    
+    onClick : function()
+    {
+        this.setChecked(true);
+    },
+    
+    setChecked : function(state, suppressEvent)
+    {
+        Roo.each(this.parent().items, function(i){
+            i.checked = false;
+            i.inputEl().dom.checked = false; 
+        });
+        
+        this.checked = state;
+        this.inputEl().dom.checked = state;
+
+        if(suppressEvent !== true){
+            this.fireEvent('check', this, state);
+        }
+        
+        this.parent().validate();
+    }
+    
+});
+
+ /*
  * Based on:
  * Ext JS Library 1.1.1
  * Copyright(c) 2006-2007, Ext JS, LLC.
index 0508cba..ee83db0 100644 (file)
@@ -302,20 +302,21 @@ var B=rs.records&&rs.records[0]?rs.records[0].data:null;return {success:rs.succe
 // Roo/bootstrap/Form.js
 Roo.bootstrap.Form=function(A){Roo.bootstrap.Form.superclass.constructor.call(this,A);this.addEvents({clientvalidation:true,beforeaction:true,actionfailed:true,actioncomplete:true});};Roo.extend(Roo.bootstrap.Form,Roo.bootstrap.Component,{method:'POST',timeout:30,align:'left',activeAction:null,waitMsgTarget:false,loadMask:true,errPopover:false,getAutoCreate:function(){var A={tag:'form',method:this.method||'POST',id:this.id||Roo.id(),cls:''}
 ;if(this.parent().xtype.match(/^Nav/)){A.cls='navbar-form navbar-'+this.align;}if(this.labelAlign=='left'){A.cls+=' form-horizontal';}return A;},initEvents:function(){this.el.on('submit',this.onSubmit,this);this.el.on('keypress',function(e){if(e.getCharCode()!=13){return true;
-}if(e.getTarget().nodeName.toLowerCase()==='textarea'){return true;}Roo.log("keypress blocked");e.preventDefault();return false;});},onSubmit:function(e){e.stopEvent();},isValid:function(){var A=this.getItems();var B=true;var C=false;A.each(function(f){if(!f.validate()){B=false;
-if(!C){C=f;}}});if(this.errPopover&&!B){this.showErrPopover(C);}return B;},showErrPopover:function(A){return;if(!this.errPopover){return;}A.inputEl().focus();var B=A.el.getStyle('z-index');A.el.setStyle('z-index',Roo.bootstrap.Modal.zIndex++);A.el.addClass('roo-invalid-outline');
-var C=function(){A.inputEl().un('blur',C);A.inputEl().un('keyup',C);A.el.setStyle('z-index',B);A.el.removeClass('roo-invalid-outline');};A.inputEl().on('blur',C);A.inputEl().on('keyup',C);Roo.log(A.el);Roo.log(A);},isDirty:function(){var A=false;var B=this.getItems();
-B.each(function(f){if(f.isDirty()){A=true;return false;}return true;});return A;},doAction:function(A,B){if(typeof A=='string'){A=new Roo.form.Action.ACTION_TYPES[A](this,B);}if(this.fireEvent('beforeaction',this,A)!==false){this.beforeAction(A);A.run.defer(100,A);
-}return this;},beforeAction:function(A){var o=A.options;if(this.loadMask){this.el.mask(o.waitMsg||"Sending",'x-mask-loading');}},afterAction:function(A,B){this.activeAction=null;var o=A.options;this.el.unmask();if(B){if(o.reset){this.reset();}Roo.callback(o.success,o.scope,[this,A]);
-this.fireEvent('actioncomplete',this,A);}else{if((typeof(A.result)!='undefined')&&(typeof(A.result.errors)!='undefined')&&(typeof(A.result.errors.needs_confirm)!='undefined')){var _t=this;Roo.log("not supported yet");return;}Roo.callback(o.failure,o.scope,[this,A]);
-if(!this.hasListener('actionfailed')){Roo.log("need to add dialog support");}this.fireEvent('actionfailed',this,A);}},findField:function(id){var A=this.getItems();var B=A.get(id);if(!B){A.each(function(f){if(f.isFormField&&(f.dataIndex==id||f.id==id||f.getName()==id)){B=f;
-return false;}return true;});}return B||null;},markInvalid:function(A){if(A instanceof Array){for(var i=0,B=A.length;i<B;i++){var C=A[i];var f=this.findField(C.id);if(f){f.markInvalid(C.msg);}}}else{var D,id;for(id in A){if(typeof A[id]!='function'&&(D=this.findField(id))){D.markInvalid(A[id]);
-}}}return this;},setValues:function(A){if(A instanceof Array){for(var i=0,B=A.length;i<B;i++){var v=A[i];var f=this.findField(v.id);if(f){f.setValue(v.value);if(this.trackResetOnLoad){f.originalValue=f.getValue();}}}}else{var C,id;for(id in A){if(typeof A[id]!='function'&&(C=this.findField(id))){if(C.setFromData&&C.valueField&&C.displayField&&(C.store&&!C.store.isLocal)){var sd={}
-;sd[C.valueField]=typeof(A[C.hiddenName])=='undefined'?'':A[C.hiddenName];sd[C.displayField]=typeof(A[C.name])=='undefined'?'':A[C.name];C.setFromData(sd);}else{C.setValue(A[id]);}if(this.trackResetOnLoad){C.originalValue=C.getValue();}}}}return this;},getValues:function(A){var fs=Roo.lib.Ajax.serializeForm(this.el.dom);
-if(A===true){return fs;}return Roo.urlDecode(fs);},getFieldValues:function(A){var B=this.getItems();var C={};B.each(function(f){if(!f.getName()){return;}var v=f.getValue();if(f.inputType=='radio'){if(typeof(C[f.getName()])=='undefined'){C[f.getName()]='';
-}if(!f.el.dom.checked){return;}v=f.el.dom.value;}if((typeof(v)=='object')&&f.getRawValue){v=f.getRawValue();}if(f.name!=f.getName()){C[f.name]=f.getRawValue();}C[f.getName()]=v;});return C;},clearInvalid:function(){var A=this.getItems();A.each(function(f){f.clearInvalid();
-});return this;},reset:function(){var A=this.getItems();A.each(function(f){f.reset();});Roo.each(this.childForms||[],function(f){f.reset();});return this;},getItems:function(){var r=new Roo.util.MixedCollection(false,function(o){return o.id||(o.id=Roo.id());
-});var A=function(el){if(el.inputEl){r.add(el);}if(!el.items){return;}Roo.each(el.items,function(e){A(e);});};A(this);return r;}});
+}if(e.getTarget().nodeName.toLowerCase()==='textarea'){return true;}Roo.log("keypress blocked");e.preventDefault();return false;});},onSubmit:function(e){e.stopEvent();},isValid:function(){var A=this.getItems();var B=true;var C=false;var D=[];A.each(function(f){if(f.xtype=='RadioItem'){if(D.indexOf(f.parent().name)===-1){D.push(f.parent().name);
+if(f.parent().validate()){return;}B=false;if(!C){C=f.parent();}}return;}if(f.validate()){return;}B=false;if(!C){C=f;}});if(this.errPopover&&!B){this.showErrPopover(C);}return B;},showErrPopover:function(A){if(!this.errPopover){return;}A.inputEl().focus();
+var B=A.el.getStyle('z-index');A.el.setStyle('z-index',Roo.bootstrap.Modal.zIndex++);A.el.addClass('roo-invalid-outline');var C=function(){A.inputEl().un('blur',C);A.inputEl().un('keyup',C);A.el.setStyle('z-index',B);A.el.removeClass('roo-invalid-outline');
+};A.inputEl().on('blur',C);A.inputEl().on('keyup',C);Roo.log(A.el);Roo.log(A);},isDirty:function(){var A=false;var B=this.getItems();B.each(function(f){if(f.isDirty()){A=true;return false;}return true;});return A;},doAction:function(A,B){if(typeof A=='string'){A=new Roo.form.Action.ACTION_TYPES[A](this,B);
+}if(this.fireEvent('beforeaction',this,A)!==false){this.beforeAction(A);A.run.defer(100,A);}return this;},beforeAction:function(A){var o=A.options;if(this.loadMask){this.el.mask(o.waitMsg||"Sending",'x-mask-loading');}},afterAction:function(A,B){this.activeAction=null;
+var o=A.options;this.el.unmask();if(B){if(o.reset){this.reset();}Roo.callback(o.success,o.scope,[this,A]);this.fireEvent('actioncomplete',this,A);}else{if((typeof(A.result)!='undefined')&&(typeof(A.result.errors)!='undefined')&&(typeof(A.result.errors.needs_confirm)!='undefined')){var _t=this;
+Roo.log("not supported yet");return;}Roo.callback(o.failure,o.scope,[this,A]);if(!this.hasListener('actionfailed')){Roo.log("need to add dialog support");}this.fireEvent('actionfailed',this,A);}},findField:function(id){var A=this.getItems();var B=A.get(id);
+if(!B){A.each(function(f){if(f.isFormField&&(f.dataIndex==id||f.id==id||f.getName()==id)){B=f;return false;}return true;});}return B||null;},markInvalid:function(A){if(A instanceof Array){for(var i=0,B=A.length;i<B;i++){var C=A[i];var f=this.findField(C.id);
+if(f){f.markInvalid(C.msg);}}}else{var D,id;for(id in A){if(typeof A[id]!='function'&&(D=this.findField(id))){D.markInvalid(A[id]);}}}return this;},setValues:function(A){if(A instanceof Array){for(var i=0,B=A.length;i<B;i++){var v=A[i];var f=this.findField(v.id);
+if(f){f.setValue(v.value);if(this.trackResetOnLoad){f.originalValue=f.getValue();}}}}else{var C,id;for(id in A){if(typeof A[id]!='function'&&(C=this.findField(id))){if(C.setFromData&&C.valueField&&C.displayField&&(C.store&&!C.store.isLocal)){var sd={};sd[C.valueField]=typeof(A[C.hiddenName])=='undefined'?'':A[C.hiddenName];
+sd[C.displayField]=typeof(A[C.name])=='undefined'?'':A[C.name];C.setFromData(sd);}else{C.setValue(A[id]);}if(this.trackResetOnLoad){C.originalValue=C.getValue();}}}}return this;},getValues:function(A){var fs=Roo.lib.Ajax.serializeForm(this.el.dom);if(A===true){return fs;
+}return Roo.urlDecode(fs);},getFieldValues:function(A){var B=this.getItems();var C={};B.each(function(f){if(!f.getName()){return;}var v=f.getValue();if(f.inputType=='radio'){if(typeof(C[f.getName()])=='undefined'){C[f.getName()]='';}if(!f.el.dom.checked){return;
+}v=f.el.dom.value;}if((typeof(v)=='object')&&f.getRawValue){v=f.getRawValue();}if(f.name!=f.getName()){C[f.name]=f.getRawValue();}C[f.getName()]=v;});return C;},clearInvalid:function(){var A=this.getItems();A.each(function(f){f.clearInvalid();});return this;
+},reset:function(){var A=this.getItems();A.each(function(f){f.reset();});Roo.each(this.childForms||[],function(f){f.reset();});return this;},getItems:function(){var r=new Roo.util.MixedCollection(false,function(o){return o.id||(o.id=Roo.id());});var A=function(el){if(el.inputEl){r.add(el);
+}if(!el.items){return;}Roo.each(el.items,function(e){A(e);});};A(this);return r;}});
 // Roo/form/VTypes.js
 Roo.form.VTypes=function(){var A=/^[a-zA-Z_]+$/;var B=/^[a-zA-Z0-9_]+$/;var C=/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;var D=/(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return {'email':function(v){return C.test(v);
 },'emailText':'This field should be an e-mail address in the format "user@domain.com"','emailMask':/[a-z0-9_\.\-@]/i,'url':function(v){return D.test(v);},'urlText':'This field should be a URL in the format "http:/'+'/www.domain.com"','alpha':function(v){return A.test(v);
@@ -479,13 +480,13 @@ v=f.convert(v);F[f.name]=v;}var H=new B(F,id);H.json=n;D[D.length]=H;}return {re
 Roo.bootstrap.ComboBox=function(A){Roo.bootstrap.ComboBox.superclass.constructor.call(this,A);this.addEvents({'expand':true,'collapse':true,'beforeselect':true,'select':true,'beforequery':true,'add':true,'edit':true,'remove':true,'afterremove':true,'specialfilter':true,'tick':true,'touchviewdisplay':true}
 );this.item=[];this.tickItems=[];this.selectedIndex=-1;if(this.mode=='local'){if(A.queryDelay===undefined){this.queryDelay=10;}if(A.minChars===undefined){this.minChars=0;}}};Roo.extend(Roo.bootstrap.ComboBox,Roo.bootstrap.TriggerField,{listWidth:undefined,displayField:undefined,valueField:undefined,modalTitle:'',hiddenName:undefined,listClass:'',selectedClass:'active',shadow:'sides',listAlign:'tl-bl?',maxHeight:300,triggerAction:'query',minChars:4,typeAhead:false,queryDelay:500,pageSize:0,selectOnFocus:false,queryParam:'query',loadingText:'Loading...',resizable:false,handleHeight:8,editable:true,allQuery:'',mode:'remote',minListWidth:70,forceSelection:false,typeAheadDelay:250,valueNotFoundText:undefined,blockFocus:false,disableClear:false,alwaysQuery:false,multiple:false,invalidClass:"has-warning",validClass:"has-success",specialFilter:false,mobileTouchView:true,useNativeIOS:false,ios_options:false,addicon:false,editicon:false,page:0,hasQuery:false,append:false,loadNext:false,autoFocus:true,tickable:false,btnPosition:'right',triggerList:true,showToggleBtn:true,animate:true,emptyResultText:'Empty',triggerText:'Select',getAutoCreate:function(){var A=false;
 if(Roo.isIOS&&this.useNativeIOS){A=this.getAutoCreateNativeIOS();return A;}if(Roo.isTouch&&this.mobileTouchView){A=this.getAutoCreateTouchView();return A;;}if(!this.tickable){A=Roo.bootstrap.ComboBox.superclass.getAutoCreate.call(this);return A;}var B=this.labelAlign||this.parentLabelAlign();
-A={cls:'form-group roo-combobox-tickable'};var C={tag:'div',cls:'tickable-buttons',cn:[{tag:'button',type:'button',cls:'btn btn-link btn-edit pull-'+this.btnPosition,html:this.triggerText},{tag:'button',type:'button',name:'ok',cls:'btn btn-link btn-ok pull-'+this.btnPosition,html:'Done'}
-,{tag:'button',type:'button',name:'cancel',cls:'btn btn-link btn-cancel pull-'+this.btnPosition,html:'Cancel'}]};if(this.editable){C.cn.unshift({tag:'input',cls:'roo-select2-search-field-input'});}var D=this;Roo.each(C.cn,function(c){if(D.size){c.cls+=' btn-'+D.size;
-}if(D.disabled){c.disabled=true;}});var E={tag:'div',cn:[{tag:'input',type:'hidden',cls:'form-hidden-field'},{tag:'ul',cls:'roo-select2-choices',cn:[{tag:'li',cls:'roo-select2-search-field',cn:[C]}]}]};var F={cls:'roo-select2-container input-group roo-select2-container-multi',cn:[E]}
-;if(this.hasFeedback&&!this.allowBlank){var G={tag:'span',cls:'glyphicon form-control-feedback'};F.cn.push(G);}if(B==='left'&&this.fieldLabel.length&&this.labelWidth){A.cn=[{tag:'i',cls:'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'}
-,{tag:'label','for':id,cls:'control-label col-sm-'+this.labelWidth,html:this.fieldLabel},{cls:"col-sm-"+(12-this.labelWidth),cn:[F]}];if(this.indicatorpos=='right'){A.cn=[{tag:'label','for':id,cls:'control-label col-sm-'+this.labelWidth,html:this.fieldLabel}
-,{tag:'i',cls:'roo-required-indicator right-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'},{cls:"col-sm-"+(12-this.labelWidth),cn:[F]}];}}else if(this.fieldLabel.length){A.cn=[{tag:'i',cls:'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'}
-,{tag:'label',html:this.fieldLabel},F];if(this.indicatorpos=='right'){A.cn=[{tag:'label',html:this.fieldLabel},{tag:'i',cls:'roo-required-indicator right-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'},F];}}else{A=F}var H=this;['xs','sm','md','lg'].map(function(I){if(H[I]){A.cls+=' col-'+I+'-'+H[I];
+A={cls:'form-group roo-combobox-tickable'};var C='';var D='';var E='';if(this.btn_text_show){C='Select';D='Done';E='Cancel';}var F={tag:'div',cls:'tickable-buttons',cn:[{tag:'button',type:'button',cls:'btn btn-link btn-edit pull-'+this.btnPosition,html:C}
+,{tag:'button',type:'button',name:'ok',cls:'btn btn-link btn-ok pull-'+this.btnPosition,html:D},{tag:'button',type:'button',name:'cancel',cls:'btn btn-link btn-cancel pull-'+this.btnPosition,html:E}]};if(this.editable){F.cn.unshift({tag:'input',cls:'roo-select2-search-field-input'}
+);}var G=this;Roo.each(F.cn,function(c){if(G.size){c.cls+=' btn-'+G.size;}if(G.disabled){c.disabled=true;}});var H={tag:'div',cn:[{tag:'input',type:'hidden',cls:'form-hidden-field'},{tag:'ul',cls:'roo-select2-choices',cn:[{tag:'li',cls:'roo-select2-search-field',cn:[F]}
+]}]};var I={cls:'roo-select2-container input-group roo-select2-container-multi',cn:[H]};if(this.hasFeedback&&!this.allowBlank){var J={tag:'span',cls:'glyphicon form-control-feedback'};I.cn.push(J);}if(B==='left'&&this.fieldLabel.length&&this.labelWidth){A.cn=[{tag:'i',cls:'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'}
+,{tag:'label','for':id,cls:'control-label col-sm-'+this.labelWidth,html:this.fieldLabel},{cls:"col-sm-"+(12-this.labelWidth),cn:[I]}];if(this.indicatorpos=='right'){A.cn=[{tag:'label','for':id,cls:'control-label col-sm-'+this.labelWidth,html:this.fieldLabel}
+,{tag:'i',cls:'roo-required-indicator right-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'},{cls:"col-sm-"+(12-this.labelWidth),cn:[I]}];}}else if(this.fieldLabel.length){A.cn=[{tag:'i',cls:'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'}
+,{tag:'label',html:this.fieldLabel},I];if(this.indicatorpos=='right'){A.cn=[{tag:'label',html:this.fieldLabel},{tag:'i',cls:'roo-required-indicator right-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'},I];}}else{A=I}var K=this;['xs','sm','md','lg'].map(function(L){if(K[L]){A.cls+=' col-'+L+'-'+K[L];
 }});return A;},_initEventsCalled:false,initEvents:function(){if(this._initEventsCalled){return;}this._initEventsCalled=true;if(!this.store){throw "can not find store for combo";}this.store=Roo.factory(this.store,Roo.data);if(Roo.XComponent.build_from_html){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);}if(Roo.isIOS&&this.useNativeIOS){this.initIOSView();return;}if(Roo.isTouch&&this.mobileTouchView){this.initTouchView();
 return;}if(this.tickable){this.initTickableEvents();return;}Roo.bootstrap.ComboBox.superclass.initEvents.call(this);if(this.hiddenName){this.hiddenField=this.el.select('input.form-hidden-field',true).first();this.hiddenField.dom.value=this.hiddenValue!==undefined?this.hiddenValue:this.value!==undefined?this.value:'';
@@ -1341,6 +1342,20 @@ this.nextIndicator=this.el.select('.roo-document-slider-next i',true).first();th
 },initial:function(){if(this.files.length){this.indicator=1;this.update()}this.fireEvent('initial',this);},update:function(){this.imageEl.attr('src',this.files[this.indicator-1]);this.titleEl.dom.innerHTML=String.format('{0} / {1}',this.indicator,this.files.length);
 this.prevIndicator.show();if(this.indicator==1){this.prevIndicator.hide();}this.nextIndicator.show();if(this.indicator==this.files.length){this.nextIndicator.hide();}this.thumbEl.scrollTo('top');this.fireEvent('update',this);},onClick:function(e){e.preventDefault();
 this.fireEvent('click',this);},prev:function(e){e.preventDefault();this.indicator=Math.max(1,this.indicator-1);this.update();},next:function(e){e.preventDefault();this.indicator=Math.min(this.files.length,this.indicator+1);this.update();}});
+// Roo/bootstrap/RadioSet.js
+Roo.bootstrap.RadioSet=function(A){Roo.bootstrap.RadioSet.superclass.constructor.call(this,A);this.itmes=[];Roo.bootstrap.RadioSet.register(this);};Roo.extend(Roo.bootstrap.RadioSet,Roo.bootstrap.Component,{items:false,inline:true,name:'',weight:'',fieldLabel:'',disabled:false,allowBlank:true,invalidClass:'has-warning',validClass:'has-success',indicatorpos:'left',getAutoCreate:function(){var A={tag:'label',cls:'roo-radio-set-field-label',cn:[{tag:'span',cls:'roo-radio-set-field-label-text',html:this.fieldLabel}
+]};if(this.indicatorpos=='left'){A.cn.unshift({tag:'i',cls:'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'});}else{A.cn.push({tag:'i',cls:'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'}
+);}var B={tag:'div',cls:'roo-radio-set',cn:[A,{tag:'div',cls:'roo-radio-set-items'}]};return B;},initEvents:function(){this.fieldLabelEl=this.el.select('.roo-radio-set-field-label',true).first();this.fieldLabelEl.setVisibilityMode(Roo.Element.DISPLAY);this.itemsEl=this.el.select('.roo-radio-set-items',true).first();
+this.itemsEl.setVisibilityMode(Roo.Element.DISPLAY);this.indicatorEl=this.el.select('.roo-required-indicator',true).first();this.indicatorEl.setVisibilityMode(Roo.Element.DISPLAY);this.indicatorEl.hide();},getChildContainer:function(){return this.itemsEl;
+},register:function(A){this.items.push(A);A.inputEl().attr('name',this.name);if(this.inline){A.el.addClass('radio-inline');}},validate:function(){var A=false;Roo.each(this.items,function(i){if(!i.checked){return;}A=true;return false;});if(this.disabled||this.allowBlank||A){this.markValid();
+return true;}this.markInvalid();return false;},markValid:function(){this.indicatorEl.hide();this.el.removeClass([this.invalidClass,this.validClass]);this.el.addClass(this.validClass);this.fireEvent('valid',this);},markInvalid:function(A){if(this.allowBlank||this.disabled){return;
+}this.indicatorEl.show();this.el.removeClass([this.invalidClass,this.validClass]);this.el.addClass(this.invalidClass);this.fireEvent('invalid',this,A);}});Roo.apply(Roo.bootstrap.RadioSet,{groups:{},register:function(A){this.groups[A.name]=A;},get:function(A){if(typeof(this.groups[A])=='undefined'){return false;
+}return this.groups[A];}});
+// Roo/bootstrap/RadioItem.js
+Roo.bootstrap.RadioItem=function(A){Roo.bootstrap.RadioItem.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.RadioItem,Roo.bootstrap.Component,{boxLabel:'',value:'',getAutoCreate:function(){var A={tag:'div',cls:'form-group radio roo-radio-set-item',cn:[{tag:'input',cls:'roo-radio roo-radio-set-item-input',type:'radio',value:this.value}
+,{tag:'label',cls:'box-label roo-radio-set-item-box-label',html:this.boxLabel}]};return A;},initEvents:function(){this.parent().register(this);this.inputEl().on('click',this.onClick,this);if(this.boxLabel){this.el.select('.roo-radio-set-item-box-label',true).first().on('click',this.onClick,this);
+}},inputEl:function(){return this.el.select('.roo-radio-set-item-input',true).first();},onClick:function(){this.setChecked(true);},setChecked:function(A,B){Roo.each(this.parent().items,function(i){i.checked=false;i.inputEl().dom.checked=false;});this.checked=A;
+this.inputEl().dom.checked=A;if(B!==true){this.fireEvent('check',this,A);}this.parent().validate();}});
 // Roo/bootstrap/SplitBar.js
 Roo.bootstrap.SplitBar=function(A){this.el=Roo.get(A.dragElement,true);this.el.dom.unselectable="on";this.resizingEl=Roo.get(A.resizingElement,true);this.orientation=A.orientation||Roo.bootstrap.SplitBar.HORIZONTAL;this.minSize=0;this.maxSize=2000;this.animate=false;
 this.useShim=false;this.shim=null;if(!A.existingProxy){this.proxy=Roo.bootstrap.SplitBar.createProxy(this.orientation);}else{this.proxy=Roo.get(A.existingProxy).dom;}this.dd=new Roo.dd.DDProxy(this.el.dom.id,"XSplitBars",{dragElId:this.proxy.id});this.dd.b4StartDrag=this.onStartProxyDrag.createDelegate(this);