Image caption fixes from azaozz. see #6812
git-svn-id: http://svn.automattic.com/wordpress/trunk@8245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ce365c94a4
commit
f79638378a
|
@ -5,8 +5,10 @@ function send_to_editor(h) {
|
||||||
if (tinymce.isIE)
|
if (tinymce.isIE)
|
||||||
ed.selection.moveToBookmark(tinymce.EditorManager.activeEditor.windowManager.bookmark);
|
ed.selection.moveToBookmark(tinymce.EditorManager.activeEditor.windowManager.bookmark);
|
||||||
|
|
||||||
|
if ( h.indexOf('[wp_caption') != -1 )
|
||||||
|
h = ed.plugins.wpeditimage._do_shcode(h);
|
||||||
|
|
||||||
ed.execCommand('mceInsertContent', false, h);
|
ed.execCommand('mceInsertContent', false, h);
|
||||||
ed.execCommand('mceCleanup');
|
|
||||||
} else
|
} else
|
||||||
edInsertContent(edCanvas, h);
|
edInsertContent(edCanvas, h);
|
||||||
|
|
||||||
|
|
|
@ -460,14 +460,13 @@ var wpImage = {
|
||||||
tinyMCEPopup.close();
|
tinyMCEPopup.close();
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if ( DL ) {
|
if ( DL && DIV ) {
|
||||||
if ( f.link_href.value ) html = ed.dom.getOuterHTML(ed.dom.getParent(el, 'a'));
|
if ( f.link_href.value ) html = ed.dom.getOuterHTML(ed.dom.getParent(el, 'a'));
|
||||||
else html = ed.dom.getOuterHTML(el);
|
else html = ed.dom.getOuterHTML(el);
|
||||||
|
|
||||||
P = ed.dom.create('p', {}, html);
|
P = ed.dom.create('p', {}, html);
|
||||||
DL.parentNode.insertBefore(P,DL);
|
DIV.parentNode.insertBefore(P, DIV);
|
||||||
ed.dom.remove(DL.childNodes);
|
ed.dom.remove(DIV);
|
||||||
ed.dom.remove(DL);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -222,7 +222,7 @@ if ( $compress && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
|
||||||
// Setup cache info
|
// Setup cache info
|
||||||
if ( $disk_cache ) {
|
if ( $disk_cache ) {
|
||||||
|
|
||||||
$cacheKey = apply_filters('tiny_mce_version', '20080626');
|
$cacheKey = apply_filters('tiny_mce_version', '20080702');
|
||||||
|
|
||||||
foreach ( $initArray as $v )
|
foreach ( $initArray as $v )
|
||||||
$cacheKey .= $v;
|
$cacheKey .= $v;
|
||||||
|
|
|
@ -34,7 +34,7 @@ function wp_default_scripts( &$scripts ) {
|
||||||
$visual_editor = apply_filters('visual_editor', array('tiny_mce'));
|
$visual_editor = apply_filters('visual_editor', array('tiny_mce'));
|
||||||
$scripts->add( 'editor', false, $visual_editor, '20080321' );
|
$scripts->add( 'editor', false, $visual_editor, '20080321' );
|
||||||
|
|
||||||
$scripts->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080701' );
|
$scripts->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080702' );
|
||||||
|
|
||||||
// Modify this version when tinyMCE plugins are changed.
|
// Modify this version when tinyMCE plugins are changed.
|
||||||
$mce_version = apply_filters('tiny_mce_version', '20080701');
|
$mce_version = apply_filters('tiny_mce_version', '20080701');
|
||||||
|
@ -159,7 +159,7 @@ function wp_default_scripts( &$scripts ) {
|
||||||
'edit' => __('Edit'),
|
'edit' => __('Edit'),
|
||||||
) );
|
) );
|
||||||
$scripts->add( 'admin-gallery', '/wp-admin/js/gallery.js', array( 'jquery-ui-sortable' ), '20080520' );
|
$scripts->add( 'admin-gallery', '/wp-admin/js/gallery.js', array( 'jquery-ui-sortable' ), '20080520' );
|
||||||
$scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20080701' );
|
$scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20080702' );
|
||||||
$scripts->localize( 'upload', 'uploadL10n', array(
|
$scripts->localize( 'upload', 'uploadL10n', array(
|
||||||
'browseTitle' => attribute_escape(__('Browse your files')),
|
'browseTitle' => attribute_escape(__('Browse your files')),
|
||||||
'back' => __('« Back'),
|
'back' => __('« Back'),
|
||||||
|
|
Loading…
Reference in New Issue