Roo/data/JsonReader.js
[roojs1] / roojs-bootstrap-debug.js
index d34b113..d8e0aea 100644 (file)
@@ -8038,6 +8038,7 @@ clientValidation  Boolean          Applies to submit only.  Pass true to call fo
 
         return this;
     },
+    
     getItems : function()
     {
         var r=new Roo.util.MixedCollection(false, function(o){
@@ -8059,10 +8060,7 @@ clientValidation  Boolean          Applies to submit only.  Pass true to call fo
 
         iter(this);
         return r;
-
-
-
-
+        
     }
 
 });
@@ -9358,11 +9356,24 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
     
     setFieldLabel : function(v)
     {
+        if(!this.rendered){
+            return;
+        }
+        
         this.fieldLabel = v;
         
-        if(this.rendered){
-            this.el.select('label',true).first().dom.innerHTML = (v === null || v === undefined ? '' : v);
+        if(this.indicator){
+            var ar = this.el.select('label > span',true);
+            if (!ar.length) {
+                Roo.log("could not find label > span on element");
+                Roo.log(this);
+                return;
+            }
+            this.el.select('label > span',true).first().dom.innerHTML = (v === null || v === undefined ? '' : v);
+            return;
         }
+        
+        this.el.select('label',true).first().dom.innerHTML = (v === null || v === undefined ? '' : v);
     }
 });
 
@@ -12257,6 +12268,10 @@ Roo.extend(Roo.data.JsonReader, Roo.data.DataReader, {
          * @type Object
          */
         this.o = o;
+        
+        Roo.log('------------------');
+        Roo.log(o);
+        
         var s = this.meta, Record = this.recordType,
             f = Record ? Record.prototype.fields : null, fi = f ? f.items : [], fl = f ? f.length : 0;
 
@@ -20143,7 +20158,13 @@ Roo.bootstrap.CheckBox = function(config){
         * @param {Roo.bootstrap.CheckBox} this This input
         * @param {Boolean} checked The new checked value
         */
-       check : true
+       check : true,
+       /**
+        * @event click
+        * Fires when the element is click.
+        * @param {Roo.bootstrap.CheckBox} this This input
+        */
+       click : true
     });
     
 };
@@ -20188,7 +20209,7 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input,  {
                 tag: 'input',
                 type : 'hidden',
                 cls : 'roo-hidden-value',
-                value : this.checked ? this.valueOff : this.inputValue
+                value : this.checked ? this.inputValue : this.valueOff
             };
         }
         
@@ -20397,9 +20418,12 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input,  {
         }
     },
     
-    onClick : function()
+    onClick : function(e)
     {   
-        this.setChecked(!this.checked);
+        if(this.fireEvent('click', this, e) !== false){
+            this.setChecked(!this.checked);
+        }
+        
     },
     
     setChecked : function(state,suppressEvent)
@@ -20542,6 +20566,15 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input,  {
         
         var r = false;
         
+        for(var i in group){
+            if(group[i].el.isVisible(true)){
+                r = false;
+                break;
+            }
+            
+            r = true;
+        }
+        
         for(var i in group){
             if(r){
                 break;
@@ -20659,7 +20692,7 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input,  {
         
         var label = Roo.bootstrap.FieldLabel.get(this.name + '-group');
         
-        if (label) {
+        if (label && label.iconEl) {
             label.iconEl.removeClass(label.validClass);
             label.iconEl.removeClass(label.invalidClass);
         }
@@ -28402,7 +28435,14 @@ Roo.bootstrap.DocumentManager = function(config){
          * @param {Roo.bootstrap.DocumentManager} this
          * @param {Object} file
          */
-        "process" : true
+        "process" : true,
+        /**
+         * @event previewrendered
+         * Fire when preview rendered
+         * @param {Roo.bootstrap.DocumentManager} this
+         * @param {Object} file
+         */
+        "previewrendered" : true
         
     });
 };
@@ -28638,7 +28678,7 @@ Roo.extend(Roo.bootstrap.DocumentManager, Roo.bootstrap.Component,  {
     {
         this.selectorEl.dom.value = '';
         
-        if(!this.files.length){
+        if(!this.files || !this.files.length){
             return;
         }
         
@@ -28990,6 +29030,8 @@ Roo.extend(Roo.bootstrap.DocumentManager, Roo.bootstrap.Component,  {
         
         image.on('click', this.onClick, this, file);
         
+        this.fireEvent('previewrendered', this, file);
+        
         return file;
         
     },
@@ -29767,6 +29809,11 @@ Roo.extend(Roo.bootstrap.FieldLabel, Roo.bootstrap.Component,  {
         
         this.indicator = this.indicatorEl();
         
+        if(this.indicator){
+            this.indicator.removeClass('visible');
+            this.indicator.addClass('invisible');
+        }
+        
         Roo.bootstrap.FieldLabel.register(this);
     },
     
@@ -33491,7 +33538,7 @@ Roo.extend(Roo.bootstrap.RadioSet, Roo.bootstrap.Input,  {
     
     setValue : function(v, suppressEvent)
     {   
-        if(this.value == v){
+        if(this.value === v){
             return;
         }
         
@@ -39931,7 +39978,8 @@ Roo.extend(Roo.bootstrap.MoneyField, Roo.bootstrap.ComboBox, {
                                     tag : 'input',
                                     cls : 'form-control roo-money-currency-input',
                                     autocomplete: 'new-password',
-                                    readOnly : 1
+                                    readOnly : 1,
+                                    name : this.currencyName
                                 },
                                 {
                                     tag :'span',
@@ -40405,7 +40453,7 @@ Roo.extend(Roo.bootstrap.MoneyField, Roo.bootstrap.ComboBox, {
     
     validate : function()
     {
-        if(this.disabled){
+        if(this.disabled || this.allowBlank){
             this.markValid();
             return true;
         }