Roo/bootstrap/form/MultiLineTag.js
authorleon <leon@roojs.com>
Thu, 2 Nov 2023 06:37:30 +0000 (14:37 +0800)
committerleon <leon@roojs.com>
Thu, 2 Nov 2023 06:37:30 +0000 (14:37 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/bootstrap/form/MultiLineTag.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 1351d58..b347144 100644 (file)
@@ -234,9 +234,6 @@ Roo.extend(Roo.bootstrap.form.MultiLineTag, Roo.bootstrap.form.Input,  {
 
     getChildContainer : function()
     {
-        Roo.log(Roo.select('.roo-multi-line-tag-container', true).elements[0]);
-        Roo.log(this.el);
         return Roo.select('.roo-multi-line-tag-container', true).elements[0];
-        // return this.el;
     }
 });
\ No newline at end of file
index d4dd2ba..b033a7c 100644 (file)
@@ -14962,10 +14962,11 @@ Roo.extend(Roo.bootstrap.form.MultiLineTag, Roo.bootstrap.form.Input,  {
             this.removeTagRow(this.tagRows[0]);
         }
 
+        // empty tag if invalid json
         var arr = [];
 
-        // set new tags
         try {
+            // set new tags
             arr = JSON.parse(json);
         }
         catch {}
@@ -14987,13 +14988,9 @@ Roo.extend(Roo.bootstrap.form.MultiLineTag, Roo.bootstrap.form.Input,  {
 
     getChildContainer : function()
     {
-        Roo.log(Roo.select('.roo-multi-line-tag-container', true).elements[0]);
-        Roo.log(this.el);
         return Roo.select('.roo-multi-line-tag-container', true).elements[0];
-        // return this.el;
     }
-});
-/*
+});/*
  * Based on:
  * Ext JS Library 1.1.1
  * Copyright(c) 2006-2007, Ext JS, LLC.
index 6605df7..add6a8d 100644 (file)
@@ -635,8 +635,7 @@ this.removeBtn=C;this.removeBtn.on('click',function(){A.removeTagRow(E);});}}};t
 }});return A;},removeTagRow:function(A){A.destroy();this.tagRows.splice(this.tagRows.indexOf(A),1);this.fireEvent('change',this,this.getValue(),false);this.showHideRemoveBtn();},showHideRemoveBtn:function(){var A=this;Roo.each(this.tagRows,function(r){r.removeBtn.show();
 if(A.tagRows.length<=A.minimumRow||r.inputCb.getRawValue()==''){r.removeBtn.hide();}});},getValue:function(){var A=this;var B=[];Roo.each(A.tagRows,function(r){var C=r.inputCb.getRawValue();if(C!=''){var D={};D[A.valueField]=r.inputCb.getRawValue();B.push(D);
 }});return JSON.stringify(B);},setValue:function(A){var B=this.tagRows.length;for(var i=0;i<B;i++){this.removeTagRow(this.tagRows[0]);}var C=[];try{C=JSON.parse(A);}catch{}for(var i=0;i<C.length;i++){this.addTagRow();this.tagRows[i].inputCb.setRawValue(C[i][this.valueField]);
-}this.addTagRow();while(this.tagRows.length<this.minimumRow){this.addTagRow();}},getChildContainer:function(){Roo.log(Roo.select('.roo-multi-line-tag-container',true).elements[0]);Roo.log(this.el);return Roo.select('.roo-multi-line-tag-container',true).elements[0];
-}});
+}this.addTagRow();while(this.tagRows.length<this.minimumRow){this.addTagRow();}},getChildContainer:function(){return Roo.select('.roo-multi-line-tag-container',true).elements[0];}});
 // Roo/data/SortTypes.js
 Roo.data.SortTypes={none:function(s){return s;},stripTagsRE:/<\/?[^>]+>/gi,asText:function(s){return String(s).replace(this.stripTagsRE,"");},asUCText:function(s){return String(s).toUpperCase().replace(this.stripTagsRE,"");},asUCString:function(s){return String(s).toUpperCase();
 },asDate:function(s){if(!s){return 0;}if(s instanceof Date){return s.getTime();}return Date.parse(String(s));},asFloat:function(s){var A=parseFloat(String(s).replace(/,/g,""));if(isNaN(A)){A=0;}return A;},asInt:function(s){var A=parseInt(String(s).replace(/,/g,""));