xns: Roo,
closable : false,
collapsible : false,
- height : 140,
+ height : 120,
+ modal : true,
resizable : false,
- title : "Edit / Create builder_part",
+ title : "Edit / Create Part",
width : 450,
items : [
{
actioncomplete : function(_self,action)
{
if (action.type == 'setdata') {
- if (!_this.data.id) {
+ if (_this.data.id * 1) {
this.load({ method: 'GET', params: { '_id' : _this.data.id }});
return;
}
style : 'margin:10px;',
url : baseURL + '/Roo/builder_part.php',
items : [
- {
- xtype: 'ComboBox',
- xns: Roo.form,
- allowBlank : 'false',
- editable : 'false',
- emptyText : "Select builder_modules",
- forceSelection : true,
- listWidth : 400,
- loadingText : "Searching...",
- minChars : 2,
- pageSize : 20,
- qtip : "Select builder_modules",
- selectOnFocus : true,
- triggerAction : 'all',
- typeAhead : true,
- width : 300,
- tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
- queryParam : 'query[name]',
- fieldLabel : 'Module',
- valueField : 'id',
- displayField : 'name',
- hiddenName : 'module_id',
- name : 'module_id_name',
- store : {
- xtype: 'Store',
- xns: Roo.data,
- remoteSort : true,
- sortInfo : { direction : 'ASC', field: 'id' },
- listeners : {
- beforeload : function (_self, o){
- o.params = o.params || {};
- // set more here
- }
- },
- proxy : {
- xtype: 'HttpProxy',
- xns: Roo.data,
- method : 'GET',
- url : baseURL + '/Roo/builder_modules.php'
- },
- reader : {
- xtype: 'JsonReader',
- xns: Roo.data,
- id : 'id',
- root : 'data',
- totalProperty : 'total',
- fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
- }
- }
- },
{
xtype: 'TextField',
xns: Roo.form,
name : 'name',
width : 300
},
+ {
+ xtype: 'Hidden',
+ xns: Roo.form,
+ name : 'module_id'
+ },
{
xtype: 'Hidden',
xns: Roo.form,