From e18e95da20cc29b6ade4fb98a00f73b8065391eb Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 10 Feb 2020 14:31:44 +0800 Subject: [PATCH] roojs-ui.js roojs-ui-debug.js roojs-all.js roojs-debug.js Roo/form/ComboNested.js --- Roo/form/ComboNested.js | 2 +- roojs-all.js | 4 ++-- roojs-debug.js | 7 ++++++- roojs-ui-debug.js | 7 ++++++- roojs-ui.js | 4 ++-- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Roo/form/ComboNested.js b/Roo/form/ComboNested.js index 7f67eedb33..8e2a95b31e 100644 --- a/Roo/form/ComboNested.js +++ b/Roo/form/ComboNested.js @@ -97,7 +97,7 @@ Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, { this.innerLists = []; this.views = []; this.stores = []; - for (var i =0 ; i < 3; i++) { + for (var i =0 ; i < this.maxColumns; i++) { this.onRenderList( cls, i); } diff --git a/roojs-all.js b/roojs-all.js index 2ccbbc18c1..903b860c9a 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -1758,10 +1758,10 @@ this.el.child('div').dom.setAttribute('qtip',String.format('{0}',this.data[this. this.el.child('img').un('click',this.remove,this);this.el.remove();this.cb.updateHiddenEl();this.cb.fireEvent('remove',this.cb,this);}}}); // Roo/form/ComboNested.js Roo.form.ComboNested=function(A){Roo.form.ComboCheck.superclass.constructor.call(this,A);var B=['hiddenName','displayField','valueField'];var _t=this;Roo.each(B,function(e){if((typeof(_t[e])=='undefined')||!_t[e].length){throw "Roo.form.ComboNested : missing value for: "+e; -}});};Roo.extend(Roo.form.ComboNested,Roo.form.ComboBox,{list:null,innerLists:null,views:null,stores:null,onRender:function(ct,A){Roo.form.ComboBox.superclass.onRender.call(this,ct,A);if(this.hiddenName){this.hiddenField=this.el.insertSibling({tag:'input',type:'hidden',name:this.hiddenName,id:(this.hiddenId||this.hiddenName)} +}});};Roo.extend(Roo.form.ComboNested,Roo.form.ComboBox,{maxColumns:3,list:null,innerLists:null,views:null,stores:null,onRender:function(ct,A){Roo.form.ComboBox.superclass.onRender.call(this,ct,A);if(this.hiddenName){this.hiddenField=this.el.insertSibling({tag:'input',type:'hidden',name:this.hiddenName,id:(this.hiddenId||this.hiddenName)} ,'before',true);this.hiddenField.value=this.hiddenValue!==undefined?this.hiddenValue:this.value!==undefined?this.value:'';this.el.dom.removeAttribute('name');}if(Roo.isGecko){this.el.dom.setAttribute('autocomplete','off');}var B='x-combo-list';this.list=new Roo.Layer({shadow:this.shadow,cls:[B,this.listClass].join(' '),constrain:false} );var lw=this.listWidth||Math.max(this.wrap.getWidth(),this.minListWidth);this.list.setWidth(lw);this.list.swallowEvent('mousewheel');this.assetHeight=0;if(this.title){this.header=this.list.createChild({cls:B+'-hd',html:this.title});this.assetHeight+=this.header.getHeight(); -}this.innerLists=[];this.views=[];this.stores=[];for(var i=0;i<3;i++){this.onRenderList(B,i);}this.footer=this.list.createChild({cls:B+'-ft'});this.pageTb=new Roo.Toolbar(this.footer);var C=this;this.pageTb.add({text:'Done',handler:function(){C.collapse(); +}this.innerLists=[];this.views=[];this.stores=[];for(var i=0;i{'+this.displayField+'}',isEmpty:function(D,E){var dl=typeof(D.data)!='undefined'?D.data.length:D.length;return dl?'has-children':'no-children'} diff --git a/roojs-debug.js b/roojs-debug.js index 568cbd11ae..5de47fe2b5 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -42715,6 +42715,11 @@ Roo.form.ComboNested = function(config){ Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, { + /* + * @config {Number} max Number of columns to show + */ + + maxColumns : 3, list : null, // the outermost div.. innerLists : null, // the @@ -42760,7 +42765,7 @@ Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, { this.innerLists = []; this.views = []; this.stores = []; - for (var i =0 ; i < 3; i++) { + for (var i =0 ; i < this.maxColumns; i++) { this.onRenderList( cls, i); } diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index 4aab511eb8..684580f0fe 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -20231,6 +20231,11 @@ Roo.form.ComboNested = function(config){ Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, { + /* + * @config {Number} max Number of columns to show + */ + + maxColumns : 3, list : null, // the outermost div.. innerLists : null, // the @@ -20276,7 +20281,7 @@ Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, { this.innerLists = []; this.views = []; this.stores = []; - for (var i =0 ; i < 3; i++) { + for (var i =0 ; i < this.maxColumns; i++) { this.onRenderList( cls, i); } diff --git a/roojs-ui.js b/roojs-ui.js index fdb862326a..bff4c77653 100644 --- a/roojs-ui.js +++ b/roojs-ui.js @@ -888,10 +888,10 @@ this.el.child('div').dom.setAttribute('qtip',String.format('{0}',this.data[this. this.el.child('img').un('click',this.remove,this);this.el.remove();this.cb.updateHiddenEl();this.cb.fireEvent('remove',this.cb,this);}}}); // Roo/form/ComboNested.js Roo.form.ComboNested=function(A){Roo.form.ComboCheck.superclass.constructor.call(this,A);var B=['hiddenName','displayField','valueField'];var _t=this;Roo.each(B,function(e){if((typeof(_t[e])=='undefined')||!_t[e].length){throw "Roo.form.ComboNested : missing value for: "+e; -}});};Roo.extend(Roo.form.ComboNested,Roo.form.ComboBox,{list:null,innerLists:null,views:null,stores:null,onRender:function(ct,A){Roo.form.ComboBox.superclass.onRender.call(this,ct,A);if(this.hiddenName){this.hiddenField=this.el.insertSibling({tag:'input',type:'hidden',name:this.hiddenName,id:(this.hiddenId||this.hiddenName)} +}});};Roo.extend(Roo.form.ComboNested,Roo.form.ComboBox,{maxColumns:3,list:null,innerLists:null,views:null,stores:null,onRender:function(ct,A){Roo.form.ComboBox.superclass.onRender.call(this,ct,A);if(this.hiddenName){this.hiddenField=this.el.insertSibling({tag:'input',type:'hidden',name:this.hiddenName,id:(this.hiddenId||this.hiddenName)} ,'before',true);this.hiddenField.value=this.hiddenValue!==undefined?this.hiddenValue:this.value!==undefined?this.value:'';this.el.dom.removeAttribute('name');}if(Roo.isGecko){this.el.dom.setAttribute('autocomplete','off');}var B='x-combo-list';this.list=new Roo.Layer({shadow:this.shadow,cls:[B,this.listClass].join(' '),constrain:false} );var lw=this.listWidth||Math.max(this.wrap.getWidth(),this.minListWidth);this.list.setWidth(lw);this.list.swallowEvent('mousewheel');this.assetHeight=0;if(this.title){this.header=this.list.createChild({cls:B+'-hd',html:this.title});this.assetHeight+=this.header.getHeight(); -}this.innerLists=[];this.views=[];this.stores=[];for(var i=0;i<3;i++){this.onRenderList(B,i);}this.footer=this.list.createChild({cls:B+'-ft'});this.pageTb=new Roo.Toolbar(this.footer);var C=this;this.pageTb.add({text:'Done',handler:function(){C.collapse(); +}this.innerLists=[];this.views=[];this.stores=[];for(var i=0;i{'+this.displayField+'}',isEmpty:function(D,E){var dl=typeof(D.data)!='undefined'?D.data.length:D.length;return dl?'has-children':'no-children'} -- 2.39.2