{ "name" : "Pman.Dialog.CmsPage", "parent" : "", "title" : "Cms -Edit Page", "path" : "/home/alan/gitlive/Pman.Cms/Pman.Dialog.CmsPage.bjs", "permname" : "", "modOrder" : "001", "items" : [ { "modal" : true, "collapsible" : false, "background" : true, "title" : "Edit Page", "xtype" : "LayoutDialog", "width" : 850, "$ xns" : "Roo", "closable" : false, "resizable" : false, "height" : 600, "items" : [ { "xtype" : "LayoutRegion", "$ xns" : "Roo", "titlebar" : false, "* prop" : "center" }, { "fitToFrame" : true, "xtype" : "LayoutRegion", "width" : 200, "$ xns" : "Roo", "titlebar" : false, "* prop" : "east" }, { "autoScroll" : true, "region" : "center", "fitToFrame" : true, "xtype" : "ContentPanel", "$ xns" : "Roo", "items" : [ { "listeners" : { "|actionfailed" : "function (_self, action)\n{\n _this.dialog.el.unmask();\n Pman.standardActionFailed(_self, action);\n}\n", "|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", "|rendered" : "function (_self)\n{\n _this.form = _self;\n}\n" }, "$ url" : "baseURL + '/Roo/Page.php'", "xtype" : "Form", "method" : "POST", "style" : "margin: 5px", "$ xns" : "Roo.form", "items" : [ { "fieldLabel" : "Page link", "xtype" : "TextField", "width" : 200, "$ xns" : "Roo.form", "name" : "page_link" }, { "listWidth" : 400, "triggerAction" : "all", "fieldLabel" : "Parent page", "forceSelection" : true, "selectOnFocus" : true, "pageSize" : 20, "displayField" : "page_link", "emptyText" : "Select Parent", "hiddenName" : "parent_id", "minChars" : 2, "valueField" : "id", "xtype" : "ComboBox", "allowBlank" : true, "typeAhead" : true, "editable" : false, "width" : 400, "$ xns" : "Roo.form", "name" : "parent_id_page_link", "qtip" : "Select Category ", "tpl" : "
{title}
{page_link}
", "loadingText" : "Searching...", "items" : [ { "xtype" : "Store", "remoteSort" : true, "$ sortInfo" : "{ field: 'page_link', direction: 'ASC' }", "$ xns" : "Roo.data", "* prop" : "store", "items" : [ { "$ url" : "baseURL + '/Roo/Page.php'", "xtype" : "HttpProxy", "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, { "id" : "id", "root" : "data", "xtype" : "JsonReader", "$ fields" : "[\n { name: 'id', type: 'int' },\n 'title',\n 'page_link' \n]", "$ xns" : "Roo.data", "* prop" : "reader", "totalProperty" : "total" } ] } ] }, { "xtype" : "Row", "$ xns" : "Roo.form", "items" : [ { "fieldLabel" : "Date to Publish", "format" : "Y-m-d", "xtype" : "DateField", "width" : 200, "$ xns" : "Roo.form", "name" : "published" }, { "fieldLabel" : "Replaces", "xtype" : "TextField", "width" : 75, "$ xns" : "Roo.form", "name" : "replaces_id" } ] }, { "hideLabels" : true, "xtype" : "Row", "labelWidth" : 0, "width" : 520, "$ xns" : "Roo.form", "items" : [ { "xtype" : "Checkbox", "width" : 100, "boxLabel" : "Visible", "$ xns" : "Roo.form", "name" : "visible" }, { "xtype" : "Checkbox", "width" : 150, "boxLabel" : "Display in RSS", "$ xns" : "Roo.form", "name" : "in_rss" }, { "inputValue" : 1, "xtype" : "Checkbox", "boxLabel" : "Extended Vis.?", "width" : 140, "$ xns" : "Roo.form", "name" : "has_extended" } ] }, { "fieldLabel" : "Title", "xtype" : "TextField", "width" : 390, "$ xns" : "Roo.form", "name" : "title" }, { "labelAlign" : "top", "xtype" : "Column", "width" : 570, "$ xns" : "Roo.form", "items" : [ { "fieldLabel" : "Contents", "xtype" : "HtmlEditor", "width" : 550, "$ xns" : "Roo.form", "resizable" : "s", "name" : "contents", "height" : 200 } ] }, { "labelAlign" : "top", "xtype" : "Column", "width" : 570, "$ xns" : "Roo.form", "items" : [ { "fieldLabel" : "Extended Contents", "xtype" : "HtmlEditor", "width" : 550, "$ xns" : "Roo.form", "resizable" : "s", "name" : "extended", "height" : 200 } ] }, { "xtype" : "Hidden", "$ xns" : "Roo.form", "name" : "id" } ] } ] }, { "listeners" : { "|activate" : "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}" }, "fitToframe" : true, "background" : false, "region" : "east", "xtype" : "GridPanel", "title" : "Images", "fitContainer" : true, "$ xns" : "Roo", "tableName" : "Images", "items" : [ { "listeners" : { "|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}", "|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}" }, "autoExpandColumn" : "filename", "xtype" : "Grid", "loadMask" : true, "$ xns" : "Roo.grid", "* prop" : "grid", "items" : [ { "listeners" : { "|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}" }, "xtype" : "Store", "$ xns" : "Roo.data", "* prop" : "dataSource", "items" : [ { "id" : "id", "root" : "data", "xtype" : "JsonReader", "$ xns" : "Roo.data", "$ 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]", "* prop" : "reader", "totalProperty" : "total" }, { "$ url" : "baseURL + '/Roo/Images.php'", "method" : "GET", "xtype" : "HttpProxy", "$ xns" : "Roo.data", "* prop" : "proxy" } ] }, { "xtype" : "Toolbar", "$ xns" : "Roo", "* prop" : "toolbar", "items" : [ { "listeners" : { "|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 " }, "text" : "Add", "xtype" : "Button", "cls" : "x-btn-text-icon", "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'", "$ xns" : "Roo" }, { "listeners" : { "|click" : "function()\n {\n Pman.genericDelete(_this, _this.panel.tableName); \n }\n " }, "text" : "Delete", "xtype" : "Button", "cls" : "x-btn-text-icon", "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'", "$ xns" : "Roo" } ] }, { "xtype" : "ColumnModel", "sortable" : false, "width" : 50, "header" : "", "$ renderer" : "function(v,x,r) { return String.format('', baseURL, v, r.data.filename); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "id" }, { "xtype" : "ColumnModel", "width" : 100, "header" : "Filename", "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "filename" } ] } ] }, { "listeners" : { "|click" : " function() {\n\n _this.form.reset();\n\n _this.dialog.hide();\n\n }\n" }, "text" : "Cancel", "xtype" : "Button", "$ xns" : "Roo", "* prop" : "buttons[]" }, { "listeners" : { "|click" : " function() {\n\n _this.dialog.el.mask(\"Saving\");\n _this.form.findField('contents').syncValue();\n _this.form.doAction(\"submit\");\n\n }\n" }, "text" : "OK", "xtype" : "Button", "$ xns" : "Roo", "* prop" : "buttons[]" } ] } ] }