Ticket #13070: 13070.2.patch
File 13070.2.patch, 2.1 KB (added by , 13 years ago) |
---|
-
wp-includes/script-loader.php
79 79 'enterImageURL' => __('Enter the URL of the image'), 80 80 'enterImageDescription' => __('Enter a description of the image'), 81 81 'fullscreen' => __('fullscreen'), 82 'toggleFullscreen' => esc_attr( __('Toggle fullscreen mode') ) 82 'toggleFullscreen' => esc_attr( __('Toggle fullscreen mode') ), 83 'textdirection' => esc_attr( __('text direction') ), 84 'toggleTextdirection' => esc_attr( __('Toggle Editor Text Direction') ) 83 85 ) ); 84 86 85 87 $scripts->add( 'colorpicker', "/wp-includes/js/colorpicker$suffix.js", array('prototype'), '3517m' ); -
wp-includes/js/quicktags.dev.js
264 264 html += theButtons['fullscreen'].html(name + '_'); 265 265 } 266 266 267 268 if ( 'rtl' == document.getElementsByTagName('html')[0].dir ) { 269 theButtons['textdirection'] = new qt.TextDirectionButton(); 270 html += theButtons['textdirection'].html(name + '_'); 271 } 272 267 273 ed.toolbar.innerHTML = html; 268 274 ed.theButtons = theButtons; 269 275 } … … 605 611 fullscreen.on(); 606 612 }; 607 613 614 qt.TextDirectionButton = function() { 615 qt.Button.call(this, 'textdirection', quicktagsL10n.textdirection, '', quicktagsL10n.toggleTextdirection) 616 }; 617 qt.TextDirectionButton.prototype = new qt.Button(); 618 qt.TextDirectionButton.prototype.callback = function(e, c) { 619 620 var isRTL = ( 'rtl' == document.getElementsByTagName('html')[0].dir ); 621 622 currentDirection = c.style.direction; 623 624 if ( '' == currentDirection ) 625 currentDirection = ( isRTL ) ? 'rtl' : 'ltr' ; 626 627 c.style.direction = ( 'rtl' == currentDirection ) ? 'ltr' : 'rtl'; 628 629 c.focus(); 630 } 631 608 632 // ensure backward compatibility 609 633 edButtons[10] = new qt.TagButton('strong','b','<strong>','</strong>','b'); 610 634 edButtons[20] = new qt.TagButton('em','i','<em>','</em>','i'),