Bring back the Fullscreen button in Quicktags, fixes #19194

git-svn-id: https://develop.svn.wordpress.org/trunk@19215 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2011-11-08 16:53:31 +00:00
parent dd11766207
commit a56cd15128
3 changed files with 12 additions and 9 deletions

View File

@ -224,7 +224,7 @@ function edButton(id, display, tagStart, tagEnd, access, open) {
};
qt._buttonsInit = function() {
var t = this, canvas, name, settings, theButtons, html, inst, ed, id, i, use = '',
var t = this, canvas, name, settings, theButtons, html, inst, ed, id, i, use,
defaults = ',strong,em,link,block,del,ins,img,ul,ol,li,code,more,spell,close,';
for ( inst in t.instances ) {
@ -237,6 +237,7 @@ function edButton(id, display, tagStart, tagEnd, access, open) {
settings = ed.settings;
html = '';
theButtons = {};
use = '';
// set buttons
if ( settings.buttons )
@ -250,15 +251,17 @@ function edButton(id, display, tagStart, tagEnd, access, open) {
if ( use && defaults.indexOf(','+id+',') != -1 && use.indexOf(','+id+',') == -1 )
continue;
if ( !edButtons[i].instance || edButtons[i].instance == inst )
if ( !edButtons[i].instance || edButtons[i].instance == inst ) {
theButtons[id] = edButtons[i];
if ( edButtons[i].html )
html += edButtons[i].html(name + '_');
}
}
for ( i in theButtons ) {
if ( !theButtons[i] || !theButtons[i].html )
continue;
html += theButtons[i].html(name + '_');
if ( use && use.indexOf(',fullscreen,') != -1 ) {
theButtons['fullscreen'] = new qt.FullscreenButton();
html += theButtons['fullscreen'].html(name + '_');
}
ed.toolbar.innerHTML = html;

File diff suppressed because one or more lines are too long

View File

@ -68,7 +68,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'sack', "/wp-includes/js/tw-sack$suffix.js", false, '1.6.1', 1 );
$scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", false, '20111105', 1 );
$scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", false, '20111108', 1 );
$scripts->add_script_data( 'quicktags', 'quicktagsL10n', array(
'wordLookup' => __('Enter a word to look up:'),
'dictionaryLookup' => esc_attr(__('Dictionary lookup')),