Ticket #25912: common.vars.diff
| File common.vars.diff, 2.2 KB (added by , 13 years ago) |
|---|
-
src/wp-admin/js/common.js
161 161 162 162 $(document).ready( function() { 163 163 var lastClicked = false, checks, first, last, checked, sliced, menu = $('#adminmenu'), mobileEvent, 164 pageInput = $('input.current-page'), currentPage = pageInput.val(); 164 pageInput = $('input.current-page'), currentPage = pageInput.val(), 165 transitionTimeout, focusedRowActions; 165 166 166 167 // when the menu is folded, make the fly-out submenu header clickable 167 168 menu.on('click.wp-submenu-head', '.wp-submenu-head', function(e){ 168 169 $(e.target).parent().siblings('a').get(0).click(); 169 170 }); 170 171 171 $('#collapse-menu').on('click.collapse-menu', function( e){172 $('#collapse-menu').on('click.collapse-menu', function(){ 172 173 var body = $( document.body ), respWidth; 173 174 174 175 // reset any compensation for submenus near the bottom of the screen … … 226 227 } 227 228 228 229 menu.find('li.wp-has-submenu').hoverIntent({ 229 over: function( e){230 over: function(){ 230 231 var b, h, o, f, m = $(this).find('.wp-submenu'), menutop, wintop, maxtop, top = parseInt( m.css('top'), 10 ); 231 232 232 233 if ( isNaN(top) || top > -5 ) // meaning the submenu is visible … … 335 336 }); 336 337 337 338 // Show row actions on keyboard focus of its parent container element or any other elements contained within 338 var transitionTimeout, focusedRowActions;339 339 $( 'td.post-title, td.title, td.comment, .bookmarks td.column-name, td.blogname, td.username, .dashboard-comment-wrap' ).focusin(function(){ 340 340 clearTimeout( transitionTimeout ); 341 341 focusedRowActions = $(this).find( '.row-actions' ); … … 396 396 e.preventDefault(); 397 397 }); 398 398 399 $('#newcontent').bind('blur.wpevent_InsertTab', function( e) {399 $('#newcontent').bind('blur.wpevent_InsertTab', function() { 400 400 if ( this.lastKey && 9 == this.lastKey ) 401 401 this.focus(); 402 402 }); 403 403 404 404 if ( pageInput.length ) { 405 pageInput.closest('form').submit( function( e){405 pageInput.closest('form').submit( function(){ 406 406 407 407 // Reset paging var for new filters/searches but not for bulk actions. See #17685. 408 408 if ( $('select[name="action"]').val() == -1 && $('select[name="action2"]').val() == -1 && pageInput.val() == currentPage )