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": "Replaces",
57 "name": "replaces_id",
63 "fieldLabel": "Parent",
70 "fieldLabel": "Page link",
77 "fieldLabel": "Date to Publish",
84 "labelAlign": "right",
91 "boxLabel": "Visible",
98 "boxLabel": "Display in RSS",
105 "boxLabel": "Extended Vis.?",
107 "name": "has_extended",
116 "displayField": "title",
118 "emptyText": "Select Category ",
119 "fieldLabel": "Category ",
120 "forceSelection": true,
121 "hiddenName": "category_id",
123 "loadingText": "Searching...",
125 "name": "category_id_title",
127 "qtip": "Select Category ",
128 "queryParam": "query[title]",
129 "selectOnFocus": true,
130 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{title}</b> </div>",
131 "triggerAction": "all",
141 "|reader": "Pman.Readers.Category",
146 "xtype": "HttpProxy",
147 "|url": "baseURL + '/Roo/Category.php'",
156 "fieldLabel": "Title",
159 "xtype": "TextField",
170 "fieldLabel": "Contents",
174 "xtype": "HtmlEditor",
187 "fieldLabel": "Extended Contents",
191 "xtype": "HtmlEditor",
207 "xtype": "GridPanel",
210 "fitContainer": true,
211 "tableName": "Images",
214 "|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
222 "autoExpandColumn": "filename",
225 "|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}",
226 "|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}"
231 "*prop": "dataSource",
233 "|reader": "Pman.Readers.Images",
235 "|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}"
241 "xtype": "HttpProxy",
243 "|url": "baseURL + '/Roo/Images.php'",
257 "cls": "x-btn-text-icon",
258 "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
260 "|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 "
266 "cls": "x-btn-text-icon",
267 "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
270 "|click": "function()\n {\n Pman.genericDelete(_this, _this.panel.tableName); \n }\n "
277 "xtype": "ColumnModel",
281 "|renderer": "function(v,x,r) { return String.format('<img src=\"{0}/Images/Thumb/100/{1}/{2}\">', baseURL, v, r.data.filename); }",
285 "*prop": "colModel[]"
288 "xtype": "ColumnModel",
289 "header": "Filename",
291 "dataIndex": "filename",
292 "|renderer": "function(v) { return String.format('{0}', v); }",
295 "*prop": "colModel[]"
306 "|click": " function() {\n\n _this.form.reset();\n\n _this.dialog.hide();\n\n }\n"
315 "|click": " function() {\n\n _this.dialog.el.mask(\"Saving\");\n _this.form.findField('contents').syncValue();\n _this.form.doAction(\"submit\");\n\n }\n"