X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/11be8dc178e77d0b46189bbd8e33a216a9b90942..38ca813a0e312e2768e5b9519f0415cd0aa84781:/wp-includes/js/tinymce/themes/advanced/js/image.js diff --git a/wp-includes/js/tinymce/themes/advanced/js/image.js b/wp-includes/js/tinymce/themes/advanced/js/image.js index a5ad46f7..54af100b 100644 --- a/wp-includes/js/tinymce/themes/advanced/js/image.js +++ b/wp-includes/js/tinymce/themes/advanced/js/image.js @@ -29,7 +29,6 @@ var ImageDialog = { f.width.value = ed.dom.getAttrib(e, 'width'); f.height.value = ed.dom.getAttrib(e, 'height'); f.insert.value = ed.getLang('update'); - f.class_name.value = ed.dom.getAttrib(e, 'class'); this.styleVal = ed.dom.getAttrib(e, 'style'); selectByValue(f, 'image_list', f.src.value); selectByValue(f, 'align', this.getAttrib(e, 'align')); @@ -78,7 +77,7 @@ var ImageDialog = { args.style = this.styleVal; tinymce.extend(args, { - src : f.src.value, + src : f.src.value.replace(/ /g, '%20'), alt : f.alt.value, width : f.width.value, height : f.height.value, @@ -89,6 +88,8 @@ var ImageDialog = { if (el && el.nodeName == 'IMG') { ed.dom.setAttribs(el, args); + tinyMCEPopup.editor.execCommand('mceRepaint'); + tinyMCEPopup.editor.focus(); } else { ed.execCommand('mceInsertContent', false, '', {skip_undo : 1}); ed.dom.setAttribs('__mce_tmp', args); @@ -160,8 +161,8 @@ var ImageDialog = { } // Merge - st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st)); - this.styleVal = dom.serializeStyle(st); + st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st), 'img'); + this.styleVal = dom.serializeStyle(st, 'img'); } },