]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/tinymce/themes/advanced/js/image.js
Wordpress 3.2
[autoinstalls/wordpress.git] / wp-includes / js / tinymce / themes / advanced / js / image.js
index a5ad46f72765cc13f5c2cfc264cab00b31e506f8..54af100bd67864e16973d6714032e23b6818ff64 100644 (file)
@@ -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, '<img id="__mce_tmp" />', {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');
                }
        },