3 * (C) Alan Knowles 2011
4 * Licence : Roojs - LGPL
9 Roo.onReady(function(){
31 ['DC', 'District of Columbia']
44 ['E', 'Empty states', []],
47 * ================ Form 2 =======================
55 xtype : 'ComboNested',
70 xtype : 'SimpleStore',
71 fields: ['abbr', 'state' , 'cn'],
72 data : sampledata// from states.js
79 emptyText:'Select a state...',
84 Roo.log("changed to " + this.getValue());
91 xtype : 'ComboNested',
94 displayField : 'fullpath',
96 emptyText : 'Category',
97 fieldLabel : 'Category',
98 forceSelection : true,
99 hiddenName : 'supplier_category_id',
102 loadingText : 'Searching',
104 name : 'supplier_category_id_name',
107 queryParam : 'query[fullpath]',
108 selectOnFocus : true,
109 triggerAction : 'all',
114 select : function (combo, record, index)
116 _this.grid.footer.onClick('first');
124 sortInfo : { direction : 'ASC', field: 'fullpath' },
126 beforeload : function (_self, o){
127 o.params = o.params || {};
128 o.params._as_tree = 1;
137 url : '/web.Texon/admin.php/Roo/category.php',
142 xtype : 'JsonReader',
143 fields : [{"name":"id","type":"int"},{"name":"fullpath","type":"string"},'name', 'cn' ],
146 totalProperty : 'total',
159 mform.render('form-ct5');
160 combo = mform.findField('states');
161 cats = mform.findField('supplier_category_id');
163 states : '["AK","AZ"]',
164 states_list : "Alaska, Arizona"