{ "name" : "Pman.Tab.CmsBlog.Old", "parent" : "", "title" : "", "path" : "/home/edward/gitlive/Pman.Cms/Pman.Tab.CmsBlog.Old.bjs", "permname" : "", "modOrder" : "001", "strings" : { "30a2a59b5adaa49803297d4c06e09e67" : "Displaying cms_page{0} - {1} of {2}", "a517747c3d12f99244ae598910d979c5" : "Author", "6a5b847af3d97df722040debdbccfbed" : "Page Type", "ec211f7c20af43e742bf2570c3cb84f9" : "Add", "0eceeb45861f9585dd7a97a3e36f85c6" : "Created", "ebd9bec4d70abc789d439c1f136b0538" : "Layout", "30269022e9d8f51beaabb52e5d0de2b7" : "Parent", "a4863ff1cdfa709d5bf80939cd2e6757" : "T#", "d7efa19fbe7d3972fd5adb6024223d74" : "C#", "08d0135e24822f43171ed4944fc3bdda" : "Preview (resize by dragging next to this bar)", "b8a00b5928fbead0626546550667b2b5" : "Pages, Menu and Blog Entries", "3adbdb3ac060038aa0e6e6c138ef9873" : "Category", "2cbaa804531fc7367ccc699fb1eef52a" : "Page link / Name / Order", "c8043f5cd3d28cb76c548338497b06ab" : "Show Deleted", "1243daf593fa297e07ab03bf06d925af" : "Searching...", "9b9d8a976b42e0bd66381797644943d5" : "Published", "b78a3223503896721cca1303f776159b" : "Title", "f17755c3f16cb257f7793b9865ebafb3" : "No cms_page found", "20bec77364d863100a1f9325873a8504" : "Select Page Type", "8dfef8a6f3beef9ff28ff1fafb5c2009" : "Select Category Type", "f46885d21c98f597303699f41b3d7afd" : "Ex?", "f2a6c498fb90ee345d997f888fce3b18" : "Delete", "4d3d769b812b6faa6b76e1a8abaece2d" : "Active", "a1fa27779242b4902f7ae3bdd5c6d508" : "Type", "779e2624ddf330fb05b51ae59faf212d" : "Select Status Type", "f7070be7ec7d2443714a2e5dc63f4de2" : "Links to", "75ae2cfdf786e5577f1b619f4ca8d728" : "To replace" }, "items" : [ { "title" : "Pages, Menu and Blog Entries ", "xtype" : "NestedLayoutPanel", "$ xns" : "Roo", "items" : [ { "xtype" : "BorderLayout", "$ xns" : "Roo", "* prop" : "layout", "items" : [ { "xtype" : "LayoutRegion", "$ xns" : "Roo", "* prop" : "center" }, { "xtype" : "LayoutRegion", "width" : 300, "$ xns" : "Roo", "split" : true, "titlebar" : true, "* prop" : "east" }, { "listeners" : { "|activate" : "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}" }, "bool background" : false, "fitToframe" : true, "region" : "center", "title" : "Pages, Menu and Blog Entries", "xtype" : "GridPanel", "fitContainer" : true, "$ xns" : "Roo", "tableName" : "cms_page", "items" : [ { "listeners" : { "rowdblclick" : "function (_self, rowIndex, e)\n{\n\n var s = this.dataSource.getAt(rowIndex);\n /* \n if (s.data.language.length) {\n Roo.log('in lang');\n _this.dialog.show({ id : s.data.parent_id } , function() {\n _this.grid.footer.onClick('refresh');\n });\n return;\n }*/\n _this.dialog.show(s.data, function() {\n _this.grid.footer.onClick('refresh');\n }); \n \n}\n", "cellclick" : "function (g, ri,ci, e)\r\n{\r\n var h = g.getColumnModel().config[ci].dataIndex;\r\n if (h != 'is_draft') {\r\n return;\r\n }\r\n var rec = g.ds.getAt(ri);\n \n if(rec.data.is_system_page*1 == 1){\n Roo.MessageBox.alert('Error', 'You cannot de-active the system page');\n return;\n }\r\n rec.set('is_draft', rec.data.is_draft ? 0 : 1);\r\n rec.commit();\r\n}", "|render" : "function() \n{\n _this.grid = this; \n _this.dialog = Pman.Dialog.CmsBlog;\n if (_this.panel.active) {\n this.footer.onClick('first');\n }\n}", "rowclick" : "function (_self, rowIndex, e)\n{\n var s = this.dataSource.getAt(rowIndex);\n\n if(s.data.id *1 > 0){\n \n _this.prepanel.el.dom.src = baseURL + '/Roo/Cms_page?_preview=' + s.data.id ; \r\n }\n // Roo.log(s.data);\n // _this.prepanel.setContent(s.data.body,true);\n}" }, "autoExpandColumn" : "title", "xtype" : "Grid", "loadMask" : true, "$ xns" : "Roo.grid", "* prop" : "grid", "items" : [ { "listeners" : { "update" : "function (_self, record, operation)\n{\n if (operation != 'commit') {\n return;\n }\n // only used to change active status.\n \n new Pman.request({\r\n method : 'POST',\r\n url : baseURL + '/Roo/Cms_page',\r\n params : {\r\n id : record.data.id,\r\n is_draft : record.data.is_draft\r\n },\n success : function(res) {\n _this.grid.footer.onClick('refresh');\n }\r\n });\n}", "beforeload" : "function (_self, options)\n{\n \n if (Pman.building || !Pman.Tab.Cms.panel.active) {\n return false;\n }\n var cm = _this.grid.colModel;\n var vis = {\n category_type_id_name : true,\n menu_page_id_title : true\n };\n var cm = _this.grid.getColumnModel();\n function cid(str) {\n return cm.getIndexByDataIndex(str);\n }\n \n options.params['search[name]'] = _this.searchBox.getValue();\n \n options.params._exclude_columns = 'body,extended';\n options.params._page_type_id = _this.page_type.getValue();\n options.params._treeview = 1;\n options.params._pman_short=1;\n options.params.translation_of_id=0; \n options.params._requestMeta = 1; // always fetch meta.. as different types return different data..\n \n \n var page_type_name = (_this.page_type.lastData.name) ? _this.page_type.lastData.name : 'page';\n \n Roo.log(page_type_name);\n switch(page_type_name) {\n case 'page' : \n options.params.limit = 9999;\n _this.grid.footer.pageSize = 9999;\n vis.menu_page_id_title = false;\n cm.setHidden(cid('created'), true);\n cm.setHidden(cid('published'), true);\n cm.setHidden(cid('template_id_template'), false); \n this.sortInfo.field = 'page_link'; // force sort.\n this.sortInfo.direction = 'ASC'; // force sort.\n \n break;\n case 'blog' :\n options.params.limit = 20;\n options.params['search[category]'] = _this.category_type.getValue();\n _this.grid.footer.pageSize = 20;\n vis.menu_page_id_title = false; \n cm.setHidden(cid('created'), false);\n cm.setHidden(cid('published'), false);\n cm.setHidden(cid('template_id_template'), true);\n this.sortInfo.field = 'published'; // force sort.\n this.sortInfo.direction = 'DESC'; // force sort.\n \n break;\n \n case 'menu' :\n options.params.limit = 9999;\n _this.grid.footer.pageSize = 9999;\n vis.category_type_id_name = false;\n cm.setHidden(cid('created'), true);\n cm.setHidden(cid('published'), true);\n cm.setHidden(cid('template_id_template'), true);\n this.sortInfo.field = 'seq_id'; // force sort.\n this.sortInfo.direction = 'ASC'; // force sort.\n \n break;\n case 'category' :\n options.params.limit = 20;\n _this.grid.footer.pageSize = 20;\n vis.menu_page_id_title = false; \n cm.setHidden(cid('created'), false);\n cm.setHidden(cid('published'), false);\n cm.setHidden(cid('template_id_template'), true);\n this.sortInfo.field = 'seq_id'; // force sort.\n this.sortInfo.direction = 'ASC'; // force sort.\n \n break; \n }\n if (_this.showDeleted.pressed) {\n options.params._show_deleted = 1;\n }\n \n \n // }\n for (var i in vis) {\n cm.setHidden(cm.getIndexByDataIndex(i), !vis[i]);\n }\n\n \n \n \n}" }, "xtype" : "Store", "remoteSort" : true, "$ sortInfo" : "{ field : 'created' , direction : 'DESC' }", "$ xns" : "Roo.data", "* prop" : "dataSource", "items" : [ { "$ url" : "baseURL + '/Roo/cms_page.php'", "method" : "GET", "xtype" : "HttpProxy", "$ xns" : "Roo.data", "* prop" : "proxy" }, { "id" : "id", "root" : "data", "xtype" : "JsonReader", "$ fields" : "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'title',\n 'type': 'string'\n },\n {\n 'name': 'published',\n 'type': 'date',\n 'format' : 'Y-m-d H:i:s'\n },\n {\n 'name': 'body',\n 'type': 'string'\n },\n {\n 'name': 'comments_no',\n 'type': 'int'\n },\n {\n 'name': 'trackbacks_no',\n 'type': 'int'\n },\n {\n 'name': 'extended',\n 'type': 'string'\n },\n {\n 'name': 'has_extended',\n 'type': 'int'\n },\n {\n 'name': 'author_id',\n 'type': 'int'\n },\n {\n 'name': 'category_id',\n 'type': 'int'\n },\n {\n 'name': 'category_id_title',\n 'type': 'string'\n },\n {\n 'name': 'is_draft',\n 'type': 'int'\n },\n {\n 'name': 'updated',\n 'type': 'date',\n 'format' : 'Y-m-d H:i:s'\n },\n {\n 'name': 'created',\n 'type': 'date',\n 'format' : 'Y-m-d H:i:s'\n },\n {\n 'name': 'to_replace_id',\n 'type': 'int'\n },\n {\n 'name': 'page_link',\n 'type': 'string'\n },\n {\n 'name': 'in_rss',\n 'type': 'int'\n },\n {\n 'name': 'parent_id',\n 'type': 'int'\n },\n {\n 'name': 'parent_id_title',\n 'type': 'string'\n },\n\n {\n 'name': 'author_id_id',\n 'type': 'int'\n },\n {\n 'name': 'author_id_office_id',\n 'type': 'int'\n },\n {\n 'name': 'author_id_name',\n 'type': 'string'\n },\n {\n 'name': 'author_id_phone',\n 'type': 'string'\n },\n {\n 'name': 'author_id_fax',\n 'type': 'string'\n },\n {\n 'name': 'author_id_email',\n 'type': 'string'\n },\n {\n 'name': 'author_id_company_id',\n 'type': 'int'\n },\n {\n 'name': 'author_id_role',\n 'type': 'string'\n },\n {\n 'name': 'author_id_active',\n 'type': 'int'\n },\n {\n 'name': 'author_id_remarks',\n 'type': 'string'\n },\n {\n 'name': 'author_id_passwd',\n 'type': 'string'\n },\n {\n 'name': 'author_id_owner_id',\n 'type': 'int'\n },\n {\n 'name': 'author_id_lang',\n 'type': 'string'\n },\n {\n 'name': 'author_id_no_reset_sent',\n 'type': 'int'\n },\n {\n 'name': 'author_id_action_type',\n 'type': 'string'\n },\n {\n 'name': 'author_id_project_id',\n 'type': 'int'\n },\n {\n 'name': 'category_id_id',\n 'type': 'int'\n },\n {\n 'name': 'category_id_parent_id',\n 'type': 'int'\n },\n {\n 'name': 'category_id_short_name',\n 'type': 'string'\n },\n {\n 'name': 'category_id_title',\n 'type': 'string'\n },\n {\n 'name': 'category_id_page_text',\n 'type': 'string'\n },\n {\n 'name': 'category_id_type',\n 'type': 'string'\n },\n {\n 'name': 'category_id_search_on',\n 'type': 'string'\n },\n {\n 'name': 'category_id_image_menu_id',\n 'type': 'int'\n },\n {\n 'name': 'category_id_image_menuover_id',\n 'type': 'int'\n },\n {\n 'name': 'category_id_image_leftactive_id',\n 'type': 'int'\n },\n {\n 'name': 'category_id_image_page_id',\n 'type': 'int'\n },\n {\n 'name': 'category_id_display_order',\n 'type': 'int'\n },\n {\n 'name': 'category_id_more_info_title',\n 'type': 'string'\n },\n {\n 'name': 'category_id_more_info_text',\n 'type': 'string'\n },\n {\n 'name': 'category_id_visible',\n 'type': 'int'\n },\n {\n 'name': 'to_replace_id_id',\n 'type': 'int'\n },\n {\n 'name': 'to_replace_id_title',\n 'type': 'string'\n },\n {\n 'name': 'to_replace_id_published',\n 'type': 'string'\n },\n {\n 'name': 'to_replace_id_body',\n 'type': 'string'\n },\n {\n 'name': 'to_replace_id_comments_no',\n 'type': 'int'\n },\n {\n 'name': 'to_replace_id_trackbacks_no',\n 'type': 'int'\n },\n {\n 'name': 'to_replace_id_extended',\n 'type': 'string'\n },\n {\n 'name': 'to_replace_id_has_extended',\n 'type': 'int'\n },\n {\n 'name': 'to_replace_id_author_id',\n 'type': 'int'\n },\n {\n 'name': 'to_replace_id_category_id',\n 'type': 'int'\n },\n {\n 'name': 'to_replace_id_is_draft',\n 'type': 'int'\n },\n {\n 'name': 'to_replace_id_updated',\n 'type': 'string'\n },\n {\n 'name': 'to_replace_id_created',\n 'type': 'string'\n },\n {\n 'name': 'to_replace_id_to_replace_id',\n 'type': 'int'\n },\n {\n 'name': 'to_replace_id_page_link',\n 'type': 'string'\n },\n {\n 'name': 'to_replace_id_in_rss',\n 'type': 'int'\n },\n {\n 'name': 'to_replace_id_parent_id',\n 'type': 'int'\n },\n {\n 'name': 'parent_id_id',\n 'type': 'int'\n },\n {\n 'name': 'parent_id_title',\n 'type': 'string'\n },\n {\n 'name': 'parent_id_published',\n 'type': 'string'\n },\n {\n 'name': 'parent_id_body',\n 'type': 'string'\n },\n {\n 'name': 'parent_id_comments_no',\n 'type': 'int'\n },\n {\n 'name': 'parent_id_trackbacks_no',\n 'type': 'int'\n },\n {\n 'name': 'parent_id_extended',\n 'type': 'string'\n },\n {\n 'name': 'parent_id_has_extended',\n 'type': 'int'\n },\n {\n 'name': 'parent_id_author_id',\n 'type': 'int'\n },\n {\n 'name': 'parent_id_category_id',\n 'type': 'int'\n },\n {\n 'name': 'parent_id_is_draft',\n 'type': 'int'\n },\n {\n 'name': 'parent_id_updated',\n 'type': 'string'\n },\n {\n 'name': 'parent_id_created',\n 'type': 'string'\n },\n {\n 'name': 'parent_id_to_replace_id',\n 'type': 'int'\n },\n {\n 'name': 'parent_id_page_link',\n 'type': 'string'\n },\n {\n 'name': 'parent_id_in_rss',\n 'type': 'int'\n },\n {\n 'name': 'parent_id_parent_id',\n 'type': 'int'\n }\n]", "$ xns" : "Roo.data", "* prop" : "reader", "totalProperty" : "total" } ] }, { "pageSize" : 20, "xtype" : "PagingToolbar", "emptyMsg" : "No cms_page found", "$ xns" : "Roo", "displayMsg" : "Displaying cms_page{0} - {1} of {2}", "displayInfo" : true, "* prop" : "footer", "items" : [ { "listeners" : { "render" : "function (_self)\n{\n _this.showDeleted = this;\n}", "click" : "function (_self, e)\n{\n _this.grid.footer.onClick.defer(100, _this.grid.footer, ['first'] );\n this.setText( this.pressed ? \"Hide Deleted\" : \"Show Deleted\");\n}" }, "xtype" : "Button", "String text" : "Show Deleted", "$ xns" : "Roo.Toolbar", "Boolean enableToggle" : true } ] }, { "xtype" : "Toolbar", "$ xns" : "Roo", "* prop" : "toolbar", "items" : [ { "listeners" : { "specialkey" : "function (_self, e)\n{\n_this.grid.footer.onClick('first');\n}", "render" : "function (_self)\n{\n_this.searchBox= _self;\n}" }, "xtype" : "TextField", "$ xns" : "Roo.form" }, { "listeners" : { "|click" : "function (_self, e)\n{\n_this.grid.footer.onClick('first');\n}" }, "xtype" : "Button", "cls" : "x-btn-icon", "$ icon" : "rootURL + '/Pman/templates/images/search.gif'", "$ xns" : "Roo.Toolbar" }, { "listeners" : { "|click" : "function (_self, e)\n{\n _this.searchBox.setValue('');\n \n _this.grid.footer.onClick('first');\n}" }, "xtype" : "Button", "cls" : "x-btn-icon", "$ icon" : "rootURL + '/Pman/templates/images/edit-clear.gif'", "$ xns" : "Roo.Toolbar" }, { "listeners" : { "render" : "function (_self)\n{\n _this.page_type = _self;\n \n new Pman.request({\r\n method : 'GET',\r\n url : baseURL + '/Roo/core_enum',\r\n params : {\r\n etype : 'cms_page_type',\n _columns : 'id,name,display_name',\n sort : 'seqid',\n dir : 'ASC',\n cmsTab : 1,\n limit : 1\r\n },\n success : function(res) {\n _self.setValue(res.data[0].id);\n _self.el.dom.value = res.data[0].display_name;\n _self.selectedData = res.data[0];\n }\r\n });\n}", "select" : "function (combo, record, index)\n{\n _this.grid.footer.onClick('first');\n _this.category_type.hide();\n if(record.data.name == 'blog'){\n _this.category_type.show();\n }\n combo.selectedData = record.data;\n \n}" }, "alwaysQuery" : true, "listWidth" : 400, "triggerAction" : "all", "fieldLabel" : "Page Type", "forceSelection" : true, "selectOnFocus" : true, "pageSize" : 20, "displayField" : "display_name", "emptyText" : "Select Status Type", "hiddenName" : "page_type", "minChars" : 2, "valueField" : "id", "xtype" : "ComboBox", "allowBlank" : false, "typeAhead" : false, "editable" : false, "$ xns" : "Roo.form", "name" : "page_type", "qtip" : "Select Page Type", "tpl" : "
{display_name}
", "loadingText" : "Searching...", "items" : [ { "listeners" : { "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.etype = 'cms_page_type';\n // o.params.cmsTab = 1;\n}\n" }, "xtype" : "Store", "remoteSort" : true, "$ sortInfo" : "{ direction : 'ASC', field: 'seqid' }", "$ xns" : "Roo.data", "* prop" : "store", "items" : [ { "$ url" : "baseURL + '/Roo/core_enum.php'", "method" : "GET", "xtype" : "HttpProxy", "$ xns" : "Roo.data", "* prop" : "proxy" }, { "id" : "id", "root" : "data", "xtype" : "JsonReader", "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"display_name\",\"type\":\"string\"}]", "$ xns" : "Roo.data", "* prop" : "reader", "totalProperty" : "total" } ] } ] }, { "listeners" : { "render" : "function (_self)\n{\n _this.category_type = _self;\n _this.category_type.hide();\n}", "select" : "function (combo, record, index)\n{\n _this.grid.footer.onClick('first');\n}" }, "listWidth" : 400, "triggerAction" : "all", "fieldLabel" : "Category", "forceSelection" : true, "selectOnFocus" : true, "pageSize" : 20, "displayField" : "name", "emptyText" : "Select Category Type", "hiddenName" : "category_type", "minChars" : 2, "valueField" : "id", "xtype" : "ComboBox", "allowBlank" : true, "typeAhead" : true, "editable" : false, "width" : 200, "$ xns" : "Roo.form", "qtip" : "Select Category Type", "tpl" : "
{name}
", "loadingText" : "Searching...", "items" : [ { "$ beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.etype = 'cms_page_type'; \n}\n", "remoteSort" : true, "xtype" : "Store", "$ sortInfo" : "{ direction : 'ASC', field: 'id' }", "$ xns" : "Roo.data", "* prop" : "store", "items" : [ { "$ url" : "baseURL + '/Roo/Cms_category_type.php'", "xtype" : "HttpProxy", "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, { "id" : "id", "root" : "data", "xtype" : "JsonReader", "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]", "$ xns" : "Roo.data", "* prop" : "reader", "totalProperty" : "total" } ] } ] }, { "xtype" : "Fill", "$ xns" : "Roo.Toolbar" }, { "listeners" : { "|click" : "function()\n{\n var ds = false;\n if(_this.grid.selModel.getSelections().length != 1){\n Roo.MessageBox.alert(\"Error\", \"Select page to delete\");\n return;\n }\n var sel = _this.grid.selModel.getSelected();\n if(sel.data.is_system_page){\n Roo.MessageBox.alert(\"Error\", \"System pages can not be deleted.\");\n return;\n }\n Roo.MessageBox.confirm(\"Confirm\", \n \"Are you sure you want to delete this, it can not be recovered if you make a mistake!\", \n function(res) {\n if (res != 'yes') {\n return;\n }\n new Pman.Request({\n method : 'POST',\n url : baseURL + '/Roo/cms_page',\n params : {\n _delete : sel.data.id\n },\n success : function() { \n _this.grid.footer.onClick('refresh');\n }\n });\n \n \n }\n );\n \n}\n" }, "text" : "Delete", "xtype" : "Button", "cls" : "x-btn-text-icon", "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'", "$ xns" : "Roo.Toolbar" }, { "listeners" : { "|click" : "function()\n{\n var ds = false;\n if(_this.grid.selModel.getSelections().length == 1){\n ds = _this.grid.selModel.getSelected().data;\n }\n \n var page_type_id = 0;\n var page_type_id_name = '';\n var page_type_id_display_name = '';\n var s = _this.page_type.selectedData;\n \n if(!ds){\n page_type_id = s.id;\n page_type_id_name = s.name;\n page_type_id_display_name = s.display_name;\n \n if(s.name == 'page'){\n page_type_id_display_name = 'Pages';\n }\n \n }\n \n var q = {\n id : 0,\n parent_id : ds ? ds.id : '',\n parent_id_title : ds ? ds.title : '',\n page_link : ds && !ds.is_element ? (ds.page_link + '/') : '',\n page_type_id : ds ? ds.page_type_id : page_type_id,\n page_type_id_name : ds ? ds.page_type_id_name : page_type_id_name,\n page_type_id_display_name : ds ? ds.page_type_id_display_name : page_type_id_display_name\n };\n \n _this.dialog.show( q, function() {\n _this.grid.footer.onClick('first');\n });\n}\n" }, "text" : "Add", "xtype" : "Button", "cls" : "x-btn-text-icon", "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'", "$ xns" : "Roo.Toolbar" } ] }, { "xtype" : "ColumnModel", "header" : "Active", "width" : 75, "$ renderer" : "function(v,x,r) {\n \n var state = v> 0 ? '' : '-checked';\n\n return '';\n}", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "is_draft" }, { "xtype" : "ColumnModel", "header" : "Created", "width" : 75, "$ renderer" : "function(v) { return v? v.format('d/M/Y') : '--' }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "created" }, { "xtype" : "ColumnModel", "header" : "Published", "width" : 75, "$ renderer" : "function(v,x,r) { \n if (r.data.is_draft) { \n return '[DRAFT]';\n }\n\n return v? v.format('d/M/Y') : '--' \n}", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "published" }, { "xtype" : "ColumnModel", "header" : "Page link / Name / Order", "width" : 120, "$ renderer" : "function(v,x,r) { \n if (r.data.page_type_id_name == 'page') {\n return String.format('{0}', v); \n }\n if (r.data.page_type_id_name == 'blog') {\n return String.format('{0}', v); \n }\n // what about categories.??\n \n // menu, or elements.. ??\n \n var d = r.json.depth || 0;\n var pr = ''; \n for (i = 0; i < d; i++) {\n pr += ' .. ';\n }\n if (r.data.page_type_id_name == 'element') { \n return String.format('{0}{1}', pr, v); \n }\n // menu..\n return String.format('{0}{1}', pr, v);\n \n \n}", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "page_link" }, { "xtype" : "ColumnModel", "header" : "Title", "width" : 200, "$ renderer" : "function(v,x,r) { \n\n var d = r.json.depth || 0;\n var pr = ''; \n for (i = 0; i < d; i++) {\n pr += ' .. ';\n }\n \n \n return String.format( '{1}{2}' + \n (r.data.is_draft ? '{0}' : '{0}'),\n pr + v,\n \n (r.data.page_type_id_name == 'menu' ? '('+r.data.seq_id +')' : ''),\n (r.data.category_page_id *1 ? ( '[' + r.data.category_page_id_title +'] ' ): '')\n );\n }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "title" }, { "xtype" : "ColumnModel", "header" : "Layout", "width" : 75, "$ renderer" : "function(v) { return String.format('{0}', v || ''); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "template_id_template" }, { "xtype" : "ColumnModel", "header" : "Type", "width" : 100, "$ renderer" : "function(v, x, r) { \n \n if (r.data.language.length) {\n return '>> ' + Pman.I18n.toName('l', r.data.language);\n }\n /* if (r.data.in_rss) {\n return String.format('{0}', v); \n }\n if (r.data.is_element) {\n return String.format('[Element:{0}]', r.data.element_id_name.length ? r.data.element_id_name : ''); \n }\n */\n return '';\n}", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "category_type_id_name" }, { "xtype" : "ColumnModel", "header" : "Links to", "width" : 200, "$ renderer" : "function(v,x,r) { \n\n if (r.data.is_attachment) {\n return \"[ATTACHMENT]\";\n }\n return String.format('{0}', v); \n }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "menu_page_id_title" }, { "xtype" : "ColumnModel", "header" : "Author", "width" : 75, "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "author_id_name" }, { "hidden" : true, "xtype" : "ColumnModel", "header" : "Parent", "width" : 75, "$ renderer" : "function(v) { return String.format('{0}', v || ''); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "parent_id_title" }, { "hidden" : true, "xtype" : "ColumnModel", "header" : "To replace", "width" : 75, "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "to_replace_id_title" }, { "xtype" : "ColumnModel", "header" : "Ex?", "width" : 25, "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "has_extended" }, { "hidden" : true, "xtype" : "ColumnModel", "header" : "T#", "width" : 25, "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "trackbacks_no" }, { "xtype" : "ColumnModel", "header" : "C#", "width" : 25, "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "comments_no" } ] } ] }, { "listeners" : { "render" : "function (_self)\n{\n _this.prepanel = _self;\n\n}" }, "$ autoCreate" : "{ tag: 'iframe', src : 'about:blank' }", "region" : "east", "fitToFrame" : true, "title" : "Preview (resize by dragging next to this bar)", "xtype" : "ContentPanel", "fitContainer" : true, "$ xns" : "Roo" } ] } ] } ] }