3 "name": "Pman.Dialog.CmsBlog",
5 "title": "Cms -Edit Blog Entry",
6 "path": "/home/alan/gitlive/Pman.Cms/Pman.Dialog.CmsBlog.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 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 this.findField('is_draft').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/CmsBlog.php'",
62 "fieldLabel": "Page link",
69 "allowBlank": "false",
70 "displayField": "title",
72 "emptyText": "Select Category",
73 "fieldLabel": "Category",
74 "forceSelection": true,
75 "hiddenName": "category_id",
77 "loadingText": "Searching...",
79 "name": "category_id_title",
81 "qtip": "Select Category",
83 "selectOnFocus": true,
84 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{title}</b> </div>",
85 "triggerAction": "all",
97 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
102 "xtype": "HttpProxy",
105 "|url": "baseURL + '/Roo/Category.php'"
111 "totalProperty": "total",
112 "xtype": "JsonReader",
113 "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"title\",\"type\":\"string\"}]",
124 "displayField": "page_link",
126 "emptyText": "Select Parent",
127 "fieldLabel": "Parent page",
128 "forceSelection": true,
129 "hiddenName": "parent_id",
131 "loadingText": "Searching...",
133 "name": "parent_id_page_link",
135 "qtip": "Select Category ",
136 "queryParam": "_search",
137 "selectOnFocus": true,
138 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{title}</b><br/><i>{page_link}</i> </div>",
139 "triggerAction": "all",
148 "beforeload": "function (_self, options)\n{\n options.params['query[page_link_no_empty]'] =1;\n}"
153 "|sortInfo": "{ field: 'page_link', direction: 'ASC' }",
159 "xtype": "HttpProxy",
160 "|url": "baseURL + '/Roo/CmsBlog.php'",
167 "totalProperty": "total",
168 "xtype": "JsonReader",
169 "|fields": "[\n { name: 'id', type: 'int' },\n 'title',\n 'page_link' \n]",
181 "altFormats": "Y-m-d H:i:s",
182 "fieldLabel": "Date to Publish",
186 "xtype": "DateField",
190 "fieldLabel": "Replaces",
191 "name": "to_replace_id",
193 "xtype": "TextField",
213 "boxLabel": "Extended Vis.?",
215 "name": "has_extended",
221 "boxLabel": "Display in RSS",
230 "fieldLabel": "Title",
233 "xtype": "TextField",
244 "fieldLabel": "Contents",
248 "xtype": "HtmlEditor",
261 "fieldLabel": "Extended Contents",
265 "xtype": "HtmlEditor",
281 "xtype": "GridPanel",
284 "fitContainer": true,
285 "tableName": "Images",
288 "|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
296 "autoExpandColumn": "filename",
299 "|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}",
300 "|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}"
306 "|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 = 'CmsBlog';\n}"
308 "*prop": "dataSource",
310 "|reader": "Pman.Readers.Images",
315 "xtype": "HttpProxy",
317 "|url": "baseURL + '/Roo/Images.php'",
330 "|click": "function()\n {\n Pman.Dialog.Image.show( { id : 0, onid: _this.data.id, ontable: 'CmsBlog' }, function() {\n _this.grid.getDataSource().load();\n }); \n\n }\n "
332 "cls": "x-btn-text-icon",
335 "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
340 "cls": "x-btn-text-icon",
341 "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
344 "|click": "function()\n {\n Pman.genericDelete(_this, _this.panel.tableName); \n }\n "
351 "xtype": "ColumnModel",
355 "|renderer": "function(v,x,r) { return String.format('<img src=\"{0}/Images/Thumb/100/{1}/{2}\">', baseURL, v, r.data.filename); }",
359 "*prop": "colModel[]"
362 "xtype": "ColumnModel",
363 "header": "Filename",
365 "dataIndex": "filename",
366 "|renderer": "function(v) { return String.format('{0}', v); }",
369 "*prop": "colModel[]"
380 "|click": " function() {\n\n _this.form.reset();\n\n _this.dialog.hide();\n\n }\n"
386 "|click": " function() {\n\n _this.dialog.el.mask(\"Saving\");\n _this.form.findField('body').syncValue();\n _this.form.doAction(\"submit\");\n\n }\n"
388 "*prop": "buttons[]",