Changeset 20451
- Timestamp:
- 04/12/2012 05:52:54 PM (13 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/quicktags.dev.js
r20166 r20451 263 263 theButtons['fullscreen'] = new qt.FullscreenButton(); 264 264 html += theButtons['fullscreen'].html(name + '_'); 265 } 266 267 268 if ( 'rtl' == document.getElementsByTagName('html')[0].dir ) { 269 theButtons['textdirection'] = new qt.TextDirectionButton(); 270 html += theButtons['textdirection'].html(name + '_'); 265 271 } 266 272 … … 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 var isRTL = ( 'rtl' == document.getElementsByTagName('html')[0].dir ), 620 currentDirection = c.style.direction; 621 622 if ( ! currentDirection ) 623 currentDirection = ( isRTL ) ? 'rtl' : 'ltr'; 624 625 c.style.direction = ( 'rtl' == currentDirection ) ? 'ltr' : 'rtl'; 626 c.focus(); 627 } 628 608 629 // ensure backward compatibility 609 630 edButtons[10] = new qt.TagButton('strong','b','<strong>','</strong>','b'); -
trunk/wp-includes/script-loader.php
r20433 r20451 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
Note: See TracChangeset
for help on using the changeset viewer.