{
- "id": "roo-file-114",
+ "id": "roo-file-60",
"name": "Pman.Dialog.CmsProduct",
"parent": "",
"title": "",
- "path": "/home/alan/gitlive/Pman.Cms/Pman.Dialog.CmsProduct.bjs",
+ "path": "/home/edward/gitlive/Pman.Cms/Pman.Dialog.CmsProduct.bjs",
"items": [
{
"closable": false,
"collapsible": false,
"height": 380,
+ "modal": true,
"resizable": false,
"title": "Edit / Create Product",
"width": 700,
"items": [
{
"listeners": {
- "|actioncomplete": "function(_self,action)\n{\n if (action.type == 'setdata') {\n _this.dialog.el.mask(\"Loading\");\n if (_this.data.id) {\n _this.dialog.el.mask(\"Loading\");\n this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n return;\n }\n _this.imageView.loadImages();\n return;\n }\n if (action.type == 'load') {\n _this.imageView.loadImages();\n _this.dialog.el.unmask();\n return;\n }\n if (action.type =='submit') {\n \n _this.dialog.el.unmask();\n _this.dialog.hide();\n \n if (_this.callback) {\n _this.callback.call(_this, _this.form.getValues());\n }\n _this.form.reset();\n return;\n }\n}\n",
+ "|actioncomplete": "function(_self,action)\n{\n if (action.type == 'setdata') {\n \n if (_this.data.id) {\n _this.dialog.el.mask(\"Loading\");\n this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n return;\n }\n _this.imageView.loadImages();\n return;\n }\n if (action.type == 'load') {\n _this.imageView.loadImages();\n _this.dialog.el.unmask();\n return;\n }\n if (action.type =='submit') {\n \n _this.dialog.el.unmask();\n \n _this.data.id = action.result.data.id;\n _this.form.findField('id').setValue(_this.data.id);\n if (_this.callback) {\n var res = _this.callback.call(_this, _this.form.getValues());\n if (res === false) {\n return;\n }\n }\n _this.dialog.hide();\n _this.form.reset();\n return;\n }\n}\n",
"|rendered": "function (form)\n{\n _this.form= form;\n}\n"
},
"method": "POST",
}
]
},
+ {
+ "name": "category_id",
+ "xtype": "Hidden",
+ "|xns": "Roo.form"
+ },
{
"name": "id",
"|xns": "Roo.form",
},
{
"listeners": {
- "activate": "function (_self)\n{\n //console.log('activate');\n if ( _this.imageView ){ \n _this.imageView.loadImages();\n }\n\n if (_this.hasUploadWatch) {\n return;\n }\n _this.hasUploadWatch =true;\n _this.uploadSending =false;\n window.setInterval( function()\n {\n var val = _this.uploadForm.findField('imageUpload').getValue();\n if (!val || !val.length) {\n return;\n }\n \n if (_this.uploadSending) {\n return;\n }\n \n if (_this.data.id) {\n // trigger a save..\n va\n _this.form.submit();\n }\n \n _this.uploadSending =true;\n _this.uploadForm.findField('onid').setValue(_this.data.id);\n _this.uploadForm.el.mask(\"Sending\");\n _this.uploadForm.submit.defer(100, _this.uploadForm);\n \n }, 1000) \n \n}"
+ "activate": "function (_self)\n{\n //console.log('activate');\n if ( _this.imageView ){ \n _this.imageView.loadImages();\n }\n\n if (_this.hasUploadWatch) {\n return;\n }\n _this.hasUploadWatch =true;\n _this.uploadSending =false;\n window.setInterval( function()\n {\n var val = _this.uploadForm.findField('imageUpload').getValue();\n if (!val || !val.length) {\n return;\n }\n \n if (_this.uploadSending) {\n return;\n }\n \n if (!_this.data.id) {\n // trigger a save..\n var cb = _this.callback;\n _this.callback = function() {\n _this.uploadSending = false;\n _this.callback = cb;\n return false;\n }\n _this.uploadSending = true;\n _this.form.doAction(\"submit\");\n return;\n }\n \n _this.uploadSending =true;\n _this.uploadForm.findField('onid').setValue(_this.data.id);\n _this.uploadForm.el.mask(\"Sending\");\n _this.uploadForm.submit.defer(100, _this.uploadForm);\n \n }, 1000) \n \n}"
},
"region": "east",
"title": "Images / PDF",
"jsonRoot": "data",
"singleSelect": true,
"xtype": "JsonView",
- "|loadImages": "function() {\n if (!_this.data.id) {return; } \n\n this.load({\n url : baseURL + '/Roo/Images.php',\n method : 'GET',\n params : {\n ontable : 'Product',\n onid : _this.data.id,\n 'query[imagesize]' : 150\n },\n text : 'Loading'\n });\n \n}\n",
+ "|loadImages": "function() {\n if (!_this.data.id) {\n this.clearSelections();\n this.el.update(\"\");\n this.jsonData = [];\n return; \n } \n\n this.load({\n url : baseURL + '/Roo/Images.php',\n method : 'GET',\n params : {\n ontable : 'Product',\n onid : _this.data.id,\n 'query[imagesize]' : 150\n },\n text : 'Loading'\n });\n \n}\n",
"|xns": "Roo",
"items": [
{
}
]
}
- ]
+ ],
+ "permname": "",
+ "modOrder": "001"
}
\ No newline at end of file