Roo/data/JsonReader.js
[roojs1] / roojs-bootstrap-debug.js
index 766173f..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;
-
-
-
-
+        
     }
 
 });
@@ -9365,6 +9363,12 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
         this.fieldLabel = 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;
         }
@@ -12264,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;
 
@@ -20684,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);
         }
@@ -28427,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
         
     });
 };
@@ -28663,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;
         }
         
@@ -29015,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;
         
     },