From f58509e2f7043f999623626abfc8c9d460737cc1 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 3 Jan 2019 14:48:26 +0800 Subject: [PATCH] Fix #5650 - fix images thumbnails and adding in CMS --- Pman.Dialog.CmsBlog.bjs | 104 ++++++++++++++++++++-------------------- Pman.Dialog.CmsBlog.js | 12 ++--- 2 files changed, 58 insertions(+), 58 deletions(-) diff --git a/Pman.Dialog.CmsBlog.bjs b/Pman.Dialog.CmsBlog.bjs index 7bfe6faf..5f11507b 100644 --- a/Pman.Dialog.CmsBlog.bjs +++ b/Pman.Dialog.CmsBlog.bjs @@ -2,7 +2,7 @@ "name" : "Pman.Dialog.CmsBlog", "parent" : "", "title" : "Cms -Edit Blog Entry", - "path" : "/home/edward/gitlive/Pman.Cms/Pman.Dialog.CmsBlog.bjs", + "path" : "/home/alan/gitlive/Pman.Cms/Pman.Dialog.CmsBlog.bjs", "permname" : "", "modOrder" : "001", "strings" : { @@ -215,8 +215,8 @@ "render" : "function (_self)\n{\n _this.cpanel = _self;\n}" }, "autoScroll" : true, - "fitToFrame" : true, "region" : "center", + "fitToFrame" : true, "xtype" : "ContentPanel", "$ xns" : "Roo", "items" : [ @@ -253,9 +253,9 @@ "|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" }, + "| 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}", "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", @@ -286,8 +286,8 @@ }, { "hideLabels" : true, - "xtype" : "Row", "style" : "height:30px;overflow:hidden", + "xtype" : "Row", "labelWidth" : 0, "width" : 600, "$ xns" : "Roo.form", @@ -330,8 +330,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/core_enum.php'", - "xtype" : "HttpProxy", "method" : "GET", + "xtype" : "HttpProxy", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -386,8 +386,8 @@ }, { "hideLabels" : true, - "xtype" : "Row", "style" : "height:30px;overflow:hidden", + "xtype" : "Row", "labelWidth" : 0, "width" : 540, "$ xns" : "Roo.form", @@ -462,8 +462,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/core_person'", - "xtype" : "HttpProxy", "method" : "GET", + "xtype" : "HttpProxy", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -482,16 +482,16 @@ }, { "fieldLabel" : "Category", - "hiddenName" : "category", "xtype" : "ComboBoxArray", + "hiddenName" : "category", "width" : 400, "$ xns" : "Roo.form", "name" : "category_name", "items" : [ { + "listWidth" : 400, "Number pageSize" : 40, "alwaysQuery" : true, - "listWidth" : 400, "triggerAction" : "all", "fieldLabel" : "Category", "forceSelection" : true, @@ -521,8 +521,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/cms_page.php'", - "xtype" : "HttpProxy", "method" : "GET", + "xtype" : "HttpProxy", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -580,8 +580,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/cms_page.php'", - "method" : "GET", "xtype" : "HttpProxy", + "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -646,9 +646,9 @@ "name" : "target_url" }, { + "alwaysQuery" : true, "listWidth" : 400, "$ tpl" : "'
{template_clean}
'\n", - "alwaysQuery" : true, "triggerAction" : "all", "fieldLabel" : "Layout", "forceSelection" : true, @@ -681,8 +681,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/Cms_template'", - "method" : "GET", "xtype" : "HttpProxy", + "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -735,8 +735,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/Cms_template_element'", - "method" : "GET", "xtype" : "HttpProxy", + "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -789,8 +789,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/cms_page.php'", - "method" : "GET", "xtype" : "HttpProxy", + "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -809,8 +809,8 @@ }, { "fieldLabel" : "Page Class", - "xtype" : "ComboBoxArray", "hiddenName" : "page_cls", + "xtype" : "ComboBoxArray", "width" : 400, "$ xns" : "Roo.form", "name" : "page_cls_name", @@ -847,8 +847,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/core_enum.php'", - "method" : "GET", "xtype" : "HttpProxy", + "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -909,8 +909,8 @@ "render" : "function (_self)\n{\n _this.interests = _self;\n /*\n _self.combo.addicon.setStyle( {\n position : 'absolute',\n right: '9px',\n top : '2px',\n float : 'left'\n });\n */\n}" }, "fieldLabel" : "Interests", - "xtype" : "ComboBoxArray", "hiddenName" : "interest", + "xtype" : "ComboBoxArray", "width" : 300, "$ xns" : "Roo.form", "name" : "interest_name", @@ -947,8 +947,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/Core_enum.php'", - "method" : "GET", "xtype" : "HttpProxy", + "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -1014,8 +1014,8 @@ "rendered" : "function (form)\n{\n _this.form1 = form;\n}" }, "$ url" : "baseURL + '/Roo/cms_page.php'", - "method" : "POST", "xtype" : "Form", + "method" : "POST", "labelWidth" : 80, "String labelAlign" : "top", "$ xns" : "Roo.form", @@ -1032,8 +1032,8 @@ "autosave" : "function (_self)\n{\n Roo.log('autosave');\n \n var id = _this.form.findField('id').getValue() * 1;\n /*\n if(!_self.editorcore.sourceEditMode){\n _self.syncValue();\n }else{\n _self.pushValue();\n }\n */\n new Pman.Request({\n url : baseURL + '/Roo/Events.php',\n method :'POST',\n params : {\n id : 0,\n action : 'AUTOSAVE',\n on_id : (id > 0) ? id : 0,\n on_table : 'cms_page',\n remarks : 'BODY',\n source: _self.getValue()\n },\n success : function() {\n _self.originalValue = _self.getValue();\n \n },\n failure : function() \n {\n //Roo.MessageBox.alert(\"Error\", \"autosave failed\");\n Roo.log('body autosave failed?!');\n }\n });\n \n}" }, "xtype" : "HtmlEditor", - "width" : 550, "$ xns" : "Roo.form", + "width" : 550, "String fieldLabel" : "Contents", "resizable" : "s", "$ autosave" : "function() {\n \n var body = _this.form1.findField('body');\n \n if(!body.wrap.isVisible(true) || body.getValue() == '' || !body.isDirty()){\n Roo.log('body not dirty');\n return;\n }\n \n Roo.log('body dirty, auto save!');\n \n body.fireEvent('autosave', body);\n \n \n}\n", @@ -1050,11 +1050,11 @@ "listeners" : { "render" : "function (_self)\n{\n _this.bodyimgselect = _self;\n}", "beforequery" : "function (combo, query, forceAll, cancel, e)\n{\n \n var id = _this.form.findField('id').getValue() * 1; \n if (!id) {\n Roo.MessageBox.alert(\"Error\", \"Save Document First before adding images\");\n return false;\n }\n}", - "select" : "function (combo, record, index)\n{\n Roo.log(record);\n (function() { \n combo.setValue('');\n }).defer(100);\n \n var editor = _this.form.findField('body').editorcore;\n \n var curnode = editor.getSelectedNode();\n \n if (curnode && curnode.tagName == 'IMG') {\n curnode.src= String.format('{0}/Images/{1}/{2}#attachment-{1}',\n baseURL, record.data.id, record.data.filename\n );\n // note -forces an update... hopefully...\n editor.owner.fireEvent('editorevent', editor, false);\n } else {\n \n editor.insertAtCursor(\n String.format('',\n baseURL, record.data.id, record.data.filename\n )\n );\n\n }\n \n}" + "select" : "function (combo, record, index)\n{\n Roo.log(record);\n (function() { \n combo.setValue('');\n }).defer(100);\n \n var editor = _this.form1.findField('body').editorcore;\n \n var curnode = editor.getSelectedNode();\n \n if (curnode && curnode.tagName == 'IMG') {\n curnode.src= String.format('{0}/Images/{1}/{2}#attachment-{1}',\n baseURL, record.data.id, record.data.filename\n );\n // note -forces an update... hopefully...\n editor.owner.fireEvent('editorevent', editor, false);\n } else {\n \n editor.insertAtCursor(\n String.format('',\n baseURL, record.data.id, record.data.filename\n )\n );\n\n }\n \n}" }, - "$ tpl" : "'
{filename}
'", - "alwaysQuery" : true, "listWidth" : 400, + "$ tpl" : "'

{filename}
'", + "alwaysQuery" : true, "triggerAction" : "all", "fieldLabel" : "Images", "forceSelection" : true, @@ -1076,7 +1076,7 @@ "items" : [ { "listeners" : { - "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n\n var id = _this.form.findField('id').getValue() * 1; \n if (!id) {\n Roo.MessageBox.alert(\"Error\", \"Save press release first\");\n return false;\n }\n o.params.onid = id;\n o.params.ontable = 'cms_page';\n // o.params.imgtype = 'PressRelease';\n //o.params['query[imagesize]'] = '150x150';\n // set more here\n}\n" + "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n\n var id = _this.form.findField('id').getValue() * 1; \n if (!id) {\n Roo.MessageBox.alert(\"Error\", \"Save press release first\");\n return false;\n }\n o.params.onid = id;\n o.params.ontable = 'cms_page';\n // o.params.imgtype = 'PressRelease';\n o.params['query[imagesize]'] = '150x150';\n // set more here\n}\n" }, "xtype" : "Store", "remoteSort" : true, @@ -1086,8 +1086,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/Images.php'", - "xtype" : "HttpProxy", "method" : "GET", + "xtype" : "HttpProxy", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -1142,8 +1142,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/cms_page.php'", - "method" : "GET", "xtype" : "HttpProxy", + "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -1204,8 +1204,8 @@ "rendered" : "function (form)\n{\n _this.form2 = form;\n}" }, "$ url" : "baseURL + '/Roo/cms_page.php'", - "method" : "POST", "xtype" : "Form", + "method" : "POST", "labelWidth" : 80, "String labelAlign" : "top", "$ xns" : "Roo.form", @@ -1240,10 +1240,11 @@ "listeners" : { "render" : "function (_self)\n{\n _this.extendimgselect = _self;\n}", "beforequery" : "function (combo, query, forceAll, cancel, e)\n{\n \n var id = _this.form.findField('id').getValue() * 1; \n if (!id) {\n Roo.MessageBox.alert(\"Error\", \"Save Document First before adding images\");\n return false;\n }\n}", - "select" : "function (combo, record, index)\n{\n Roo.log(record);\n (function() { \n combo.setValue('');\n }).defer(100);\n \n var editor = _this.form.findField('extended').editorcore;\n \n var curnode = editor.getSelectedNode();\n \n if (curnode && curnode.tagName == 'IMG') {\n curnode.src= String.format('{0}/Images/{1}/{2}#image-{1}',\n baseURL, record.data.id, record.data.filename\n );\n // note -forces an update... hopefully...\n editor.owner.fireEvent('editorevent', editor, false);\n } else {\n \n editor.insertAtCursor(\n String.format('',\n baseURL, record.data.id, record.data.filename\n )\n );\n\n }\n \n}" + "select" : "function (combo, record, index)\n{\n Roo.log(record);\n (function() { \n combo.setValue('');\n }).defer(100);\n \n var editor = _this.form2.findField('extended').editorcore;\n \n var curnode = editor.getSelectedNode();\n \n if (curnode && curnode.tagName == 'IMG') {\n curnode.src= String.format('{0}/Images/{1}/{2}#image-{1}',\n baseURL, record.data.id, record.data.filename\n );\n // note -forces an update... hopefully...\n editor.owner.fireEvent('editorevent', editor, false);\n } else {\n \n editor.insertAtCursor(\n String.format('',\n baseURL, record.data.id, record.data.filename\n )\n );\n\n }\n \n}" }, "alwaysQuery" : true, "listWidth" : 400, + "$ tpl" : "'

{filename}
'", "triggerAction" : "all", "fieldLabel" : "Images", "forceSelection" : true, @@ -1260,12 +1261,11 @@ "$ xns" : "Roo.form", "* prop" : "btns[]", "qtip" : "Select Images", - "tpl" : "
{filename}
", "loadingText" : "Searching...", "items" : [ { "listeners" : { - "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n\n var id = _this.form.findField('id').getValue() * 1; \n if (!id) {\n Roo.MessageBox.alert(\"Error\", \"Save press release first\");\n return false;\n }\n o.params.onid = id;\n o.params.ontable = 'cms_page';\n // o.params.imgtype = 'PressRelease';\n //o.params['query[imagesize]'] = '150x150';\n // set more here\n}\n" + "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n\n var id = _this.form.findField('id').getValue() * 1; \n if (!id) {\n Roo.MessageBox.alert(\"Error\", \"Save press release first\");\n return false;\n }\n o.params.onid = id;\n o.params.ontable = 'cms_page';\n // o.params.imgtype = 'PressRelease';\n o.params['query[imagesize]'] = '150x150';\n // set more here\n}\n" }, "xtype" : "Store", "remoteSort" : true, @@ -1275,8 +1275,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/Images.php'", - "method" : "GET", "xtype" : "HttpProxy", + "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -1331,8 +1331,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/cms_page.php'", - "xtype" : "HttpProxy", "method" : "GET", + "xtype" : "HttpProxy", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -1367,8 +1367,8 @@ }, { "xtype" : "ToolbarContext", - "$ styles" : "typeof(uiConfig) != 'undefined' ? (uiConfig['Roo.form.HtmlEditor.ToolbarContext.styles'] || {}) : {}", "$ xns" : "Roo.form.HtmlEditor", + "$ styles" : "typeof(uiConfig) != 'undefined' ? (uiConfig['Roo.form.HtmlEditor.ToolbarContext.styles'] || {}) : {}", "* prop" : "toolbars[]" } ] @@ -1393,8 +1393,8 @@ "rendered" : "function (form)\n{\n _this.form3 = form;\n}" }, "$ url" : "baseURL + '/Roo/cms_page.php'", - "xtype" : "Form", "method" : "POST", + "xtype" : "Form", "labelWidth" : 80, "String labelAlign" : "top", "$ xns" : "Roo.form", @@ -1432,8 +1432,8 @@ "rendered" : "function (form)\n{\n _this.form4 = form;\n}" }, "$ url" : "baseURL + '/Roo/cms_page.php'", - "method" : "POST", "xtype" : "Form", + "method" : "POST", "labelWidth" : 80, "String labelAlign" : "top", "$ xns" : "Roo.form", @@ -1472,9 +1472,9 @@ "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", - "fitToframe" : true, "title" : "Images / Attachments", "xtype" : "GridPanel", "fitContainer" : true, @@ -1504,8 +1504,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/Images.php'", - "method" : "GET", "xtype" : "HttpProxy", + "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -1559,8 +1559,8 @@ }, { "xtype" : "ColumnModel", - "width" : 200, "header" : "Filename", + "width" : 200, "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -1568,8 +1568,8 @@ }, { "xtype" : "ColumnModel", - "width" : 50, "header" : "Order", + "width" : 50, "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -1585,8 +1585,8 @@ "focus" : "function (_self)\n{\n if (this.value == 0) {\n this.el.dom.value = '';\n }\n}" }, "xtype" : "NumberField", - "$ xns" : "Roo.form", "decimalPrecision" : 0, + "$ xns" : "Roo.form", "* prop" : "field" } ] @@ -1595,8 +1595,8 @@ }, { "xtype" : "ColumnModel", - "width" : 100, "header" : "Title", + "width" : 100, "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -1618,8 +1618,8 @@ }, { "xtype" : "ColumnModel", - "width" : 300, "header" : "URL", + "width" : 300, "$ renderer" : "function(v)\n{\n return String.format('{0}', (v) ? v : '');\n}", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -1679,8 +1679,8 @@ "render" : "function (_self)\n{\n _this.trpanel = _self;\n}" }, "autoScroll" : true, - "fitToFrame" : true, "region" : "center", + "fitToFrame" : true, "xtype" : "ContentPanel", "$ xns" : "Roo", "items" : [ @@ -1751,8 +1751,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/Cms_page.php'", - "method" : "GET", "xtype" : "HttpProxy", + "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -1853,8 +1853,8 @@ "rendered" : "function (form)\n{\n _this.trform1 = form;\n}" }, "$ url" : "baseURL + '/Roo/cms_page.php'", - "xtype" : "Form", "method" : "POST", + "xtype" : "Form", "labelWidth" : 80, "String labelAlign" : "top", "$ xns" : "Roo.form", @@ -1890,9 +1890,9 @@ "beforequery" : "function (combo, query, forceAll, cancel, e)\n{\n \n var id = _this.form.findField('id').getValue() * 1; \n if (!id) {\n Roo.MessageBox.alert(\"Error\", \"Save press release first\");\n return false;\n }\n}", "select" : "function (combo, record, index)\n{\n Roo.log(record);\n (function() { \n combo.setValue('');\n }).defer(100);\n \n var editor = _this.trform.findField('body').editorcore;\n \n var curnode = editor.getSelectedNode();\n \n if (curnode && curnode.tagName == 'IMG') {\n curnode.src= String.format('{0}/Images/{1}/{2}#attachment-{1}',\n baseURL, record.data.id, record.data.filename\n );\n // note -forces an update... hopefully...\n editor.owner.fireEvent('editorevent', editor, false);\n } else {\n \n editor.insertAtCursor(\n String.format('',\n baseURL, record.data.id, record.data.filename\n )\n );\n\n }\n \n}" }, + "alwaysQuery" : true, "listWidth" : 400, "$ tpl" : "'
{filename}
'", - "alwaysQuery" : true, "triggerAction" : "all", "fieldLabel" : "Images", "forceSelection" : true, @@ -1923,8 +1923,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/Images.php'", - "xtype" : "HttpProxy", "method" : "GET", + "xtype" : "HttpProxy", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -1979,8 +1979,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/cms_page.php'", - "method" : "GET", "xtype" : "HttpProxy", + "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -2040,8 +2040,8 @@ "rendered" : "function (form)\n{\n _this.trform2 = form;\n}" }, "$ url" : "baseURL + '/Roo/cms_page.php'", - "xtype" : "Form", "method" : "POST", + "xtype" : "Form", "labelWidth" : 80, "String labelAlign" : "top", "$ xns" : "Roo.form", @@ -2089,8 +2089,8 @@ }, { "xtype" : "ToolbarContext", - "$ xns" : "Roo.form.HtmlEditor", "$ styles" : "typeof(uiConfig) != 'undefined' ? (uiConfig['Roo.form.HtmlEditor.ToolbarContext.styles'] || {}) : {}", + "$ xns" : "Roo.form.HtmlEditor", "* prop" : "toolbars[]" } ] @@ -2115,8 +2115,8 @@ "rendered" : "function (form)\n{\n _this.trform3 = form;\n}" }, "$ url" : "baseURL + '/Roo/cms_page.php'", - "method" : "POST", "xtype" : "Form", + "method" : "POST", "labelWidth" : 80, "String labelAlign" : "top", "$ xns" : "Roo.form", diff --git a/Pman.Dialog.CmsBlog.js b/Pman.Dialog.CmsBlog.js index af743ce9..f0d5adfd 100644 --- a/Pman.Dialog.CmsBlog.js +++ b/Pman.Dialog.CmsBlog.js @@ -2118,7 +2118,7 @@ Pman.Dialog.CmsBlog = { qtip : _this._strings['2f26e35d61be90501e099089dc533638'] /* Select Images */, queryParam : 'search', selectOnFocus : true, - tpl : '
{filename}
', + tpl : '

{filename}
', triggerAction : 'all', typeAhead : true, valueField : 'id', @@ -2144,7 +2144,7 @@ Pman.Dialog.CmsBlog = { combo.setValue(''); }).defer(100); - var editor = _this.form.findField('body').editorcore; + var editor = _this.form1.findField('body').editorcore; var curnode = editor.getSelectedNode(); @@ -2184,7 +2184,7 @@ Pman.Dialog.CmsBlog = { o.params.onid = id; o.params.ontable = 'cms_page'; // o.params.imgtype = 'PressRelease'; - //o.params['query[imagesize]'] = '150x150'; + o.params['query[imagesize]'] = '150x150'; // set more here } }, @@ -2457,7 +2457,7 @@ Pman.Dialog.CmsBlog = { pageSize : 20, qtip : _this._strings['2f26e35d61be90501e099089dc533638'] /* Select Images */, selectOnFocus : true, - tpl : '
{filename}
', + tpl : '

{filename}
', triggerAction : 'all', typeAhead : true, valueField : 'id', @@ -2483,7 +2483,7 @@ Pman.Dialog.CmsBlog = { combo.setValue(''); }).defer(100); - var editor = _this.form.findField('extended').editorcore; + var editor = _this.form2.findField('extended').editorcore; var curnode = editor.getSelectedNode(); @@ -2523,7 +2523,7 @@ Pman.Dialog.CmsBlog = { o.params.onid = id; o.params.ontable = 'cms_page'; // o.params.imgtype = 'PressRelease'; - //o.params['query[imagesize]'] = '150x150'; + o.params['query[imagesize]'] = '150x150'; // set more here } }, -- 2.39.2