Ticket #6541: 6541.diff
| File 6541.diff, 7.7 KB (added by mdawaffe, 4 years ago) |
|---|
-
wp-includes/script-loader.php
131 131 'pending' => __('%i% pending') // must look like: "# blah blah" 132 132 ) ); 133 133 $this->add( 'admin-users', '/wp-admin/js/users.js', array('wp-lists'), '20070823' ); 134 $this->add( 'admin-forms', '/wp-admin/js/forms.js', false, '20080 317');134 $this->add( 'admin-forms', '/wp-admin/js/forms.js', false, '20080401'); 135 135 $this->add( 'xfn', '/wp-admin/js/xfn.js', false, '3517' ); 136 136 $this->add( 'upload', '/wp-admin/js/upload.js', array('jquery'), '20070518' ); 137 137 $this->add( 'postbox', '/wp-admin/js/postbox.js', array('jquery'), '20080128' ); -
wp-admin/users.php
330 330 <table class="widefat"> 331 331 <thead> 332 332 <tr class="thead"> 333 <th scope="col" class="check-column"><input type="checkbox" onclick="checkAll(document.getElementById('posts-filter'));" /></th>333 <th scope="col" class="check-column"><input type="checkbox" /></th> 334 334 <th><?php _e('Username') ?></th> 335 335 <th><?php _e('Name') ?></th> 336 336 <th><?php _e('E-mail') ?></th> -
wp-admin/edit-link-categories.php
101 101 <table class="widefat"> 102 102 <thead> 103 103 <tr> 104 <th scope="col" class="check-column"><input type="checkbox" onclick="checkAll(document.getElementById('posts-filter'));"/></th>104 <th scope="col" class="check-column"><input type="checkbox" /></th> 105 105 <th scope="col"><?php _e('Name') ?></th> 106 106 <th scope="col"><?php _e('Description') ?></th> 107 107 <th scope="col" class="num" style="width: 90px;"><?php _e('Links') ?></th> -
wp-admin/edit-comments.php
186 186 <table class="widefat"> 187 187 <thead> 188 188 <tr> 189 <th scope="col" class="check-column"><input type="checkbox" onclick="checkAll(document.getElementById('comments-form'));"/></th>189 <th scope="col" class="check-column"><input type="checkbox" /></th> 190 190 <th scope="col"><?php _e('Comment') ?></th> 191 191 <th scope="col"><?php _e('Date') ?></th> 192 192 <th scope="col" class="action-links"><?php _e('Actions') ?></th> -
wp-admin/includes/template.php
283 283 // define the columns to display, the syntax is 'internal name' => 'display name' 284 284 function wp_manage_posts_columns() { 285 285 $posts_columns = array(); 286 $posts_columns['cb'] = '<input type="checkbox" onclick="checkAll(document.getElementById(\'posts-filter\'));"/>';286 $posts_columns['cb'] = '<input type="checkbox" />'; 287 287 if ( 'draft' === $_GET['post_status'] ) 288 288 $posts_columns['modified'] = __('Modified'); 289 289 elseif ( 'pending' === $_GET['post_status'] ) … … 305 305 // define the columns to display, the syntax is 'internal name' => 'display name' 306 306 function wp_manage_media_columns() { 307 307 $posts_columns = array(); 308 $posts_columns['cb'] = '<input type="checkbox" onclick="checkAll(document.getElementById(\'posts-filter\'));"/>';308 $posts_columns['cb'] = '<input type="checkbox" />'; 309 309 $posts_columns['icon'] = ''; 310 310 $posts_columns['media'] = _c('Media|media column header'); 311 311 $posts_columns['desc'] = _c('Description|media column header'); … … 320 320 321 321 function wp_manage_pages_columns() { 322 322 $posts_columns = array(); 323 $posts_columns['cb'] = '<input type="checkbox" onclick="checkAll(document.getElementById(\'posts-filter\'));"/>';323 $posts_columns['cb'] = '<input type="checkbox" />'; 324 324 if ( 'draft' === $_GET['post_status'] ) 325 325 $posts_columns['modified'] = __('Modified'); 326 326 elseif ( 'pending' === $_GET['post_status'] ) -
wp-admin/edit-tags.php
172 172 <table class="widefat"> 173 173 <thead> 174 174 <tr> 175 <th scope="col" class="check-column"><input type="checkbox" onclick="checkAll(document.getElementById('posts-filter'));"/></th>175 <th scope="col" class="check-column"><input type="checkbox" /></th> 176 176 <th scope="col"><?php _e('Name') ?></th> 177 177 <th scope="col" class="num" style="width: 90px"><?php _e('Posts') ?></th> 178 178 </tr> -
wp-admin/js/forms.js
1 function checkAll(form) { 2 for (i = 0, n = form.elements.length; i < n; i++) { 3 if(form.elements[i].type == "checkbox" && !(form.elements[i].getAttribute('onclick',2))) { 4 if(form.elements[i].checked == true) 5 form.elements[i].checked = false; 6 else 7 form.elements[i].checked = true; 8 } 9 } 1 function checkAll(jQ) { // use attr( checked, fn ) 2 jQuery(jQ).find( 'tbody :checkbox' ).attr( 'checked', function() { 3 return jQuery(this).attr( 'checked' ) ? '' : 'checked'; 4 } ); 10 5 } 11 6 12 function getNumChecked(form) { 13 var num = 0; 14 for (i = 0, n = form.elements.length; i < n; i++) { 15 if (form.elements[i].type == "checkbox") { 16 if (form.elements[i].checked == true) 17 num++; 7 jQuery( function($) { 8 var lastClicked = false; 9 $( 'tbody :checkbox' ).click( function(e) { 10 if ( 'undefined' == e.shiftKey ) { return true; } 11 if ( e.shiftKey ) { 12 if ( !lastClicked ) { return true; } 13 var checks = $( lastClicked ).parents( 'form:first' ).find( ':checkbox' ); 14 var first = checks.index( lastClicked ); 15 var last = checks.index( this ); 16 if ( 0 < first && 0 < last && first != last ) { 17 checks.slice( first, last ).attr( 'checked', $( this ).is( ':checked' ) ? 'checked' : '' ); 18 } 18 19 } 19 } 20 return num; 21 } 22 23 function checkAllUsers(role) { 24 var checkboxs = document.getElementsByTagName('input'); 25 for(var i = 0, inp; inp = checkboxs[i]; i++) 26 if(inp.type.toLowerCase() == 'checkbox' && inp.className == role) 27 if(inp.checked == false) 28 inp.checked = true; 29 else 30 inp.checked = false; 31 } 32 No newline at end of file 20 lastClicked = this; 21 return true; 22 } ); 23 $( 'thead :checkbox' ).click( function() { 24 checkAll( $(this).parents( 'form:first' ) ); 25 } ); 26 } ); 27 No newline at end of file -
wp-admin/link-manager.php
141 141 <table class="widefat"> 142 142 <thead> 143 143 <tr> 144 <th scope="col" class="check-column"><input type="checkbox" onclick="checkAll(document.getElementById('posts-filter'));"/></th>144 <th scope="col" class="check-column"><input type="checkbox" /></th> 145 145 <?php foreach($link_columns as $column_display_name) { 146 146 echo $column_display_name; 147 147 } ?> -
wp-admin/categories.php
147 147 <table class="widefat"> 148 148 <thead> 149 149 <tr> 150 <th scope="col" class="check-column"><input type="checkbox" onclick="checkAll(document.getElementById('posts-filter'));"/></th>150 <th scope="col" class="check-column"><input type="checkbox" /></th> 151 151 <th scope="col"><?php _e('Name') ?></th> 152 152 <th scope="col"><?php _e('Description') ?></th> 153 153 <th scope="col" class="num"><?php _e('Posts') ?></th>
