_this.form.reset();
return;
}
- if (action.type = 'setdata') {
+ if (action.type == 'setdata') {
+ if (_this.data.id) {
+ _this.dialog.el.mask("Loading");
+ this.load({ method: 'GET', params: { '_id' : _this.data.id }});
+ return;
+ }
+ _this.grid.getDataSource().load();
+ return;
+ }
+ if (action.type == 'load') {
_this.grid.getDataSource().load();
-
+ _this.dialog.el.unmask();
+ return;
}
+
+
+
},
rendered : function (_self)
{
readOnly : true,
width : 450
},
+ {
+ xtype: 'NumberField',
+ xns: Roo.form,
+ decimalPrecision : 0,
+ fieldLabel : 'Order (1 first)',
+ name : 'display_order',
+ width : 50
+ },
{
xtype: 'TextField',
xns: Roo.form,
{
xtype: 'ComboBox',
xns: Roo.form,
- allowBlank : 'false',
+ allowBlank : true,
displayField : 'name',
editable : 'false',
emptyText : "Select Type",
fieldLabel : 'Type',
forceSelection : true,
hiddenName : 'category_type_id',
- listWidth : 400,
+ listWidth : 200,
loadingText : "Searching...",
minChars : 2,
name : 'category_type_id_name',
pageSize : 20,
qtip : "Select cms_category_type",
- queryParam : '',
selectOnFocus : true,
tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
triggerAction : 'all',
typeAhead : true,
valueField : 'id',
- width : 300,
+ width : 200,
store : {
xtype: 'Store',
xns: Roo.data,
}
}
},
- {
- xtype: 'TextField',
- xns: Roo.form,
- fieldLabel : 'Colour',
- name : 'short_name',
- width : 100
- },
{
xtype: 'Checkbox',
xns: Roo.form,
{
xtype: 'ColumnModel',
xns: Roo.grid,
+ dataIndex : 'id',
header : '',
width : 110,
- dataIndex : 'id',
renderer : function(v,x,r) { return String.format('<img src="{0}/Images/Thumb/100/{1}/{2}">', baseURL, v, r.data.filename); }
},
{