From: Alan Knowles Date: Wed, 31 Jul 2019 04:16:47 +0000 (+0800) Subject: roojs-ui.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=refs%2Fheads%2Fwip_alan_T5963_white_space_strip_only_on roojs-ui.js roojs-ui-debug.js roojs-all.js roojs-debug.js --- diff --git a/roojs-all.js b/roojs-all.js index c61652e036..2aaf17e559 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -1733,7 +1733,7 @@ if(!this.editable){Roo.get(document).un('keydown',this.listKeyPress,this);}this. },onTriggerClick:function(){if(this.disabled){return;}if(this.isExpanded()){this.collapse();if(!this.blockFocus){this.el.focus();}}else{this.hasFocus=true;if(this.triggerAction=='all'){this.doQuery(this.allQuery,true);}else{this.doQuery(this.getRawValue()); }if(!this.blockFocus){this.el.focus();}}},listKeyPress:function(e){if(e.isSpecialKey()){return false;}var k=String.fromCharCode(e.getKey()).toUpperCase();var A=false;var B=this.view.getSelectedNodes();var C=false;if(B.length){var ix=this.view.indexOf(B[0]); C=this.store.getAt(ix);if(!C.get(this.displayField)||C.get(this.displayField).substring(0,1).toUpperCase()!=k){C=false;}}this.store.each(function(v){if(C){if(C.id==v.id){C=false;}return;}if(v.get(this.displayField)&&v.get(this.displayField).substring(0,1).toUpperCase()==k){A=this.store.indexOf(v); -return false;}},this);if(A===false){return true;}this.view.select(A);var sn=Roo.get(this.view.getSelectedNodes()[0]);sn.scrollIntoView(sn.dom.parentNode,false);},cleanLeadingSpace:function(e){return;}}); +return false;}},this);if(A===false){return true;}this.view.select(A);var sn=Roo.get(this.view.getSelectedNodes()[0]);sn.scrollIntoView(sn.dom.parentNode,false);}}); // Roo/form/ComboBoxArray.js Roo.form.ComboBoxArray=function(A){this.addEvents({'beforeremove':true,'remove':true});Roo.form.ComboBoxArray.superclass.constructor.call(this,A);this.items=new Roo.util.MixedCollection(false);};Roo.extend(Roo.form.ComboBoxArray,Roo.form.TextField,{lastData:false,inputType:'hidden',width:300,name:false,hiddenName:false,items:false,hiddenEl:false,el:false,onRender:function(ct,A){this.combo.hiddenName=this.hiddenName?(this.hiddenName+'-subcombo'):this.hiddenName; this.combo.name=this.name?(this.name+'-subcombo'):this.name;this.combo=Roo.factory(this.combo,Roo.form);this.combo.onRender(ct,A);if(typeof(this.combo.width)!='undefined'){this.combo.onResize(this.combo.width,0);}this.combo.initEvents();this.store=this.combo.store; diff --git a/roojs-debug.js b/roojs-debug.js index 6c28978894..2b3315433b 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -42126,12 +42126,7 @@ Roo.extend(Roo.form.ComboBox, Roo.form.TriggerField, { this.view.select(match); var sn = Roo.get(this.view.getSelectedNodes()[0]); sn.scrollIntoView(sn.dom.parentNode, false); - }, - // @overide - cleanLeadingSpace : function(e) - { - return; - } + } /** * @cfg {Boolean} grow diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index da8ddf49c0..2b80d0bc52 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -19675,12 +19675,7 @@ Roo.extend(Roo.form.ComboBox, Roo.form.TriggerField, { this.view.select(match); var sn = Roo.get(this.view.getSelectedNodes()[0]); sn.scrollIntoView(sn.dom.parentNode, false); - }, - // @overide - cleanLeadingSpace : function(e) - { - return; - } + } /** * @cfg {Boolean} grow diff --git a/roojs-ui.js b/roojs-ui.js index f6effa8bee..945eb216e0 100644 --- a/roojs-ui.js +++ b/roojs-ui.js @@ -864,7 +864,7 @@ if(!this.editable){Roo.get(document).un('keydown',this.listKeyPress,this);}this. },onTriggerClick:function(){if(this.disabled){return;}if(this.isExpanded()){this.collapse();if(!this.blockFocus){this.el.focus();}}else{this.hasFocus=true;if(this.triggerAction=='all'){this.doQuery(this.allQuery,true);}else{this.doQuery(this.getRawValue()); }if(!this.blockFocus){this.el.focus();}}},listKeyPress:function(e){if(e.isSpecialKey()){return false;}var k=String.fromCharCode(e.getKey()).toUpperCase();var A=false;var B=this.view.getSelectedNodes();var C=false;if(B.length){var ix=this.view.indexOf(B[0]); C=this.store.getAt(ix);if(!C.get(this.displayField)||C.get(this.displayField).substring(0,1).toUpperCase()!=k){C=false;}}this.store.each(function(v){if(C){if(C.id==v.id){C=false;}return;}if(v.get(this.displayField)&&v.get(this.displayField).substring(0,1).toUpperCase()==k){A=this.store.indexOf(v); -return false;}},this);if(A===false){return true;}this.view.select(A);var sn=Roo.get(this.view.getSelectedNodes()[0]);sn.scrollIntoView(sn.dom.parentNode,false);},cleanLeadingSpace:function(e){return;}}); +return false;}},this);if(A===false){return true;}this.view.select(A);var sn=Roo.get(this.view.getSelectedNodes()[0]);sn.scrollIntoView(sn.dom.parentNode,false);}}); // Roo/form/ComboBoxArray.js Roo.form.ComboBoxArray=function(A){this.addEvents({'beforeremove':true,'remove':true});Roo.form.ComboBoxArray.superclass.constructor.call(this,A);this.items=new Roo.util.MixedCollection(false);};Roo.extend(Roo.form.ComboBoxArray,Roo.form.TextField,{lastData:false,inputType:'hidden',width:300,name:false,hiddenName:false,items:false,hiddenEl:false,el:false,onRender:function(ct,A){this.combo.hiddenName=this.hiddenName?(this.hiddenName+'-subcombo'):this.hiddenName; this.combo.name=this.name?(this.name+'-subcombo'):this.name;this.combo=Roo.factory(this.combo,Roo.form);this.combo.onRender(ct,A);if(typeof(this.combo.width)!='undefined'){this.combo.onResize(this.combo.width,0);}this.combo.initEvents();this.store=this.combo.store;