2 "name" : "Pman.Dialog.CmsPage",
4 "title" : "Cms -Edit Page",
5 "path" : "/home/alan/gitlive/Pman.Cms/Pman.Dialog.CmsPage.bjs",
11 "collapsible" : false,
13 "title" : "Edit Page",
14 "xtype" : "LayoutDialog",
22 "xtype" : "LayoutRegion",
29 "xtype" : "LayoutRegion",
39 "xtype" : "ContentPanel",
44 "|actionfailed" : "function (_self, action)\n{\n _this.dialog.el.unmask();\n Pman.standardActionFailed(_self, action);\n}\n",
45 "|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",
46 "|rendered" : "function (_self)\n{\n _this.form = _self;\n}\n"
48 "$ url" : "baseURL + '/Roo/Page.php'",
51 "style" : "margin: 5px",
55 "fieldLabel" : "Page link",
56 "xtype" : "TextField",
63 "triggerAction" : "all",
64 "fieldLabel" : "Parent page",
65 "forceSelection" : true,
66 "selectOnFocus" : true,
68 "displayField" : "page_link",
69 "emptyText" : "Select Parent",
70 "hiddenName" : "parent_id",
79 "name" : "parent_id_page_link",
80 "qtip" : "Select Category ",
81 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{title}</b><br/><i>{page_link}</i> </div>",
82 "loadingText" : "Searching...",
87 "$ sortInfo" : "{ field: 'page_link', direction: 'ASC' }",
92 "$ url" : "baseURL + '/Roo/Page.php'",
93 "xtype" : "HttpProxy",
101 "xtype" : "JsonReader",
102 "$ fields" : "[\n { name: 'id', type: 'int' },\n 'title',\n 'page_link' \n]",
103 "$ xns" : "Roo.data",
105 "totalProperty" : "total"
113 "$ xns" : "Roo.form",
116 "fieldLabel" : "Date to Publish",
118 "xtype" : "DateField",
120 "$ xns" : "Roo.form",
124 "fieldLabel" : "Replaces",
125 "xtype" : "TextField",
127 "$ xns" : "Roo.form",
128 "name" : "replaces_id"
137 "$ xns" : "Roo.form",
140 "xtype" : "Checkbox",
142 "boxLabel" : "Visible",
143 "$ xns" : "Roo.form",
147 "xtype" : "Checkbox",
149 "boxLabel" : "Display in RSS",
150 "$ xns" : "Roo.form",
155 "xtype" : "Checkbox",
156 "boxLabel" : "Extended Vis.?",
158 "$ xns" : "Roo.form",
159 "name" : "has_extended"
164 "fieldLabel" : "Title",
165 "xtype" : "TextField",
167 "$ xns" : "Roo.form",
171 "labelAlign" : "top",
174 "$ xns" : "Roo.form",
177 "fieldLabel" : "Contents",
178 "xtype" : "HtmlEditor",
180 "$ xns" : "Roo.form",
188 "labelAlign" : "top",
191 "$ xns" : "Roo.form",
194 "fieldLabel" : "Extended Contents",
195 "xtype" : "HtmlEditor",
197 "$ xns" : "Roo.form",
206 "$ xns" : "Roo.form",
215 "|activate" : "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
218 "background" : false,
220 "xtype" : "GridPanel",
222 "fitContainer" : true,
224 "tableName" : "Images",
228 "|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}",
229 "|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}"
231 "autoExpandColumn" : "filename",
234 "$ xns" : "Roo.grid",
239 "|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}"
242 "$ xns" : "Roo.data",
243 "* prop" : "dataSource",
248 "xtype" : "JsonReader",
249 "$ xns" : "Roo.data",
250 "$ fields" : "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'filename',\n 'type': 'string'\n },\n {\n 'name': 'ontable',\n 'type': 'string'\n },\n {\n 'name': 'onid',\n 'type': 'int'\n },\n {\n 'name': 'mimetype',\n 'type': 'string'\n },\n {\n 'name': 'width',\n 'type': 'int'\n },\n {\n 'name': 'height',\n 'type': 'int'\n },\n {\n 'name': 'filesize',\n 'type': 'int'\n },\n {\n 'name': 'displayorder',\n 'type': 'int'\n },\n {\n 'name': 'language',\n 'type': 'string'\n },\n {\n 'name': 'parent_image_id',\n 'type': 'int'\n },\n {\n 'name': 'created',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'imgtype',\n 'type': 'string'\n },\n {\n 'name': 'linkurl',\n 'type': 'string'\n },\n {\n 'name': 'descript',\n 'type': 'string'\n },\n {\n 'name': 'title',\n 'type': 'string'\n },\n {\n 'name': 'parent_image_id_id',\n 'type': 'int'\n },\n {\n 'name': 'parent_image_id_filename',\n 'type': 'string'\n },\n {\n 'name': 'parent_image_id_ontable',\n 'type': 'string'\n },\n {\n 'name': 'parent_image_id_onid',\n 'type': 'int'\n },\n {\n 'name': 'parent_image_id_mimetype',\n 'type': 'string'\n },\n {\n 'name': 'parent_image_id_width',\n 'type': 'int'\n },\n {\n 'name': 'parent_image_id_height',\n 'type': 'int'\n },\n {\n 'name': 'parent_image_id_filesize',\n 'type': 'int'\n },\n {\n 'name': 'parent_image_id_displayorder',\n 'type': 'int'\n },\n {\n 'name': 'parent_image_id_language',\n 'type': 'string'\n },\n {\n 'name': 'parent_image_id_parent_image_id',\n 'type': 'int'\n },\n {\n 'name': 'parent_image_id_created',\n 'type': 'date'\n },\n {\n 'name': 'parent_image_id_imgtype',\n 'type': 'string'\n },\n {\n 'name': 'parent_image_id_linkurl',\n 'type': 'string'\n },\n {\n 'name': 'parent_image_id_descript',\n 'type': 'string'\n },\n {\n 'name': 'parent_image_id_title',\n 'type': 'string'\n }\n]",
252 "totalProperty" : "total"
255 "$ url" : "baseURL + '/Roo/Images.php'",
257 "xtype" : "HttpProxy",
258 "$ xns" : "Roo.data",
266 "* prop" : "toolbar",
270 "|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 "
274 "cls" : "x-btn-text-icon",
275 "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
280 "|click" : "function()\n {\n Pman.genericDelete(_this, _this.panel.tableName); \n }\n "
284 "cls" : "x-btn-text-icon",
285 "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
291 "xtype" : "ColumnModel",
295 "$ renderer" : "function(v,x,r) { return String.format('<img src=\"{0}/Images/Thumb/100/{1}/{2}\">', baseURL, v, r.data.filename); }",
296 "$ xns" : "Roo.grid",
297 "* prop" : "colModel[]",
301 "xtype" : "ColumnModel",
303 "header" : "Filename",
304 "$ renderer" : "function(v) { return String.format('{0}', v); }",
305 "$ xns" : "Roo.grid",
306 "* prop" : "colModel[]",
307 "dataIndex" : "filename"
315 "|click" : " function() {\n\n _this.form.reset();\n\n _this.dialog.hide();\n\n }\n"
320 "* prop" : "buttons[]"
324 "|click" : " function() {\n\n _this.dialog.el.mask(\"Saving\");\n _this.form.findField('contents').syncValue();\n _this.form.doAction(\"submit\");\n\n }\n"
329 "* prop" : "buttons[]"