Ticket #13220: toggle_select.diff
File toggle_select.diff, 1.1 KB (added by , 14 years ago) |
---|
-
wp-admin/js/nav-menu.dev.js
379 379 } 380 380 381 381 return false; 382 } else if ( e.target && e.target.className && -1 != e.target.className.indexOf('select-all') ) { 382 } 383 384 // Toggle the select all 385 // @todo refactor, maybe use .toggle() 386 if ( 'select-all' == e.target.className ) { 383 387 var selectAreaMatch = /#(.*)$/.exec(e.target.href); 384 388 if ( selectAreaMatch && selectAreaMatch[1] ) { 385 $('#' + selectAreaMatch[1] + ' .tabs-panel-active input[type=checkbox]').attr('checked', 'checked'); 389 390 if ( $('#' + selectAreaMatch[1] + ' .tabs-panel-active input[type=checkbox]').attr('checked') ) 391 $('#' + selectAreaMatch[1] + ' .tabs-panel-active input[type=checkbox]').attr('checked', false); 392 else 393 $('#' + selectAreaMatch[1] + ' .tabs-panel-active input[type=checkbox]').attr('checked', true); 394 386 395 return false; 387 396 } 388 397 }