3 "name": "Pman.Dialog.CmsPage",
5 "title": "Cms -Edit Page",
6 "path": "/home/alan/gitlive/Pman.Cms/Pman.Dialog.CmsPage.bjs",
17 "xtype": "LayoutDialog",
21 "xtype": "LayoutRegion",
27 "xtype": "LayoutRegion",
39 "xtype": "ContentPanel",
45 "|actionfailed": "function (_self, action)\n{\n _this.dialog.el.unmask();\n Pman.standardActionFailed(_self, action);\n}\n",
46 "|actioncomplete": "function (_self, action)\n{\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 if (action.type == 'setdata') { \n _this.loaded = false;\n \n // _this.dialog.getLayout().showPanel(0);\n // _this.form.addForm(_this.form1);\n if ( _this.data.id) {\n _this.dialog.el.mask(\"Loading\");\n this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n } else {\n _this.loaded = true;\n //disable image upload!\n _this.form.findField('publish_status').setValue(-1);\n }\n\n return;\n \n }\n \n if (action.type == 'load') {\n _this.dialog.el.unmask();\n _this.grid.getDataSource().load();\n return;\n }\n}\n",
47 "|rendered": "function (_self)\n{\n _this.form = _self;\n}\n"
50 "style": "margin: 5px",
52 "|url": "baseURL + '/Roo/Page.php'",
56 "fieldLabel": "Page link",
64 "displayField": "page_link",
66 "emptyText": "Select Parent",
67 "fieldLabel": "Parent page",
68 "forceSelection": true,
69 "hiddenName": "parent_id",
71 "loadingText": "Searching...",
73 "name": "parent_id_page_link",
75 "qtip": "Select Category ",
76 "selectOnFocus": true,
77 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{title}</b><br/><i>{page_link}</i> </div>",
78 "triggerAction": "all",
89 "|sortInfo": "{ field: 'page_link', direction: 'ASC' }",
96 "|url": "baseURL + '/Roo/Page.php'",
103 "totalProperty": "total",
104 "xtype": "JsonReader",
105 "|fields": "[\n { name: 'id', type: 'int' },\n 'title',\n 'page_link' \n]",
117 "fieldLabel": "Date to Publish",
121 "xtype": "DateField",
125 "fieldLabel": "Replaces",
126 "name": "replaces_id",
141 "boxLabel": "Visible",
148 "boxLabel": "Display in RSS",
155 "boxLabel": "Extended Vis.?",
157 "name": "has_extended",
165 "fieldLabel": "Title",
168 "xtype": "TextField",
179 "fieldLabel": "Contents",
183 "xtype": "HtmlEditor",
196 "fieldLabel": "Extended Contents",
200 "xtype": "HtmlEditor",
216 "xtype": "GridPanel",
219 "fitContainer": true,
220 "tableName": "Images",
223 "|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
231 "autoExpandColumn": "filename",
234 "|render": "function() { \n _this.grid = this; \n //_this.dialog = Pman.Dialog.FILL_IN\n if (_this.panel.active) {\n //this.footer.onClick('first');\n }\n}",
235 "|rowdblclick": "function (_self, rowIndex, e)\n{\n var rd = _this.grid.getDataSource().getAt(rowIndex);\n var id = rd.data.id;\n var url = String.format('{0}/Images/{1}/{2}', baseURL, rd.data.id, rd.data.filename);\n _this.form.findField('contents').execCmd('insertimage', url);\n\n}"
241 "|beforeload": "function (_self, o)\n{\n if (!_this.data.id) {\n return false;\n } \n o.params = o.params || {}; \n o.params.onid = _this.data.id;\n o.params.ontable = 'Page';\n}"
243 "*prop": "dataSource",
245 "|reader": "Pman.Readers.Images",
250 "xtype": "HttpProxy",
252 "|url": "baseURL + '/Roo/Images.php'",
265 "|click": "function()\n{\n Pman.Dialog.Image.show( { id : 0, onid: _this.data.id, ontable: 'Page' }, function() {\n _this.grid.getDataSource().load();\n }); \n\n}\n "
267 "cls": "x-btn-text-icon",
270 "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
275 "cls": "x-btn-text-icon",
276 "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
279 "|click": "function()\n {\n Pman.genericDelete(_this, _this.panel.tableName); \n }\n "
286 "xtype": "ColumnModel",
290 "|renderer": "function(v,x,r) { return String.format('<img src=\"{0}/Images/Thumb/100/{1}/{2}\">', baseURL, v, r.data.filename); }",
294 "*prop": "colModel[]"
297 "xtype": "ColumnModel",
298 "header": "Filename",
300 "dataIndex": "filename",
301 "|renderer": "function(v) { return String.format('{0}', v); }",
304 "*prop": "colModel[]"
315 "|click": " function() {\n\n _this.form.reset();\n\n _this.dialog.hide();\n\n }\n"
324 "|click": " function() {\n\n _this.dialog.el.mask(\"Saving\");\n _this.form.findField('contents').syncValue();\n _this.form.doAction(\"submit\");\n\n }\n"