Several TinyMCE fixes and adjustments: Gecko spellchecker, Gallery options, single quote in image captions, see #8021
git-svn-id: http://svn.automattic.com/wordpress/trunk@9917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c5c662c4b8
commit
d301ed68fd
|
@ -392,13 +392,13 @@ h6 {
|
|||
|
||||
.wrap .updated,
|
||||
.wrap .error {
|
||||
margin: 5px 0 12px;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.wrap h2 {
|
||||
font: italic normal normal 24px/29px Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
|
||||
margin: 0;
|
||||
padding: 12px 15px 1px 0;
|
||||
padding: 12px 15px 2px 0;
|
||||
text-shadow: rgba(255,255,255,1) 0px 1px 0px;
|
||||
}
|
||||
|
||||
|
|
|
@ -134,6 +134,8 @@ function image_add_caption( $html, $id, $alt, $title, $align, $url, $size ) {
|
|||
$html = preg_replace( '/align[^\s\'"]+\s?/', '', $html );
|
||||
if ( empty($align) ) $align = 'none';
|
||||
|
||||
$alt = ! empty($alt) ? addslashes($alt) : '';
|
||||
|
||||
$shcode = '[caption id="' . $id . '" align="align' . $align
|
||||
. '" width="' . $width . '" caption="' . $alt . '"]' . $html . '[/caption]';
|
||||
|
||||
|
|
|
@ -140,10 +140,8 @@ var wpgallery = {
|
|||
if (t.el.nodeName != 'IMG') return;
|
||||
|
||||
all = ed.dom.decode(ed.dom.getAttrib(t.el, 'title'));
|
||||
all = all.substr(0, all.lastIndexOf(']'));
|
||||
all = all.replace(/\s*(order|link|columns|orderby)=['"]([^'"]+)['"]/gi, '');
|
||||
all += t.getSettings();
|
||||
all += ']';
|
||||
|
||||
ed.dom.setAttrib(t.el, 'title', all);
|
||||
t.getWin().tb_remove();
|
||||
|
|
|
@ -3115,7 +3115,7 @@ table.fixed {
|
|||
|
||||
.icon32 {
|
||||
float: left;
|
||||
height: 36px;
|
||||
margin: 8px 6px 0 0;
|
||||
height: 34px;
|
||||
margin: 7px 6px 0 0;
|
||||
width: 36px;
|
||||
}
|
||||
|
|
|
@ -389,7 +389,9 @@ wp_page_alt:"Next page...",
|
|||
add_media:"Add Media",
|
||||
add_image:"Add an Image",
|
||||
add_video:"Add Video",
|
||||
add_audio:"Add Audio"
|
||||
add_audio:"Add Audio",
|
||||
editgallery:"Edit Gallery",
|
||||
delgallery:"Delete Gallery"
|
||||
});
|
||||
|
||||
tinyMCE.addI18n("en.wpeditimage",{
|
||||
|
|
|
@ -412,7 +412,9 @@ wp_page_alt:"' . mce_escape( __('Next page...') ) . '",
|
|||
add_media:"' . mce_escape( __('Add Media') ) . '",
|
||||
add_image:"' . mce_escape( __('Add an Image') ) . '",
|
||||
add_video:"' . mce_escape( __('Add Video') ) . '",
|
||||
add_audio:"' . mce_escape( __('Add Audio') ) . '"
|
||||
add_audio:"' . mce_escape( __('Add Audio') ) . '",
|
||||
editgallery:"' . mce_escape( __('Edit Gallery') ) . '",
|
||||
delgallery:"' . mce_escape( __('Delete Gallery') ) . '"
|
||||
});
|
||||
|
||||
tinyMCE.addI18n("' . $language . '.wpeditimage",{
|
||||
|
|
|
@ -17,25 +17,7 @@
|
|||
|
||||
var post_id = tinymce.DOM.get('post_ID').value;
|
||||
tb_show('', tinymce.documentBaseURL + '/media-upload.php?post_id='+post_id+'&tab=gallery&TB_iframe=true');
|
||||
/*
|
||||
tinymce.DOM.setStyles('TB_window', {
|
||||
'width':( W - 50 )+'px',
|
||||
'height':'430px',
|
||||
'margin-left':'-'+parseInt((( W - 50 ) / 2),10) + 'px'
|
||||
});
|
||||
|
||||
if ( ! tinymce.isIE6 ) {
|
||||
tinymce.DOM.setStyles('TB_window', {
|
||||
'top':'30px',
|
||||
'marginTop':'0'
|
||||
});
|
||||
}
|
||||
|
||||
tinymce.DOM.setStyles('TB_iframeContent', {
|
||||
'width':( W - 50 )+'px',
|
||||
'height':'400px'
|
||||
});
|
||||
*/
|
||||
tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' );
|
||||
});
|
||||
|
||||
|
@ -80,8 +62,8 @@
|
|||
},
|
||||
|
||||
_do_gallery : function(co) {
|
||||
return co.replace(/\[gallery([^\]]*)\]/g, function(a){
|
||||
return '<img src="'+tinymce.baseURL+'/plugins/wpgallery/img/t.gif" class="wpGallery" title="'+tinymce.DOM.encode(a)+'" />';
|
||||
return co.replace(/\[gallery([^\]]*)\]/g, function(a,b){
|
||||
return '<img src="'+tinymce.baseURL+'/plugins/wpgallery/img/t.gif" class="wpGallery mceItem" title="gallery'+tinymce.DOM.encode(b)+'" />';
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -96,7 +78,7 @@
|
|||
var cls = getAttr(im, 'class');
|
||||
|
||||
if ( cls.indexOf('wpGallery') != -1 )
|
||||
return '<p>'+getAttr(im, 'title')+'</p>';
|
||||
return '<p>['+tinymce.trim(getAttr(im, 'title'))+']</p>';
|
||||
|
||||
return a;
|
||||
});
|
||||
|
@ -146,7 +128,7 @@
|
|||
id : 'wp_editgallery',
|
||||
width : '24',
|
||||
height : '24',
|
||||
title : ed.getLang('wpgallery.edit')
|
||||
title : ed.getLang('wordpress.editgallery')
|
||||
});
|
||||
|
||||
wp_editgallery.onmousedown = function(e) {
|
||||
|
@ -161,7 +143,7 @@
|
|||
id : 'wp_delgallery',
|
||||
width : '24',
|
||||
height : '24',
|
||||
title : ed.getLang('wpgallery.del')
|
||||
title : ed.getLang('wordpress.delgallery')
|
||||
});
|
||||
|
||||
wp_delgallery.onmousedown = function(e) {
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
/* This file contains the CSS data for the editable area(iframe) of TinyMCE */
|
||||
html {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.aligncenter,
|
||||
dl.aligncenter {
|
||||
|
@ -48,9 +51,7 @@ img.wpGallery {
|
|||
}
|
||||
|
||||
body.mceContentBody {
|
||||
background: #fff;
|
||||
color: #000;
|
||||
font: 13px/19px "Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;
|
||||
font: 13px/19px Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
|
||||
padding: 0.6em;
|
||||
margin: 0;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
|
||||
// Modify this version when tinyMCE plugins are changed.
|
||||
function mce_version() {
|
||||
return '20081125b';
|
||||
return '20081127';
|
||||
}
|
||||
add_filter( 'tiny_mce_version', 'mce_version' );
|
||||
|
||||
|
@ -225,7 +225,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
'edit' => __('Edit'),
|
||||
'submittedOn' => __('Submitted on:')
|
||||
) );
|
||||
$scripts->add( 'admin-gallery', '/wp-admin/js/gallery.js', array( 'jquery-ui-sortable' ), '20081125' );
|
||||
$scripts->add( 'admin-gallery', '/wp-admin/js/gallery.js', array( 'jquery-ui-sortable' ), '20081127' );
|
||||
$scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20081125' );
|
||||
|
||||
$scripts->add( 'admin-widgets', '/wp-admin/js/widgets.js', array( 'interface' ), '20081120' );
|
||||
|
|
Loading…
Reference in New Issue