mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-23 00:31:28 +01:00
Bring back the Fullscreen button in Quicktags, fixes #19194
git-svn-id: http://svn.automattic.com/wordpress/trunk@19215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a893bf5cfc
commit
25f7c9a446
@ -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
@ -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')),
|
||||
|
Loading…
Reference in New Issue
Block a user