Changeset 4583
- Timestamp:
- 12/01/2006 11:00:04 PM (19 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
-
wp-admin/admin-ajax.php (modified) (2 diffs)
-
wp-admin/admin-functions.php (modified) (1 diff)
-
wp-admin/edit-category-form.php (modified) (2 diffs)
-
wp-admin/users.js (modified) (1 diff)
-
wp-admin/users.php (modified) (4 diffs)
-
wp-includes/category-template.php (modified) (1 diff)
-
wp-includes/js/list-manipulation-js.php (modified) (2 diffs)
-
wp-includes/script-loader.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r4575 r4583 148 148 'id' => $cat->cat_ID, 149 149 'data' => _cat_row( $cat, $level, $cat_full_name ), 150 'supplemental' => array('name' => $cat_full_name )150 'supplemental' => array('name' => $cat_full_name, 'show-link' => sprintf(__( 'Category <a href="#%s">%s</a> added' ), "cat-$cat->cat_ID", $cat_full_name)) 151 151 ) ); 152 152 $x->send(); … … 212 212 exit; 213 213 } 214 $user_object = new WP_User( $user_id ); 214 215 $x = new WP_Ajax_Response( array( 215 216 'what' => 'user', 216 217 'id' => $user_id, 217 'data' => user_row( $user_id ) 218 'data' => user_row( $user_object ), 219 'supplemental' => array('show-link' => sprintf(__( 'User <a href="#%s">%s</a> added' ), "user-$user_id", $user_object->user_login)) 218 220 ) ); 219 221 $x->send(); -
trunk/wp-admin/admin-functions.php
r4577 r4583 815 815 $r .= "<a href='edit.php?author=$user_object->ID' title='" . __( 'View posts by this author' ) . "' class='edit'>"; 816 816 $r .= sprintf( __('View %1$s %2$s' ), $numposts, __ngettext( 'post', 'posts', $numposts )); 817 $r .= '</a>'; 817 818 } 818 819 $r .= "</td>\n\t\t<td>"; 819 $edit_link = add_query_arg( 'wp_http_referer', wp_specialchars( urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" );820 if ( current_user_can( 'edit_user', $user_object->ID ) )820 if ( current_user_can( 'edit_user', $user_object->ID ) ) { 821 $edit_link = wp_specialchars( add_query_arg( 'wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), "user-edit.php?user_id=$user_object->ID" ) ); 821 822 $r .= "<a href='$edit_link' class='edit'>".__( 'Edit' )."</a>"; 823 } 822 824 $r .= "</td>\n\t</tr>"; 823 825 return $r; -
trunk/wp-admin/edit-category-form.php
r4495 r4583 17 17 <div class="wrap"> 18 18 <h2><?php echo $heading ?></h2> 19 <div id="ajax-response"></div> 19 20 <?php echo $form ?> 20 21 <input type="hidden" name="action" value="<?php echo $action ?>" /> … … 42 43 </table> 43 44 <p class="submit"><input type="submit" name="submit" value="<?php echo $submit_text ?>" /></p> 44 <div id="ajax-response"></div>45 45 <?php do_action('edit_category_form', $category); ?> 46 46 </form> -
trunk/wp-admin/users.js
r3684 r4583 3 3 theUserLists = new Array(); 4 4 for ( var l = 0; l < theListEls.length; l++ ) { 5 theUserLists[theListEls[l].id] = new listMan(theListEls[l].id); 5 if ( theListEls[l].id ) 6 theUserLists[theListEls[l].id] = new listMan(theListEls[l].id); 6 7 } 7 8 addUserInputs = document.getElementById('adduser').getElementsByTagName('input'); -
trunk/wp-admin/users.php
r4559 r4583 377 377 uksort($roleclass, "strnatcasecmp"); 378 378 ?> 379 379 <tbody> 380 380 <tr> 381 381 <?php if ( !empty($role) ) : ?> … … 393 393 <th colspan="2" style="text-align: center"><?php _e('Actions') ?></th> 394 394 </tr> 395 </t head>395 </tbody> 396 396 <tbody id="role-<?php echo $role; ?>"><?php 397 397 $style = ''; … … 438 438 <div class="wrap"> 439 439 <h2 id="add-new-user"><?php _e('Add New User') ?></h2> 440 441 <?php if ( is_wp_error( $add_user_errors ) ) : ?> 442 <div class="error"> 443 <?php 444 foreach ( $add_user_errors->get_error_messages() as $message ) 445 echo "<p>$message</p>"; 446 ?> 447 </div> 448 <?php endif; ?> 449 <div id="ajax-response"></div> 450 440 451 <div class="narrow"> 452 441 453 <?php echo '<p>'.sprintf(__('Users can <a href="%1$s">register themselves</a> or you can manually create users here.'), get_option('siteurl').'/wp-register.php').'</p>'; ?> 442 454 <form action="#add-new-user" method="post" name="adduser" id="adduser"> … … 489 501 <input name="adduser" type="submit" id="addusersub" value="<?php _e('Add User »') ?>" /> 490 502 </p> 503 </form> 504 491 505 </div> 492 </form>493 494 <?php if ( is_wp_error( $add_user_errors ) ) : ?>495 <div class="error">496 <?php497 foreach ( $add_user_errors->get_error_messages() as $message )498 echo "<p>$message</p>";499 ?>500 </div>501 <?php endif; ?>502 <div id="ajax-response"></div>503 506 </div> 504 507 -
trunk/wp-includes/category-template.php
r4580 r4583 181 181 $output = ''; 182 182 if ( ! empty($categories) ) { 183 $output = "<select name='$name' class='$class'>\n";183 $output = "<select name='$name' id='$name' class='$class'>\n"; 184 184 185 185 if ( $show_option_all ) { -
trunk/wp-includes/js/list-manipulation-js.php
r4535 r4583 38 38 var newItems = $A(transport.responseXML.getElementsByTagName(what)); 39 39 if ( newItems ) { 40 var showLinkMessage = ''; 41 var m = ''; 40 42 newItems.each( function(i) { 41 43 var id = i.getAttribute('id'); … … 45 47 else 46 48 tempObj.addListItem( getNodeValue(i, 'response_data') ); 47 if ( tempObj.showLink ) 48 tempObj.showLink = id; 49 m = getNodeValue(i, 'show-link'); 50 showLinkMessage += showLinkMessage ? "<br />\n" : ''; 51 if ( m ) 52 showLinkMessage += m; 53 else 54 showLinkMessage += "<a href='#" + what + '-' + id + "'><?php echo js_escape(__('Jump to new item')); ?>"; 49 55 }); 50 ajaxAdd.myResponseElement.update(tempObj.showLink ? ( "<div id='jumplink' class='updated fade'><p><a href='#" + what + '-' + tempObj.showLink + "'><?php js_escape(__('Jump to new item')); ?></a></p></div>" ) : ''); 56 if ( tempObj.showLink && showLinkMessage ) 57 ajaxAdd.myResponseElement.update("<div id='jumplink' class='updated fade'><p>" + showLinkMessage + "</p></div>"); 51 58 } 52 59 if ( tempObj.addComplete && typeof tempObj.addComplete == 'function' ) -
trunk/wp-includes/script-loader.php
r4566 r4583 22 22 $this->add( 'autosave', '/wp-includes/js/autosave.js.php', array('prototype', 'sack'), '4508'); 23 23 $this->add( 'wp-ajax', '/wp-includes/js/wp-ajax-js.php', array('prototype'), '4459'); 24 $this->add( 'listman', '/wp-includes/js/list-manipulation-js.php', array('wp-ajax', 'fat'), '4 459');24 $this->add( 'listman', '/wp-includes/js/list-manipulation-js.php', array('wp-ajax', 'fat'), '4583'); 25 25 if ( is_admin() ) { 26 26 $this->add( 'dbx-admin-key', '/wp-admin/dbx-admin-key-js.php', array('dbx'), '3651' ); … … 29 29 $this->add( 'admin-custom-fields', '/wp-admin/custom-fields.js', array('listman'), '3733' ); 30 30 $this->add( 'admin-comments', '/wp-admin/edit-comments.js', array('listman'), '3847' ); 31 $this->add( 'admin-users', '/wp-admin/users.js', array('listman'), ' 3684' );31 $this->add( 'admin-users', '/wp-admin/users.js', array('listman'), '4583' ); 32 32 $this->add( 'xfn', '/wp-admin/xfn.js', false, '3517' ); 33 $this->add( 'upload', '/wp-admin/upload-js.php', array('prototype'), ' ####' );33 $this->add( 'upload', '/wp-admin/upload-js.php', array('prototype'), '4535' ); 34 34 } 35 35 }
Note: See TracChangeset
for help on using the changeset viewer.