Changeset 4576 for trunk/templates/default/bbpress-functions.php
- Timestamp:
- 12/15/2012 12:23:31 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/templates/default/bbpress-functions.php
r4549 r4576 198 198 199 199 // 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() ) 201 201 return; ?> 202 202 203 203 <script type="text/javascript"> 204 204 /* <![CDATA[ */ 205 <?php if ( bbp_is_single_user_edit() ) : ?>206 205 if ( window.location.hash == '#password' ) { 207 206 document.getElementById('pass1').focus(); 208 207 } 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; ?>234 208 /* ]]> */ 235 209 </script>
Note: See TracChangeset
for help on using the changeset viewer.