Skip to:
Content

bbPress.org


Ignore:
Timestamp:
12/15/2012 12:23:31 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Iterate on #1917.

  • Remove fullscreen editor from teeny editor buttons.
  • Introduce tabfocus plugin, with some approximate values.
  • Props ethitter.
  • Note: theme-side tinymce tabfocus still not working as intended.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/templates/default/bbpress-functions.php

    r4549 r4576  
    198198
    199199                // Bail if no extra JS is needed
    200                 if ( ! bbp_is_single_user_edit() && ! bbp_use_wp_editor() )
     200                if ( ! bbp_is_single_user_edit() )
    201201                        return; ?>
    202202
    203203                <script type="text/javascript">
    204204                        /* <![CDATA[ */
    205                         <?php if ( bbp_is_single_user_edit() ) : ?>
    206205                        if ( window.location.hash == '#password' ) {
    207206                                document.getElementById('pass1').focus();
    208207                        }
    209                         <?php endif; ?>
    210 
    211                         <?php if ( bbp_use_wp_editor() ) : ?>
    212                         jQuery(document).ready( function() {
    213                                 jQuery( '#bbp_topic_title' ).bind( 'keydown.editor-focus', function(e) {
    214                                         if ( e.which != 9 )
    215                                                 return;
    216 
    217                                         if ( !e.ctrlKey && !e.altKey && !e.shiftKey ) {
    218                                                 if ( typeof( tinymce ) != 'undefined' ) {
    219                                                         if ( ! tinymce.activeEditor.isHidden() ) {
    220                                                                 var editor = tinymce.activeEditor.editorContainer;
    221                                                                 jQuery( '#' + editor + ' td.mceToolbar > a' ).focus();
    222                                                         } else {
    223                                                                 jQuery( 'textarea.bbp-the-content' ).focus();
    224                                                         }
    225                                                 } else {
    226                                                         jQuery( 'textarea.bbp-the-content' ).focus();
    227                                                 }
    228 
    229                                                 e.preventDefault();
    230                                         }
    231                                 });
    232                         });
    233                         <?php endif; ?>
    234208                        /* ]]> */
    235209                </script>
Note: See TracChangeset for help on using the changeset viewer.