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