Pman.Dialog.CoreEmail.bjs
authorAlan Knowles <alan@roojs.com>
Fri, 11 Dec 2015 08:34:21 +0000 (16:34 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 11 Dec 2015 08:34:21 +0000 (16:34 +0800)
Pman.Dialog.CoreEmail.js

Pman.Dialog.CoreEmail.bjs
Pman.Dialog.CoreEmail.js

index 754e985..0f50899 100644 (file)
                      "listeners" : {
                       "render" : "function (_self)\n{\n    _this.extendimgselect = _self;\n}",
                       "beforequery" : "function (combo, query, forceAll, cancel, e)\n{\n    var id = _this.form.findField('id').getValue() * 1;    \n    if (!id) {\n        Roo.MessageBox.alert(\"Error\", \"Save message 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    var editor = _this.form.findField('bodytext').editorcore;\n    \n    var curnode = editor.getSelectedNode()\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    } else {\n    \n        editor.insertAtCursor(\n            String.format('<img src=\"{0}/Images/{1}/{2}#image-{1}\">',\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    var editor = _this.form.findField('bodytext').editorcore;\n    \n    var curnode = editor.getSelectedNode()\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        editor.owner.fireEvent('editorevent', editor);\n    } else {\n    \n        editor.insertAtCursor(\n            String.format('<img src=\"{0}/Images/{1}/{2}#image-{1}\">',\n            baseURL,  record.data.id, record.data.filename\n            )\n        );\n\n    }\n    \n }"
                      },
                      "alwaysQuery" : true,
                      "listWidth" : 400,
index a808c32..8474dc6 100644 (file)
@@ -749,6 +749,7 @@ Pman.Dialog.CoreEmail = {
                                curnode.src= String.format('{0}/Images/{1}/{2}#image-{1}',
                                        baseURL,  record.data.id, record.data.filename
                                    );
+                               editor.owner.fireEvent('editorevent', editor);
                            } else {
                            
                                editor.insertAtCursor(