roojs-bootstrap.js
authoredward <edward@roojs.com>
Fri, 17 Nov 2017 09:49:37 +0000 (17:49 +0800)
committeredward <edward@roojs.com>
Fri, 17 Nov 2017 09:49:37 +0000 (17:49 +0800)
roojs-bootstrap-debug.js

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

index df64c24..050a5e8 100644 (file)
@@ -7581,27 +7581,6 @@ Roo.extend(Roo.bootstrap.Form, Roo.bootstrap.Component,  {
         
         items.each(function(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;
             }
@@ -20193,242 +20172,76 @@ Roo.apply(Roo.bootstrap.CheckBox, {
 /*
  * - LGPL
  *
- * Radio
- *
- *
- * not inline
- *<div class="radio">
-  <label>
-    <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
-    Option one is this and that&mdash;be sure to include why it's great
-  </label>
-</div>
- *
- *
- *inline
- *<span>
- *<label class="radio-inline">fieldLabel</label>
- *<label class="radio-inline">
-  <input type="radio" name="inlineRadioOptions" id="inlineRadio1" value="option1"> 1
-</label>
-<span>
- *
- *
+ * RadioItem
+ * 
  */
 
 /**
  * @class Roo.bootstrap.Radio
- * @extends Roo.bootstrap.CheckBox
+ * @extends Roo.bootstrap.Component
  * Bootstrap Radio class
-
+ * @cfg {String} boxLabel - the label associated
+ * @cfg {String} value - the value of radio
+ * 
  * @constructor
  * Create a new Radio
  * @param {Object} config The config object
  */
-
 Roo.bootstrap.Radio = function(config){
     Roo.bootstrap.Radio.superclass.constructor.call(this, config);
-
+    
 };
 
-Roo.extend(Roo.bootstrap.Radio, Roo.bootstrap.CheckBox,  {
-
-    inputType: 'radio',
-    inputValue: '',
-    valueOff: '',
-
+Roo.extend(Roo.bootstrap.Radio, Roo.bootstrap.Component, {
+    
+    boxLabel : '',
+    
+    value : '',
+    
     getAutoCreate : function()
     {
-        var align = (!this.labelAlign) ? this.parentLabelAlign() : this.labelAlign;
-        align = align || 'left'; // default...
-
-
-
-        var id = Roo.id();
-
         var cfg = {
-                tag : this.inline ? 'span' : 'div',
-                cls : 'form-group',
-                cn : []
-        };
-
-        var inline = this.inline ? ' radio-inline' : '';
-
-        var lbl = {
-                tag: 'label' ,
-                // does not need for, as we wrap the input with it..
-                'for' : id,
-                cls : 'control-label box-label' + inline,
-                cn : []
-        };
-        var labelWidth = this.labelWidth ? this.labelWidth *1 : 100;
-
-        var fieldLabel = {
-            tag: 'label' ,
-            //cls : 'control-label' + inline,
-            html : this.fieldLabel,
-            style : 'width:' +  labelWidth  + 'px;line-height:1;vertical-align:bottom;cursor:default;' // should be css really.
-        };
-
-        var input =  {
-            tag: 'input',
-            id : id,
-            type : this.inputType,
-            //value : (!this.checked) ? this.valueOff : this.inputValue,
-            value : this.inputValue,
-            cls : 'roo-radio',
-            placeholder : this.placeholder || '' // ?? needed????
-
-        };
-        if (this.weight) { // Validity check?
-            input.cls += " radio-" + this.weight;
-        }
-        if (this.disabled) {
-            input.disabled=true;
-        }
-
-        if(this.checked){
-            input.checked = this.checked;
-        }
-
-        if (this.name) {
-            input.name = this.name;
-        }
-
-        if (this.size) {
-            input.cls += ' input-' + this.size;
-        }
-
-        //?? can span's inline have a width??
-
-        var settings=this;
-        ['xs','sm','md','lg'].map(function(size){
-            if (settings[size]) {
-                cfg.cls += ' col-' + size + '-' + settings[size];
-            }
-        });
-
-        var inputblock = input;
-
-        if (this.before || this.after) {
-
-            inputblock = {
-                cls : 'input-group',
-                tag : 'span',
-                cn :  []
-            };
-            if (this.before) {
-                inputblock.cn.push({
-                    tag :'span',
-                    cls : 'input-group-addon',
-                    html : this.before
-                });
-            }
-            inputblock.cn.push(input);
-            if (this.after) {
-                inputblock.cn.push({
-                    tag :'span',
-                    cls : 'input-group-addon',
-                    html : this.after
-                });
-            }
-
-        };
-
-
-        if (this.fieldLabel && this.fieldLabel.length) {
-            cfg.cn.push(fieldLabel);
-        }
-
-        // normal bootstrap puts the input inside the label.
-        // however with our styled version - it has to go after the input.
-
-        //lbl.cn.push(inputblock);
-
-        var lblwrap =  {
-            tag: 'span',
-            cls: 'radio' + inline,
-            cn: [
-                inputblock,
-                lbl
+            tag : 'div',
+            cls : 'form-group radio',
+            cn : [
+                {
+                    tag : 'label',
+                    cls : 'box-label',
+                    html : this.boxLabel
+                }
             ]
         };
-
-        cfg.cn.push( lblwrap);
-
-        if(this.boxLabel){
-            lbl.cn.push({
-                tag: 'span',
-                html: this.boxLabel
-            })
-        }
-
-
+        
         return cfg;
-
-    },
-
-    initEvents : function()
-    {
-//        Roo.bootstrap.CheckBox.superclass.initEvents.call(this);
-
-        this.inputEl().on('click', this.onClick,  this);
-        if (this.boxLabel) {
-            //Roo.log('find label');
-            this.el.select('span.radio label span',true).first().on('click', this.onClick,  this);
-        }
-
     },
-
-    inputEl: function ()
+    
+    initEvents : function() 
     {
-        return this.el.select('input.roo-radio',true).first();
+        this.parent().register(this);
+        
+        this.el.on('click', this.onClick, this);
+        
     },
+    
     onClick : function()
     {
-        Roo.log("click");
         this.setChecked(true);
     },
-
-    setChecked : function(state,suppressEvent)
+    
+    setChecked : function(state, suppressEvent)
     {
-        if(state){
-            Roo.each(this.inputEl().up('form').select('input[name='+this.inputEl().dom.name+']', true).elements, function(v){
-                v.dom.checked = false;
-            });
-        }
-        this.checked = state;
-        this.inputEl().dom.checked = state;
-
+        this.parent().setValue(this.value);
+        
         if(suppressEvent !== true){
             this.fireEvent('check', this, state);
         }
-        //this.inputEl().dom.value = state ? this.inputValue : this.valueOff;
-        this.validate()
-    },
-
-    getGroupValue : function()
-    {
-        var value = '';
-        Roo.each(this.inputEl().up('form').select('input[name='+this.inputEl().dom.name+']', true).elements, function(v){
-            if(v.dom.checked == true){
-                value = v.dom.value;
-            }
-        });
-
-        return value;
-    },
-
-    /**
-     * Returns the normalized data value (undefined or emptyText will be returned as '').  To return the raw value see {@link #getRawValue}.
-     * @return {Mixed} value The field value
-     */
-    getValue : function(){
-        return this.getGroupValue();
+        
     }
-
+    
 });
-//<script type="text/javascript">
+
+ //<script type="text/javascript">
 
 /*
  * Based  Ext JS Library 1.1.1
@@ -32127,20 +31940,11 @@ Roo.extend(Roo.bootstrap.DocumentSlider, Roo.bootstrap.Component,  {
 
 /**
  * @class Roo.bootstrap.RadioSet
- * @extends Roo.bootstrap.Component
+ * @extends Roo.bootstrap.Input
  * 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
@@ -32150,43 +31954,32 @@ Roo.bootstrap.RadioSet = function(config){
     
     Roo.bootstrap.RadioSet.superclass.constructor.call(this, config);
 
-    this.itmes = [];
+    this.radioes = [];
     
     Roo.bootstrap.RadioSet.register(this);
     
 };
 
-Roo.extend(Roo.bootstrap.RadioSet, Roo.bootstrap.Component,  {
+Roo.extend(Roo.bootstrap.RadioSet, Roo.bootstrap.Input,  {
 
-    items : false,
+    radioes : 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',
+            cls : 'roo-radio-set-label',
             cn : [
                 {
                     tag : 'span',
-                    cls : 'roo-radio-set-field-label-text',
                     html : this.fieldLabel
                 }
             ]
@@ -32201,24 +31994,49 @@ Roo.extend(Roo.bootstrap.RadioSet, Roo.bootstrap.Component,  {
         } else {
             label.cn.push({
                 tag : 'i',
-                cls : 'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',
+                cls : 'roo-required-indicator right-indicator text-danger fa fa-lg fa-star',
                 tooltip : 'This field is required'
             });
         }
         
+        var items = {
+            tag : 'div',
+            cls : 'roo-radio-set-items'
+        };
+        
+        var align = (!this.labelAlign) ? this.parentLabelAlign() : this.labelAlign;
+        
+        if (align === 'left' && this.fieldLabel.length) {
+            
+            label.cls += ' col-md-' + this.labelWidth;
+            
+            items = {
+                cls : "col-md-" + (12 - this.labelWidth), 
+                cn: [
+                    items
+                ]
+            };
+        }
+        
         var cfg = {
             tag : 'div',
             cls : 'roo-radio-set',
             cn : [
-                label,
                 {
-                    tag : 'div',
-                    cls : 'roo-radio-set-items'
-                }
+                    tag : 'input',
+                    cls : 'roo-radio-set-input',
+                    type : 'hidden',
+                    name : this.name,
+                    value : this.value ? this.value :  ''
+                },
+                label,
+                items
             ]
         };
         
-        
+        if(this.inline) {
+            cfg.cls += ' roo-radio-set-inline';
+        }
         
         return cfg;
         
@@ -32226,18 +32044,20 @@ Roo.extend(Roo.bootstrap.RadioSet, Roo.bootstrap.Component,  {
 
     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();
+        this.indicatorEl().hide();
+        
+        this.originalValue = this.getValue();
         
     },
     
+    inputEl: function ()
+    {
+        return this.el.select('.roo-radio-set-input', true).first();
+    },
+    
     getChildContainer : function()
     {
         return this.itemsEl;
@@ -32245,9 +32065,7 @@ Roo.extend(Roo.bootstrap.RadioSet, Roo.bootstrap.Component,  {
     
     register : function(item)
     {
-        this.items.push(item);
-        
-        item.inputEl().attr('name', this.name);
+        this.radioes.push(item);
         
         if(this.inline){
             item.el.addClass('radio-inline');
@@ -32259,7 +32077,7 @@ Roo.extend(Roo.bootstrap.RadioSet, Roo.bootstrap.Component,  {
     {   
         var valid = false;
         
-        Roo.each(this.items, function(i){
+        Roo.each(this.radioes, function(i){
             if(!i.checked){
                 return;
             }
@@ -32280,7 +32098,7 @@ Roo.extend(Roo.bootstrap.RadioSet, Roo.bootstrap.Component,  {
     
     markValid : function()
     {
-        this.indicatorEl.hide();
+        this.indicatorEl().hide();
         this.el.removeClass([this.invalidClass, this.validClass]);
         this.el.addClass(this.validClass);
         
@@ -32293,14 +32111,32 @@ Roo.extend(Roo.bootstrap.RadioSet, Roo.bootstrap.Component,  {
             return;
         }
         
-        this.indicatorEl.show();
+        this.indicatorEl().show();
         this.el.removeClass([this.invalidClass, this.validClass]);
         this.el.addClass(this.invalidClass);
         
         this.fireEvent('invalid', this, msg);
         
+    },
+    
+    setValue : function(v)
+    {
+        Roo.each(this.radioes, function(i){
+            
+            i.checked = false;
+            i.el.removeClass('checked');
+            
+            if(i.value == v){
+                i.checked = true;
+                i.el.addClass('checked');
+            }
+            
+        }, this);
+        
+        Roo.bootstrap.RadioSet.superclass.setValue.call(this)
+        
     }
-
+    
 });
 
 Roo.apply(Roo.bootstrap.RadioSet, {
@@ -32323,98 +32159,6 @@ Roo.apply(Roo.bootstrap.RadioSet, {
     
 });
 /*
- * - 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 ee83db0..a4c852c 100644 (file)
@@ -302,21 +302,20 @@ 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;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;}});
+}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.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);
@@ -831,15 +830,9 @@ return;}var A=this;if(this.rendered){Roo.each(this.el.up('form').select('input[n
 e.dom.disabled=false;});}this.disabled=false;this.fireEvent("enable",this);return this;}});Roo.apply(Roo.bootstrap.CheckBox,{groups:{},register:function(A){if(typeof(this.groups[A.groupId])=='undefined'){this.groups[A.groupId]={};}if(this.groups[A.groupId].hasOwnProperty(A.name)){return;
 }this.groups[A.groupId][A.name]=A;},get:function(A){if(typeof(this.groups[A])=='undefined'){return false;}return this.groups[A];}});
 // Roo/bootstrap/Radio.js
-Roo.bootstrap.Radio=function(A){Roo.bootstrap.Radio.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Radio,Roo.bootstrap.CheckBox,{inputType:'radio',inputValue:'',valueOff:'',getAutoCreate:function(){var A=(!this.labelAlign)?this.parentLabelAlign():this.labelAlign;
-A=A||'left';var id=Roo.id();var B={tag:this.inline?'span':'div',cls:'form-group',cn:[]};var C=this.inline?' radio-inline':'';var D={tag:'label','for':id,cls:'control-label box-label'+C,cn:[]};var E=this.labelWidth?this.labelWidth*1:100;var F={tag:'label',html:this.fieldLabel,style:'width:'+E+'px;line-height:1;vertical-align:bottom;cursor:default;'}
-;var G={tag:'input',id:id,type:this.inputType,value:this.inputValue,cls:'roo-radio',placeholder:this.placeholder||''};if(this.weight){G.cls+=" radio-"+this.weight;}if(this.disabled){G.disabled=true;}if(this.checked){G.checked=this.checked;}if(this.name){G.name=this.name;
-}if(this.size){G.cls+=' input-'+this.size;}var H=this;['xs','sm','md','lg'].map(function(K){if(H[K]){B.cls+=' col-'+K+'-'+H[K];}});var I=G;if(this.before||this.after){I={cls:'input-group',tag:'span',cn:[]};if(this.before){I.cn.push({tag:'span',cls:'input-group-addon',html:this.before}
-);}I.cn.push(G);if(this.after){I.cn.push({tag:'span',cls:'input-group-addon',html:this.after});}};if(this.fieldLabel&&this.fieldLabel.length){B.cn.push(F);}var J={tag:'span',cls:'radio'+C,cn:[I,D]};B.cn.push(J);if(this.boxLabel){D.cn.push({tag:'span',html:this.boxLabel}
-)}return B;},initEvents:function(){this.inputEl().on('click',this.onClick,this);if(this.boxLabel){this.el.select('span.radio label span',true).first().on('click',this.onClick,this);}},inputEl:function(){return this.el.select('input.roo-radio',true).first();
-},onClick:function(){Roo.log("click");this.setChecked(true);},setChecked:function(A,B){if(A){Roo.each(this.inputEl().up('form').select('input[name='+this.inputEl().dom.name+']',true).elements,function(v){v.dom.checked=false;});}this.checked=A;this.inputEl().dom.checked=A;
-if(B!==true){this.fireEvent('check',this,A);}this.validate()},getGroupValue:function(){var A='';Roo.each(this.inputEl().up('form').select('input[name='+this.inputEl().dom.name+']',true).elements,function(v){if(v.dom.checked==true){A=v.dom.value;}});return A;
-},getValue:function(){return this.getGroupValue();}});
+Roo.bootstrap.Radio=function(A){Roo.bootstrap.Radio.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Radio,Roo.bootstrap.Component,{boxLabel:'',value:'',getAutoCreate:function(){var A={tag:'div',cls:'form-group radio',cn:[{tag:'label',cls:'box-label',html:this.boxLabel}
+]};return A;},initEvents:function(){this.parent().register(this);this.el.on('click',this.onClick,this);},onClick:function(){this.setChecked(true);},setChecked:function(A,B){this.parent().setValue(this.value);if(B!==true){this.fireEvent('check',this,A);}}}
+);
 // Roo/HtmlEditorCore.js
 Roo.HtmlEditorCore=function(A){Roo.HtmlEditorCore.superclass.constructor.call(this,A);this.addEvents({initialize:true,activate:true,beforesync:true,beforepush:true,sync:true,push:true,editorevent:true});this.applyBlacklists();};Roo.extend(Roo.HtmlEditorCore,Roo.Component,{owner:false,resizable:false,height:300,width:500,stylesheets:false,frameId:false,validationEvent:false,deferHeight:true,initialized:false,activated:false,sourceEditMode:false,onFocus:Roo.emptyFn,iframePad:3,hideMode:'offsets',clearUp:true,black:false,white:false,getDocMarkup:function(){var st='';
 if(this.stylesheets===false){Roo.get(document.head).select('style').each(function(A){st+=A.dom.outerHTML||new XMLSerializer().serializeToString(A.dom);});Roo.get(document.head).select('link').each(function(A){st+=A.dom.outerHTML||new XMLSerializer().serializeToString(A.dom);
@@ -1343,19 +1336,15 @@ this.nextIndicator=this.el.select('.roo-document-slider-next i',true).first();th
 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.RadioSet=function(A){Roo.bootstrap.RadioSet.superclass.constructor.call(this,A);this.radioes=[];Roo.bootstrap.RadioSet.register(this);};Roo.extend(Roo.bootstrap.RadioSet,Roo.bootstrap.Input,{radioes:false,inline:true,weight:'',fieldLabel:'',indicatorpos:'left',getAutoCreate:function(){var A={tag:'label',cls:'roo-radio-set-label',cn:[{tag:'span',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 right-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'}
+);}var B={tag:'div',cls:'roo-radio-set-items'};var C=(!this.labelAlign)?this.parentLabelAlign():this.labelAlign;if(C==='left'&&this.fieldLabel.length){A.cls+=' col-md-'+this.labelWidth;B={cls:"col-md-"+(12-this.labelWidth),cn:[B]};}var D={tag:'div',cls:'roo-radio-set',cn:[{tag:'input',cls:'roo-radio-set-input',type:'hidden',name:this.name,value:this.value?this.value:''}
+,A,B]};if(this.inline){D.cls+=' roo-radio-set-inline';}return D;},initEvents:function(){this.itemsEl=this.el.select('.roo-radio-set-items',true).first();this.itemsEl.setVisibilityMode(Roo.Element.DISPLAY);this.indicatorEl().hide();this.originalValue=this.getValue();
+},inputEl:function(){return this.el.select('.roo-radio-set-input',true).first();},getChildContainer:function(){return this.itemsEl;},register:function(A){this.radioes.push(A);if(this.inline){A.el.addClass('radio-inline');}},validate:function(){var A=false;
+Roo.each(this.radioes,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);
+},setValue:function(v){Roo.each(this.radioes,function(i){i.checked=false;i.el.removeClass('checked');if(i.value==v){i.checked=true;i.el.addClass('checked');}},this);Roo.bootstrap.RadioSet.superclass.setValue.call(this)}});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/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);