Ticket #25912: commmon.all.diff
| File commmon.all.diff, 4.2 KB (added by , 13 years ago) |
|---|
-
.jshintrc
1 1 { 2 2 "boss": true, 3 "curly": true,4 "eqeqeq": true,3 "curly": false, 4 "eqeqeq": false, 5 5 "eqnull": true, 6 6 "es3": true, 7 7 "expr": true, -
src/wp-admin/js/common.js
1 /* global setUserSetting:true, ajaxurl:true, commonL10n:true, alert:true, confirm:true, toggleWithKeyboard:true, pagenow:true */ 1 2 var showNotice, adminMenu, columns, validateForm, screenMeta; 2 3 (function($){ 3 4 // Removed in 3.3. … … 65 66 n = parseInt( $t.attr('colspan'), 10 ) + diff; 66 67 $t.attr('colspan', n.toString()); 67 68 } 68 } 69 }; 69 70 70 71 $(document).ready(function(){columns.init();}); 71 72 72 73 validateForm = function( form ) { 73 return !$( form ).find('.form-required').filter( function() { return $('input:visible', this).val() == ''; } ).addClass( 'form-invalid' ).find('input:visible').change( function() { $(this).closest('.form-invalid').removeClass( 'form-invalid' ); } ).size();74 } 74 return !$( form ).find('.form-required').filter( function() { return $('input:visible', this).val() === ''; } ).addClass( 'form-invalid' ).find('input:visible').change( function() { $(this).closest('.form-invalid').removeClass( 'form-invalid' ); } ).size(); 75 }; 75 76 76 77 // stub for doing better warnings 77 78 showNotice = { … … 161 162 162 163 $(document).ready( function() { 163 164 var lastClicked = false, checks, first, last, checked, sliced, menu = $('#adminmenu'), mobileEvent, 164 pageInput = $('input.current-page'), currentPage = pageInput.val(); 165 pageInput = $('input.current-page'), currentPage = pageInput.val(), 166 transitionTimeout, focusedRowActions; 165 167 166 168 // when the menu is folded, make the fly-out submenu header clickable 167 169 menu.on('click.wp-submenu-head', '.wp-submenu-head', function(e){ 168 170 $(e.target).parent().siblings('a').get(0).click(); 169 171 }); 170 172 171 $('#collapse-menu').on('click.collapse-menu', function( e){173 $('#collapse-menu').on('click.collapse-menu', function(){ 172 174 var body = $( document.body ), respWidth; 173 175 174 176 // reset any compensation for submenus near the bottom of the screen … … 226 228 } 227 229 228 230 menu.find('li.wp-has-submenu').hoverIntent({ 229 over: function( e){231 over: function(){ 230 232 var b, h, o, f, m = $(this).find('.wp-submenu'), menutop, wintop, maxtop, top = parseInt( m.css('top'), 10 ); 231 233 232 234 if ( isNaN(top) || top > -5 ) // meaning the submenu is visible … … 300 302 // toggle "check all" checkboxes 301 303 var unchecked = $(this).closest('tbody').find(':checkbox').filter(':visible').not(':checked'); 302 304 $(this).closest('table').children('thead, tfoot').find(':checkbox').prop('checked', function() { 303 return ( 0 == unchecked.length );305 return ( 0 === unchecked.length ); 304 306 }); 305 307 306 308 return true; … … 335 337 }); 336 338 337 339 // Show row actions on keyboard focus of its parent container element or any other elements contained within 338 var transitionTimeout, focusedRowActions;339 340 $( 'td.post-title, td.title, td.comment, .bookmarks td.column-name, td.blogname, td.username, .dashboard-comment-wrap' ).focusin(function(){ 340 341 clearTimeout( transitionTimeout ); 341 342 focusedRowActions = $(this).find( '.row-actions' ); … … 396 397 e.preventDefault(); 397 398 }); 398 399 399 $('#newcontent').bind('blur.wpevent_InsertTab', function( e) {400 $('#newcontent').bind('blur.wpevent_InsertTab', function() { 400 401 if ( this.lastKey && 9 == this.lastKey ) 401 402 this.focus(); 402 403 }); 403 404 404 405 if ( pageInput.length ) { 405 pageInput.closest('form').submit( function( e){406 pageInput.closest('form').submit( function(){ 406 407 407 408 // Reset paging var for new filters/searches but not for bulk actions. See #17685. 408 409 if ( $('select[name="action"]').val() == -1 && $('select[name="action2"]').val() == -1 && pageInput.val() == currentPage ) -
src/wp-includes/js/zxcvbn-async.js
1 /* global _zxcvbnSettings:true */ 1 2 (function() { 2 3 var async_load = function() { 3 4 var first, s;