aboutsummaryrefslogtreecommitdiff
path: root/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/themes/advanced/js/image.js
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-10-04 20:59:33 -0700
committerBrett Profitt <brett.profitt@gmail.com>2011-10-04 20:59:33 -0700
commit2be122cb5032567e88bb926b8aac250fd488cf68 (patch)
treed8900899a18f29d39c39380bec119823f38f34e5 /mod/tinymce/vendor/tinymce/jscripts/tiny_mce/themes/advanced/js/image.js
parent34a7e57ef205362d6c093fa7234ca38977560bea (diff)
downloadelgg-2be122cb5032567e88bb926b8aac250fd488cf68.tar.gz
elgg-2be122cb5032567e88bb926b8aac250fd488cf68.tar.bz2
Refs #3853. Upgraded TinyMCE to 3.4.6. Embed still inserts the content in the wrong place for IE 8.
Diffstat (limited to 'mod/tinymce/vendor/tinymce/jscripts/tiny_mce/themes/advanced/js/image.js')
-rw-r--r--mod/tinymce/vendor/tinymce/jscripts/tiny_mce/themes/advanced/js/image.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/themes/advanced/js/image.js b/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/themes/advanced/js/image.js
index 257477282..6c2489a16 100644
--- a/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/themes/advanced/js/image.js
+++ b/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/themes/advanced/js/image.js
@@ -18,7 +18,7 @@ var ImageDialog = {
e = ed.selection.getNode();
- this.fillFileList('image_list', 'tinyMCEImageList');
+ this.fillFileList('image_list', tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList'));
if (e.nodeName == 'IMG') {
f.src.value = ed.dom.getAttrib(e, 'src');
@@ -39,7 +39,7 @@ var ImageDialog = {
fillFileList : function(id, l) {
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
- l = window[l];
+ l = typeof(l) === 'function' ? l() : window[l];
if (l && l.length > 0) {
lst.options[lst.options.length] = new Option('', '');
@@ -90,9 +90,13 @@ var ImageDialog = {
tinyMCEPopup.editor.execCommand('mceRepaint');
tinyMCEPopup.editor.focus();
} else {
- ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" />', {skip_undo : 1});
- ed.dom.setAttribs('__mce_tmp', args);
- ed.dom.setAttrib('__mce_tmp', 'id', '');
+ tinymce.each(args, function(value, name) {
+ if (value === "") {
+ delete args[name];
+ }
+ });
+
+ ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1});
ed.undoManager.add();
}