Changeset 7745
- Timestamp:
- 04/18/2008 10:23:02 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/categories.php
r7484 r7745 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> -
trunk/wp-admin/edit-comments.php
r7645 r7745 186 186 <thead> 187 187 <tr> 188 <th scope="col" class="check-column"><input type="checkbox" onclick="checkAll(document.getElementById('comments-form'));"/></th>188 <th scope="col" class="check-column"><input type="checkbox" /></th> 189 189 <th scope="col"><?php _e('Comment') ?></th> 190 190 <th scope="col"><?php _e('Date') ?></th> -
trunk/wp-admin/edit-link-categories.php
r7537 r7745 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> -
trunk/wp-admin/edit-tags.php
r7536 r7745 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> -
trunk/wp-admin/includes/template.php
r7739 r7745 280 280 function wp_manage_posts_columns() { 281 281 $posts_columns = array(); 282 $posts_columns['cb'] = '<input type="checkbox" onclick="checkAll(document.getElementById(\'posts-filter\'));"/>';282 $posts_columns['cb'] = '<input type="checkbox" />'; 283 283 if ( 'draft' === $_GET['post_status'] ) 284 284 $posts_columns['modified'] = __('Modified'); … … 302 302 function wp_manage_media_columns() { 303 303 $posts_columns = array(); 304 $posts_columns['cb'] = '<input type="checkbox" onclick="checkAll(document.getElementById(\'posts-filter\'));"/>';304 $posts_columns['cb'] = '<input type="checkbox" />'; 305 305 $posts_columns['icon'] = ''; 306 306 $posts_columns['media'] = _c('Media|media column header'); … … 317 317 function wp_manage_pages_columns() { 318 318 $posts_columns = array(); 319 $posts_columns['cb'] = '<input type="checkbox" onclick="checkAll(document.getElementById(\'posts-filter\'));"/>';319 $posts_columns['cb'] = '<input type="checkbox" />'; 320 320 if ( 'draft' === $_GET['post_status'] ) 321 321 $posts_columns['modified'] = __('Modified'); -
trunk/wp-admin/js/forms.js
r7371 r7745 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 } 20 lastClicked = this; 21 return true; 22 } ); 23 $( 'thead :checkbox' ).click( function() { 24 checkAll( $(this).parents( 'form:first' ) ); 25 } ); 26 } ); -
trunk/wp-admin/link-manager.php
r7412 r7745 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; -
trunk/wp-admin/users.php
r7660 r7745 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> -
trunk/wp-includes/script-loader.php
r7720 r7745 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' );
Note: See TracChangeset
for help on using the changeset viewer.