Changeset 6570
- Timestamp:
- 01/07/2008 08:38:49 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r6556 r6570 388 388 'what' => 'user', 389 389 'id' => $user_id, 390 'data' => user_row( $user_object ),390 'data' => user_row( $user_object, '', $user_object->roles[0] ), 391 391 'supplemental' => array( 392 392 'show-link' => sprintf(__( 'User <a href="#%s">%s</a> added' ), "user-$user_id", $user_object->user_login), -
trunk/wp-admin/edit-comments.php
r6430 r6570 5 5 $parent_file = 'edit-comments.php'; 6 6 wp_enqueue_script( 'admin-comments' ); 7 wp_enqueue_script('admin-forms'); 7 8 8 9 require_once('admin-header.php'); … … 10 11 else $mode = attribute_escape($_GET['mode']); 11 12 ?> 12 13 <script type="text/javascript">14 <!--15 function checkAll(form)16 {17 for (i = 0, n = form.elements.length; i < n; i++) {18 if(form.elements[i].type == "checkbox") {19 if(form.elements[i].checked == true)20 form.elements[i].checked = false;21 else22 form.elements[i].checked = true;23 }24 }25 }26 27 function getNumChecked(form)28 {29 var num = 0;30 for (i = 0, n = form.elements.length; i < n; i++) {31 if(form.elements[i].type == "checkbox") {32 if(form.elements[i].checked == true)33 num++;34 }35 }36 return num;37 }38 //-->39 </script>40 13 <div class="wrap"> 41 14 <h2><?php _e('Comments'); ?></h2> -
trunk/wp-admin/includes/template.php
r6552 r6570 314 314 } 315 315 316 function user_row( $user_object, $style = '' ) {316 function user_row( $user_object, $style = '', $role = '' ) { 317 317 if ( !( is_object( $user_object) && is_a( $user_object, 'WP_User' ) ) ) 318 318 $user_object = new WP_User( (int) $user_object ); … … 327 327 $numposts = get_usernumposts( $user_object->ID ); 328 328 $r = "<tr id='user-$user_object->ID'$style> 329 <td><input type='checkbox' name='users[]' id='user_{$user_object->ID}' value='{$user_object->ID}' /> <label for='user_{$user_object->ID}'>{$user_object->ID}</label></td>329 <td><input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='$role' value='{$user_object->ID}' /> <label for='user_{$user_object->ID}'>{$user_object->ID}</label></td> 330 330 <td><label for='user_{$user_object->ID}'><strong>$user_object->user_login</strong></label></td> 331 331 <td><label for='user_{$user_object->ID}'>$user_object->first_name $user_object->last_name</label></td> -
trunk/wp-admin/link-manager.php
r6555 r6570 8 8 9 9 wp_enqueue_script( 'wp-lists' ); 10 wp_enqueue_script('admin-forms'); 10 11 11 12 wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]')); … … 46 47 } 47 48 ?> 48 <script type="text/javascript"> 49 /* <![CDATA[ */ 50 function checkAll(form) 51 { 52 for (i = 0, n = form.elements.length; i < n; i++) { 53 if(form.elements[i].type == "checkbox") { 54 if(form.elements[i].checked == true) 55 form.elements[i].checked = false; 56 else 57 form.elements[i].checked = true; 58 } 59 } 60 } 61 62 jQuery(function($){$('#the-list').wpList();}); 63 64 /* ]]> */ 65 </script> 66 49 <script type="text/javascript" src="js/edit-comments.js"></script> 67 50 <?php 68 51 if ( isset($_GET['deleted']) ) { -
trunk/wp-admin/users.php
r6303 r6570 210 210 <?php wp_nonce_field('delete-users') ?> 211 211 <?php echo $referer; ?> 212 212 213 <div class="wrap"> 213 214 <h2><?php _e('Delete Users'); ?></h2> … … 271 272 default: 272 273 wp_enqueue_script('admin-users'); 273 274 wp_enqueue_script('admin-forms'); 275 274 276 include('admin-header.php'); 275 277 … … 386 388 </tr> 387 389 <tr class="thead"> 390 <th><input type="checkbox" onclick="checkAllUsers('<?php echo $role; ?>')"/></th> 388 391 <th><?php _e('ID') ?></th> 389 392 <th><?php _e('Username') ?></th> … … 398 401 foreach ( (array) $roleclass as $user_object ) { 399 402 $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"'; 400 echo "\n\t" . user_row($user_object, $style );403 echo "\n\t" . user_row($user_object, $style, $role); 401 404 } 402 405 ?> -
trunk/wp-includes/script-loader.php
r6569 r6570 120 120 $this->add( 'admin-posts', '/wp-admin/js/edit-posts.js', array('wp-lists'), '20071023' ); 121 121 $this->add( 'admin-users', '/wp-admin/js/users.js', array('wp-lists'), '20070823' ); 122 $this->add( 'admin-forms', '/wp-admin/js/forms.js', array('wp-lists'), '20080108' ); 122 123 $this->add( 'xfn', '/wp-admin/js/xfn.js', false, '3517' ); 123 124 $this->add( 'upload', '/wp-admin/js/upload.js', array('jquery'), '20070518' );
Note: See TracChangeset
for help on using the changeset viewer.