{ "name" : "Pman.Dialog.CmsBlog", "parent" : "", "title" : "Cms -Edit Blog Entry", "path" : "/home/alan/gitlive/Pman.Cms/Pman.Dialog.CmsBlog.bjs", "permname" : "", "modOrder" : "001", "strings" : { "2f26e35d61be90501e099089dc533638" : "Select Images", "f3912172e6bf57f8979782f4a2342233" : "Appears in Block", "95cb4f45ab7ff3984f25ab8668499020" : "Select Parent", "c1df1da7a1ce305a3b60af9d5733ac1d" : "Contents", "f2a6c498fb90ee345d997f888fce3b18" : "Delete", "ebd9bec4d70abc789d439c1f136b0538" : "Layout", "20bec77364d863100a1f9325873a8504" : "Select Page Type", "a517747c3d12f99244ae598910d979c5" : "Author", "31fde7b05ac8952dacf4af8a704074ec" : "Preview", "779e2624ddf330fb05b51ae59faf212d" : "Select Status Type", "5834d26e96dbae06029496e5b111dca2" : "Has Extended content?", "6a5b847af3d97df722040debdbccfbed" : "Page Type", "30d1a216420426fcbd43ca70acd4aa48" : "Select interests", "f03ab16cd58372c77ba45a3d9a5a1cb9" : "Draft", "cc6892c9705afcfa61c53698756ba51b" : "Page Class", "e6b391a8d2c4d45902a23a8b6585703d" : "URL", "03368e3c1eb4d2a9048775874301b19f" : "Select category", "ec211f7c20af43e742bf2570c3cb84f9" : "Add", "778551900655782c5c7827332b08cf3f" : "Save and close", "77174410b72decfd0b259961f1f65a8f" : "Attributes:", "b28a711cf7e94ec793ef926633997529" : "Seq", "1243daf593fa297e07ab03bf06d925af" : "Searching...", "8a53accfc94c2500b00575ce0e0d786f" : "Primary Image", "580b21aac58f1b73cece26e272cdfbee" : "Add Link", "8bc84316c4078bf66723fd019616d920" : "Descriptions", "83dad8107f9459efe2b4fabcf5b63108" : "Select Language", "76729937a5eb6b0fd88c42581161facd" : "Select Category ", "0b8d92bc19b720bb1065649535463409" : "Translations", "14c21301c0faf9d5561b8a580be21a13" : "Select class", "d41d8cd98f00b204e9800998ecf8427e" : "", "867343577fa1f33caa632a19543bd252" : "Keywords", "340c2ee497b85d5954b01c64de7f44f6" : "Select Person", "69dd756ae9c23191a5bb9b61f0857432" : "Date to Publish", "3adbdb3ac060038aa0e6e6c138ef9873" : "Category", "57e195426892c5515935f21d97228814" : "Extended Contents", "d88aa1eee60ba140f07d5f81769cec74" : "<< Edit Translations", "b9c49611cfda3259a2b837b39489e650" : "Add Image", "ea4788705e6873b424c65e91c2846b19" : "Cancel", "cfcd208495d565ef66e7dff9f98764da" : "0", "d8e4d1f5e445107e505b2cf63a1fb65c" : "Extra CSS", "bd88a20b53a47f7b5704a83a15ff5506" : "Saved Version", "31bb2f6e9b8fb11cbb7fb63c6025223f" : "Select Template", "c02bd0c22c290ae599ee2f3ff2023fd3" : "Manage Images / Attachments >>", "b78a3223503896721cca1303f776159b" : "Title", "39f64cc9436cacfbceda3b7bdeb8e24c" : "Styles (CSS)", "e64df1d7c22b9638f084ce8a4aff3ff3" : "Target URL", "98e93e8f7adfe14832db6caed713d849" : "Meta Tags", "a240fa27925a635b08dc28c9e4f9216d" : "Order", "287234a1ff35a314b5b6bc4e5828e745" : "Attributes", "99e7707748ae048e17c5810fad119e0b" : "Select Page", "06933067aafd48425d67bcb01bba5cb6" : "Update", "8adedb6a6226807ba810215dd3b3c61b" : "Menu links to Page", "b5216c9b4e0ac0afd9c76eb1d12ad1b9" : "Select Section", "2ad41a2ff4f0dac97d63aff331d5e6e7" : "Downloads first Attachment", "308f2757bfc9ce92fb00ff93fdffd279" : "Images / Attachments", "76eb64a1725ee953c664e15c9213b2fd" : "Extended Content", "1351017ac6423911223bc19a8cb7c653" : "Filename", "c9cc8cce247e49bae79f15173ce97354" : "Save", "e659b52eba1f0299b2d8ca3483919e72" : "Type:", "c70952e4ab3806c049737cd7d2b8896b" : "Interests", "aa6356b678bc4fc78253c9edf65bff03" : "Edit Page / Blog Entry", "d52f80f80467bb575253a5a39ca016a7" : "Page link / Name / Order", "fff0d600f8a0b5e19e88bfb821dd1157" : "Images", "30269022e9d8f51beaabb52e5d0de2b7" : "Parent", "fb3f11443065d5f4d8303ad913db9680" : "Replaces (ignore)" }, "named_strings" : { "seq_id_fieldLabel" : "b28a711cf7e94ec793ef926633997529", "to_replace_id_fieldLabel" : "fb3f11443065d5f4d8303ad913db9680", "template_id_template_clean_fieldLabel" : "ebd9bec4d70abc789d439c1f136b0538", "page_cls_name_fieldLabel" : "cc6892c9705afcfa61c53698756ba51b", "language_name_loadingText" : "1243daf593fa297e07ab03bf06d925af", "template_id_template_clean_qtip" : "76729937a5eb6b0fd88c42581161facd", "author_id_name_loadingText" : "1243daf593fa297e07ab03bf06d925af", "page_type_id_display_name_fieldLabel" : "6a5b847af3d97df722040debdbccfbed", "has_extended_boxLabel" : "5834d26e96dbae06029496e5b111dca2", "language_name_emptyText" : "83dad8107f9459efe2b4fabcf5b63108", "author_id_name_qtip" : "340c2ee497b85d5954b01c64de7f44f6", "menu_page_id_page_link_qtip" : "76729937a5eb6b0fd88c42581161facd", "published_fieldLabel" : "69dd756ae9c23191a5bb9b61f0857432", "author_id_name_fieldLabel" : "a517747c3d12f99244ae598910d979c5", "element_id_name_qtip" : "76729937a5eb6b0fd88c42581161facd", "parent_id_title_qtip" : "76729937a5eb6b0fd88c42581161facd", "element_id_name_loadingText" : "1243daf593fa297e07ab03bf06d925af", "author_id_name_emptyText" : "340c2ee497b85d5954b01c64de7f44f6", "is_attachment_boxLabel" : "2ad41a2ff4f0dac97d63aff331d5e6e7", "extra_css_fieldLabel" : "39f64cc9436cacfbceda3b7bdeb8e24c", "template_id_template_clean_loadingText" : "1243daf593fa297e07ab03bf06d925af", "parent_id_title_loadingText" : "1243daf593fa297e07ab03bf06d925af", "is_draft_fieldLabel" : "287234a1ff35a314b5b6bc4e5828e745", "add_link_emptyText" : "580b21aac58f1b73cece26e272cdfbee", "keywords_fieldLabel" : "867343577fa1f33caa632a19543bd252", "descriptions_fieldLabel" : "8bc84316c4078bf66723fd019616d920", "add_link_loadingText" : "1243daf593fa297e07ab03bf06d925af", "menu_page_id_page_link_emptyText" : "99e7707748ae048e17c5810fad119e0b", "element_id_name_fieldLabel" : "f3912172e6bf57f8979782f4a2342233", "is_element_value" : "cfcd208495d565ef66e7dff9f98764da", "target_url_fieldLabel" : "e64df1d7c22b9638f084ce8a4aff3ff3", "interest_name_fieldLabel" : "c70952e4ab3806c049737cd7d2b8896b", "language_name_qtip" : "83dad8107f9459efe2b4fabcf5b63108", "page_type_id_display_name_loadingText" : "1243daf593fa297e07ab03bf06d925af", "language_name_fieldLabel" : "83dad8107f9459efe2b4fabcf5b63108", "element_id_name_emptyText" : "b5216c9b4e0ac0afd9c76eb1d12ad1b9", "menu_page_id_page_link_fieldLabel" : "8adedb6a6226807ba810215dd3b3c61b", "page_type_id_display_name_emptyText" : "779e2624ddf330fb05b51ae59faf212d", "template_id_template_clean_emptyText" : "31bb2f6e9b8fb11cbb7fb63c6025223f", "menu_page_id_page_link_loadingText" : "1243daf593fa297e07ab03bf06d925af", "extended_fieldLabel" : "57e195426892c5515935f21d97228814", "add_link_qtip" : "76729937a5eb6b0fd88c42581161facd", "category_name_fieldLabel" : "3adbdb3ac060038aa0e6e6c138ef9873", "page_type_id_display_name_qtip" : "20bec77364d863100a1f9325873a8504", "body_fieldLabel" : "c1df1da7a1ce305a3b60af9d5733ac1d", "parent_id_title_emptyText" : "95cb4f45ab7ff3984f25ab8668499020", "title_fieldLabel" : "b78a3223503896721cca1303f776159b", "is_draft_boxLabel" : "f03ab16cd58372c77ba45a3d9a5a1cb9", "page_link_fieldLabel" : "d52f80f80467bb575253a5a39ca016a7", "parent_id_title_fieldLabel" : "30269022e9d8f51beaabb52e5d0de2b7" }, "items" : [ { "listeners" : { "show" : "function (_self)\n{\n // @see the contentpanel - center - resize handler.\n\n _this.centerLayoutPanel.getLayout().getRegion('south').showPanel(0);\n \n var w = Roo.lib.Dom.getViewWidth();\n var h = Roo.lib.Dom.getViewHeight();\n this.resizeTo(w-50, h-50);\n this.center();\n \n _this.centerLayoutPanel.getLayout().getRegion('south').resizeTo(h - 450);\n _this.westLayoutPanel.getLayout().getRegion('south').resizeTo(h - 450);\n \n Pman.Cms.pageEditAddCustomFields();\n \n _this.dialog.getLayout().getRegion('east').collapse();\n _this.dialog.getLayout().getRegion('west').collapse();\n \n /*\n var ew = Math.max(250, w-150); // was 350?/ why?\n //var eh = Math.max(250, h-350) ;\n var eh = 200;\n \n var bd = _this.form1.findField('body');\n \n if (bd.resizeEl) { \n bd.width = ew;\n bd.height = eh;\n // since render delays resize.. \n bd.resizeEl.resizeTo.defer(110, bd.resizeEl,[ bd.width, bd.height ] );\n //_this.bodycol.el.setWidth(bd.width+20);\n }\n var bd = _this.form2.findField('extended');\n if (bd.resizeEl) { \n bd.width = ew;\n bd.height = eh;\n // since render delays resize.. \n bd.resizeEl.resizeTo.defer(110, bd.resizeEl,[ bd.width, bd.height ] );\n // _this.extendcol.el.setWidth(bd.width+20);\n }\n var bd = _this.form3.findField('extra_css');\n if (bd) { \n bd.el.setWidth(ew);\n //_this.keywordscol.el.setWidth(ew+20);\n }\n \n // fix messed up scroll.\n _this.dialog.layout.el.dom.scrollTop = 0;\n \n */\n}" }, "modal" : true, "collapsible" : false, "background" : true, "title" : "Edit Page / Blog Entry", "xtype" : "LayoutDialog", "| function setStylesheets" : "function() {\n var sheets = [];\n \n sheets.push(rootURL + '/Pman/Cms/templates/undoreset.css');\n \n if(typeof(uiConfig) !== 'undefined' && typeof(uiConfig.cms_css) != 'undefined'){\n Roo.each(uiConfig.cms_css, function(v){\n sheets.push(rootURL + v);\n })\n }\n \n new Pman.Request({\n url : baseURL + '/Roo/Cms_page.php',\n method : 'GET',\n params : {\n _stylesheets : 1\n }, \n success : function(res) {\n Roo.log(res);\n if(res.data._stylesheets.length){\n var setting = res.data._stylesheets.split(\"\\n\");\n \n Roo.each(setting, function(s){\n sheets.push(s.replace('{rootURL}', rootURL));\n });\n \n }\n\n _this.form1.findField('body').removeStylesheets();\n _this.form2.findField('extended').removeStylesheets();\n\n _this.form1.findField('body').setStylesheets(sheets);\n _this.form2.findField('extended').setStylesheets(sheets);\n\n _this.trform1.findField('body').removeStylesheets();\n _this.trform2.findField('extended').removeStylesheets();\n \n _this.trform1.findField('body').setStylesheets(sheets);\n _this.trform2.findField('extended').setStylesheets(sheets);\n }\n });\n\n}", "width" : 850, "$ xns" : "Roo", "closable" : true, "resizable" : false, "height" : 600, "items" : [ { "xtype" : "LayoutRegion", "$ xns" : "Roo", "* prop" : "center", "titlebar" : false }, { "listeners" : { "expanded" : "function (_self)\n{\n var id = _this.form.findField('id').getValue() * 1;\n \n if(id < 1){\n Roo.MessageBox.alert('Error', 'Save first');\n this.collapse();\n return;\n }\n \n var w = Roo.lib.Dom.getViewWidth();\n var h = Roo.lib.Dom.getViewHeight();\n \n _self.resizeTo.defer(110, _self,[ w-400, h-350] );\n \n _this.panel.region.collapse();\n \n}", "collapsed" : "function (_self)\n{\n if(_this.trform && _this.trform.isDirty()){\n _this.trform.reset();\n }\n \n if(_this.trform1 && _this.trform1.isDirty()){\n _this.trform1.reset();\n }\n \n if(_this.trform2 && _this.trform2.isDirty()){\n _this.trform2.reset();\n }\n \n if(_this.trform3 && _this.trform3.isDirty()){\n _this.trform3.reset();\n }\n \n}", "beforecollapse" : "function (_self)\n{\n if(!_this.trform || !_this.trform1 || !_this.trform2){\n return true;\n }\n \n if(\n !_this.trform.isDirty() &&\n !_this.trform1.isDirty() &&\n !_this.trform2.isDirty() &&\n !_this.trform3.isDirty()\n ) {\n return true;\n }\n \n Roo.MessageBox.confirm(\n \"Confirm\", \n \"Do you want to save the translation\",\n function(res) {\n if(res != 'yes') {\n _self.collapse(true, true);\n return true;\n }\n \n return false;\n }\n );\n \n return false;\n}" }, "collapsedTitle" : "Translations", "collapsible" : true, "fitToFrame" : true, "title" : "Translations", "xtype" : "LayoutRegion", "collapsed" : true, "$ xns" : "Roo", "split" : true, "* prop" : "west", "titlebar" : true }, { "listeners" : { "expanded" : "function (_self)\n{\n var id = _this.form.findField('id').getValue() * 1;\n \n if(id < 1){\n Roo.MessageBox.alert('Error', 'Save first');\n this.collapse();\n return;\n }\n \n var w = Roo.lib.Dom.getViewWidth();\n var h = Roo.lib.Dom.getViewHeight();\n \n _self.resizeTo.defer(110, _self,[ w-400, h] );\n _this.dialog.getLayout().getRegion('west').collapse();\n}" }, "collapsedTitle" : "Images / Attachments", "collapsible" : true, "fitToFrame" : true, "title" : "Images / Attachments", "xtype" : "LayoutRegion", "collapsed" : true, "$ xns" : "Roo", "split" : true, "* prop" : "east", "titlebar" : true }, { "listeners" : { "render" : "function (_self)\n{\n _this.centerLayoutPanel = this;\n \n}" }, "Boolean fitContainer" : true, "xtype" : "NestedLayoutPanel", "Boolean fitToFrame" : true, "$ xns" : "Roo", "String region" : "center", "Boolean background" : false, "items" : [ { "xtype" : "BorderLayout", "$ xns" : "Roo", "* prop" : "layout", "items" : [ { "String tabPosition" : "top", "xtype" : "LayoutRegion", "$ xns" : "Roo", "* prop" : "center" }, { "String tabPosition" : "top", "xtype" : "LayoutRegion", "Number height" : 250, "$ xns" : "Roo", "* prop" : "south", "Boolean split" : true }, { "listeners" : { "resize" : "function (_self, width, height)\n{\n Roo.log(\"RESIZE, \" + width + ',' + height);\n \n var ew = Math.max(250, width - 10);\n var eh = _this.centerLayoutPanel.getLayout().getRegion('south').el.getHeight() - 30;\n \n if (!_this.form) {\n return;\n }\n var bd;\n if (_this.form1) {\n bd = _this.form1.findField('body');\n if (bd.resizeEl) { \n bd.width = ew;\n bd.height = eh;\n // since render delays resize.. \n Roo.log('resizing body to ' + bd.width); \n bd.resizeEl.resizeTo.defer(110, bd.resizeEl,[ bd.width, bd.height ] );\n // _this.bodycol.el.setWidth(bd.width+20);\n }\n }\n \n if (_this.form2) {\n bd = _this.form2.findField('extended');\n \n if (bd.resizeEl) { \n bd.width = ew;\n bd.height = eh;\n \n Roo.log('resizing extended to ' + bd.width);\n // since render delays resize.. \n bd.resizeEl.resizeTo.defer(110, bd.resizeEl,[ bd.width, bd.height ] );\n // _this.extendcol.el.setWidth(bd.width+20);\n }\n }\n if (_this.form3) {\n \n bd = _this.form3.findField('extra_css');\n if (bd) { \n bd.el.setWidth(ew);\n bd.el.setHeight(eh);\n // _this.keywordscol.el.setWidth(ew+20);\n }\n // fix for messed up rendering of dialog?\n }\n \n try { \n _this.dialog.layout.el.dom.scrollTop = 0;\n } catch (e) { \n // noop... - the above sometimes fails...\n }\n}", "render" : "function (_self)\n{\n _this.cpanel = _self;\n}" }, "autoScroll" : true, "fitToFrame" : true, "region" : "center", "xtype" : "ContentPanel", "$ xns" : "Roo", "items" : [ { "xtype" : "Toolbar", "$ xns" : "Roo", "* prop" : "toolbar", "items" : [ { "listeners" : { "click" : "function (_self, e)\n{\n if (_this.dialog.getLayout().getRegion('west').collapsed) {\n _this.dialog.getLayout().getRegion('west').expand();\n } else {\n _this.dialog.getLayout().getRegion('west').collapse();\n }\n \n}" }, "text" : "<< Edit Translations", "xtype" : "Button", "$ xns" : "Roo.Toolbar" }, { "xtype" : "Fill", "$ xns" : "Roo.Toolbar" }, { "listeners" : { "click" : "function (_self, e)\n{\n if (_this.panel.region.collapsed) {\n _this.panel.region.expand();\n } else {\n _this.panel.region.collapse();\n }\n \n}" }, "text" : "Manage Images / Attachments >>", "xtype" : "Button", "$ xns" : "Roo.Toolbar" } ] }, { "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 == 'setdata') {\n\n _this.form.addForm(_this.form1);\n _this.form.addForm(_this.form2);\n _this.form.addForm(_this.form3);\n _this.form.addForm(_this.form4);\n \n _this.dialog.setStylesheets();\n \n _this.dialog.getLayout().getRegion('west').collapse();\n _this.panel.region.collapse();\n \n _this.trpanel.el.mask('Save first');\n _this.panel.el.mask('Save first');\n \n _this.loaded = false;\n _this.interestsCol.hide();\n \n //_this.form.findField('category_page_id').fieldEl.select('label',true).first().dom.innerHTML = 'Category';\n \n if ( _this.data.id) {\n _this.dialog.el.mask(\"Loading\");\n this.load({ method: 'GET', params: { '_id' : _this.data.id, '_with_primary_image' : 1 }});\n } else {\n\n _this.loaded = true;\n var is_draft = typeof(_this.data.is_draft) != 'undefined' ? _this.data.is_draft : 1;\n this.findField('is_draft').setValue(is_draft);\n _this.page_type.setValue(_this.data.page_type_id);\n _this.page_type.el.dom.value = _this.data.page_type_id_display_name;\n \n if(_this.data.page_type_id_name == 'blog' && AppModules.indexOf(\"Crm\") !== -1){\n _this.interestsCol.show();\n }\n \n _this.form.showHide();\n \n /*\n var catlabel= _this.form.findField('category_page_id').fieldEl.select('label',true).first()\n catlabel.dom.innerHTML = 'Category'; \n if(_this.data.page_type_id_name == 'category'){\n catlabel.dom.innerHTML = 'Parent Category';\n } \n */\n \n /*\n var catlabel= _this.form.findField('parent_id').fieldEl.select('label',true).first();\n catlabel.dom.innerHTML = 'Parent page';\n if(_this.data.page_type_id_name == 'category'){\n catlabel.dom.innerHTML = 'Parent';\n }\n */\n \n }\n \n if(_this.data._is_copy){\n _this.form.is_copy();\n }\n \n return;\n }\n \n if (action.type == 'load') {\n \n //_this.data = action.result.data;\n \n var d = action.result.data;\n \n _this.dialog.el.unmask();\n _this.grid.getDataSource().load();\n \n _this.trform.reset();\n _this.trform1.reset();\n _this.trform2.reset();\n _this.trform3.reset();\n \n _this.trform.addForm(_this.trform1);\n _this.trform.addForm(_this.trform2);\n \n _this.form1.findField('body').originalValue = _this.form1.findField('body').getValue();\n _this.form2.findField('extended').originalValue = _this.form2.findField('extended').getValue();\n _this.form3.findField('extra_css').originalValue = _this.form3.findField('extra_css').getValue();\n _this.form4.findField('keywords').originalValue = _this.form4.findField('keywords').getValue();\n _this.form4.findField('descriptions').originalValue = _this.form4.findField('descriptions').getValue();\n \n /*\n var catlabel= _this.form.findField('category_page_id').fieldEl.select('label',true).first()\n catlabel.dom.innerHTML = 'Category'; \n \n if(_this.data.page_type_id_name == 'category'){\n catlabel.dom.innerHTML = 'Parent Category';\n }\n */\n /*\n var catlabel= _this.form.findField('parent_id').fieldEl.select('label',true).first();\n catlabel.dom.innerHTML = 'Parent page'; \n if(_this.data.page_type_id_name == 'category'){\n catlabel.dom.innerHTML = 'Parent';\n }\n */\n // better if this was not here... - not sure which project uses it?\n \n if(_this.data.page_type_id_name == 'blog' && AppModules.indexOf(\"Crm\") !== -1){\n _this.interestsCol.show();\n }\n \n if(typeof(d['interests']) != 'undefined'){\n _this.form.findField('interest').setValue(Roo.decode(d['interests']));\n }\n \n if(typeof(d['categories']) != 'undefined'){\n _this.form.findField('category').setValue(Roo.decode(d['categories']));\n }\n \n if(typeof(d['page_classes']) != 'undefined'){\n _this.form.findField('page_cls').setValue(Roo.decode(d['page_classes']));\n }\n \n _this.trpanel.el.unmask();\n _this.panel.el.unmask();\n \n // fix scrolling..\n _this.cpanel.el.dom.scrollTop = 0;\n \n // fix messed up scroll.\n _this.dialog.layout.el.dom.scrollTop = 0;\n \n return;\n }\n if (action.type =='submit') {\n \n _this.dialog.el.unmask();\n \n if(!_this.exit){\n this.load({ method: 'GET', params: { '_id' : action.result.data.id }});\n return;\n }\n \n _this.dialog.hide();\n \n\n if (_this.callback) {\n _this.callback.call(_this, action.result.data);\n }\n _this.form.reset();\n return;\n }\n}\n", "|rendered" : "function (_self)\n{\n _this.form = _self;\n}\n" }, "labelAlign" : "right", "$ url" : "baseURL + '/Roo/cms_page.php'", "| function is_copy" : "function() \n{ \n _this.form.setValues(_this.data);\n \n var d = _this.data;\n\n _this.dialog.el.unmask();\n _this.grid.getDataSource().load();\n \n _this.trform.reset();\n _this.trform1.reset();\n _this.trform2.reset();\n \n _this.form1.findField('body').originalValue = _this.form1.findField('body').getValue();\n _this.form2.findField('extended').originalValue = _this.form2.findField('extended').getValue();\n \n /*\n var catlabel= _this.form.findField('category_page_id').fieldEl.select('label',true).first()\n catlabel.dom.innerHTML = 'Category'; \n \n if(_this.data.page_type_id_name == 'category'){\n catlabel.dom.innerHTML = 'Parent Category';\n }\n */\n /*\n var catlabel= _this.form.findField('parent_id').fieldEl.select('label',true).first();\n catlabel.dom.innerHTML = 'Parent page'; \n if(_this.data.page_type_id_name == 'category'){\n catlabel.dom.innerHTML = 'Parent';\n }\n */\n // better if this was not here... - not sure which project uses it?\n \n if(_this.data.page_type_id_name == 'blog' && AppModules.indexOf(\"Crm\") !== -1){\n _this.interestsCol.show();\n }\n \n if(typeof(d['interests']) != 'undefined'){\n _this.form.findField('interest').setValue(Roo.decode(d['interests']));\n }\n \n if(typeof(d['categories']) != 'undefined'){\n _this.form.findField('category').setValue(Roo.decode(d['categories']));\n }\n \n if(typeof(d['page_classes']) != 'undefined'){\n _this.form.findField('page_cls').setValue(Roo.decode(d['page_classes']));\n }\n \n _this.trpanel.el.unmask();\n _this.panel.el.unmask();\n \n // fix scrolling..\n _this.cpanel.el.dom.scrollTop = 0;\n \n // fix messed up scroll.\n _this.dialog.layout.el.dom.scrollTop = 0;\n return;\n}", "method" : "POST", "style" : "margin: 5px", "xtype" : "Form", "labelWidth" : 120, "$ showHide" : "function()\n{\n var in_rss= 0;\n var is_menu= 0;\n var is_element = 0;\n var is_category = 0;\n \n var page_type_name = _this.form.findField('page_type_id_name').getValue();\n \n switch(page_type_name){\n case 'page' :\n is_element = 0;\n break;\n \n case 'element' :\n is_element = 1;\n break;\n \n case 'blog' :\n in_rss = 1;\n break;\n \n case 'menu' :\n is_menu = 1;\n break;\n \n case 'category' :\n in_rss = 1;\n is_category = 1;\n break;\n }\n \n var is_system_page = _this.form.findField('is_system_page').getValue() * 1;\n var is_attachment = _this.form.findField('is_attachment').getValue() * 1;\n var has_extended = _this.form.findField('has_extended').getValue() * 1;\n \n var vis = {\n is_attachment : !in_rss,\n \n category_type_id : in_rss && !is_menu,\n page_link : 1, //!in_rss, // always show page link.. may not be needed though..\n target_url : is_menu,\n \n category : !is_category,\n \n parent_id : !in_rss || is_category ,\n published : in_rss ,\n \n to_replace_id :false, // !in_rss, // is this used.\n is_draft : !is_system_page,\n author_id : in_rss && !is_menu && !is_attachment,\n \n template_id : !is_attachment && !is_menu && !is_system_page,\n element_id : is_element && !is_menu, \n menu_page_id : is_menu,\n page_cls : is_element\n \n // has_extended : !is_menu && !is_attachment, // always shown.\n // extended : has_extended && !is_menu && !is_attachment,\n // body : !is_attachment && !is_menu,\n //keywords : !is_attachment && !is_menu, \n // descriptions : !is_attachment && !is_menu\n // extra_css : !is_attachment && !is_menu\n };\n\n for(var k in vis) {\n var el = _this.form.findField(k);\n \n if (!el) {\n Roo.log(\"missing field \" + k);\n continue;\n }\n \n el.actionMode = 'fieldEl';\n \n if (vis[k]) {\n el.show();\n } else{\n el.hide();\n }\n \n }\n \n _this.centerLayoutPanel.getLayout().getRegion('south').show();\n _this.centerLayoutPanel.getLayout().getRegion('south').unhidePanel(0);\n _this.centerLayoutPanel.getLayout().getRegion('south').unhidePanel(1);\n _this.centerLayoutPanel.getLayout().getRegion('south').unhidePanel(2);\n _this.centerLayoutPanel.getLayout().getRegion('south').unhidePanel(3);\n \n if(is_attachment || is_menu){\n \n _this.centerLayoutPanel.getLayout().getRegion('south').hide();\n \n }\n \n if(!has_extended && !is_attachment && !is_menu){\n _this.centerLayoutPanel.getLayout().getRegion('south').hidePanel(1);\n _this.centerLayoutPanel.getLayout().getRegion('south').showPanel(0);\n }\n \n \n _this.trform.showHide();\n \n if(typeof(_this.form.editors) == 'undefined'){\n _this.form.editors = {\n body : _this.form1.findField('body').wrap.isVisible(),\n extended : _this.form2.findField('extended').wrap.isVisible()\n };\n \n if(_this.form.editors.body){\n setInterval(_this.form1.findField('body').autosave, 60000);\n }\n \n if(_this.form.editors.extended){\n setInterval(_this.form2.findField('extended').autosave, 60000);\n }\n }\n \n if(!_this.form.editors.body && _this.form1.findField('body').wrap.isVisible()){\n setInterval(_this.form1.findField('body').autosave, 60000);\n _this.form.editors.body = true;\n }\n \n if(!_this.form.editors.extended && _this.form2.findField('extended').wrap.isVisible()){\n setInterval(_this.form2.findField('extended').autosave, 60000);\n _this.form.editors.extended = true;\n }\n \n \n \n}\n", "$ xns" : "Roo.form", "items" : [ { "xtype" : "Column", "labelWidth" : 200, "width" : 750, "$ xns" : "Roo.form", "items" : [ { "labelAlign" : "right", "hideLabels" : false, "style" : "height:30px;overflow:hidden", "xtype" : "Row", "labelWidth" : 200, "width" : 850, "$ xns" : "Roo.form", "items" : [ { "fieldLabel" : "Type:", "xtype" : "Hidden", "width" : 1, "$ xns" : "Roo.form" }, { "hideLabels" : true, "xtype" : "Row", "style" : "height:30px;overflow:hidden", "labelWidth" : 0, "width" : 600, "$ xns" : "Roo.form", "items" : [ { "listeners" : { "render" : "function (_self)\n{\n _this.page_type = _self;\n}", "select" : "function (combo, record, index)\n{\n// _this.grid.footer.onClick('first');\n var page_type_name = record.data.name;\n _this.form.findField('page_type_id_name').setValue(page_type_name);\n if(page_type_name == 'blog' || page_type_name == 'category'){ // blog || category unset attachment\n _this.form.findField('is_attachment').setValue(0);\n return;\n }\n if (_this.form) { \n _this.form.showHide.defer(100, _this.form); \n } \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_id", "minChars" : 2, "valueField" : "id", "xtype" : "ComboBox", "typeAhead" : false, "editable" : false, "$ xns" : "Roo.form", "name" : "page_type_id_display_name", "qtip" : "Select Page Type", "tpl" : "