Changeset 9162
- Timestamp:
- 10/14/08 10:33:18 (2 months ago)
- Files:
-
- trunk/wp-admin/admin-footer.php (modified) (1 diff)
- trunk/wp-admin/includes/template.php (modified) (8 diffs)
- trunk/wp-admin/js/edit-comments.js (modified) (3 diffs)
- trunk/wp-admin/js/inline-edit-post.js (modified) (4 diffs)
- trunk/wp-admin/js/inline-edit-tax.js (modified) (3 diffs)
- trunk/wp-includes/script-loader.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/admin-footer.php
r8785 r9162 18 18 $upgrade = apply_filters( 'update_footer', '' ); 19 19 echo __('Thank you for creating with <a href="http://wordpress.org/">WordPress</a>').' | '.__('<a href="http://codex.wordpress.org/">Documentation</a>').' | '.__('<a href="http://wordpress.org/support/forum/4">Feedback</a>').' '.$upgrade; 20 21 $quick_edit_help = array( 'edit.php', 'edit-pages.php', 'edit-comments.php', 'edit-tags.php', 'categories.php', 'edit-link-categories.php' ); 22 if ( in_array($pagenow, $quick_edit_help) ) 23 echo '<br />' . __('Hint: double-click on a row to open Quick Edit.'); 20 24 ?></p> 21 25 </div> trunk/wp-admin/includes/template.php
r9160 r9162 124 124 $actions = array(); 125 125 $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>'; 126 $actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __('Quick Edit') . '</a>';127 126 if ( $default_cat_id != $category->term_id ) 128 127 $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("categories.php?action=delete&cat_ID=$category->term_id", 'delete-category_' . $category->term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this category '%s'\n 'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; … … 208 207 209 208 <form method="get" action=""><table style="display: none"><tbody id="inlineedit"> 210 <tr title="<?php _e('Double-click to cancel'); ?>"id="inline-edit" style="display: none"><td colspan="8">209 <tr id="inline-edit" style="display: none"><td colspan="8"> 211 210 <?php 212 211 … … 293 292 $actions = array(); 294 293 $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>'; 295 $actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __('Quick Edit') . '</a>';296 294 if ( $default_cat_id != $category->term_id ) 297 295 $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("link-category.php?action=delete&cat_ID=$category->term_id", 'delete-link-category_' . $category->term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this category '%s'\n 'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; … … 609 607 $actions = array(); 610 608 $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>'; 611 $actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __('Quick Edit') . '</a>';612 609 $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("edit-tags.php?action=delete&tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this tag '%s'\n 'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 613 610 $action_count = count($actions); … … 897 894 while ( $bulk < 2 ) { ?> 898 895 899 <tr title="<?php _e('Double-click to cancel'); ?>"id="<?php echo $bulk ? 'bulk-edit' : 'inline-edit'; ?>" style="display: none"><td colspan="<?php echo $col_count; ?>">896 <tr id="<?php echo $bulk ? 'bulk-edit' : 'inline-edit'; ?>" style="display: none"><td colspan="<?php echo $col_count; ?>"> 900 897 <?php 901 898 foreach($columns as $column_name=>$column_display_name) { … … 1268 1265 if ( current_user_can('edit_post', $post->ID) ) { 1269 1266 $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '" title="' . attribute_escape(__('Edit this post')) . '">' . __('Edit') . '</a>'; 1270 $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . attribute_escape(__('Edit this post inline')) . '">' . __('Quick Edit') . '</a>';1271 1267 $actions['delete'] = "<a class='submitdelete' title='" . attribute_escape(__('Delete this post')) . "' href='" . wp_nonce_url("post.php?action=delete&post=$post->ID", 'delete-post_' . $post->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 1272 1268 } … … 1448 1444 $actions = array(); 1449 1445 $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>'; 1450 $actions['inline'] = '<a href="#" class="editinline">' . __('Quick Edit') . '</a>';1451 1446 $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("page.php?action=delete&post=$page->ID", 'delete-page_' . $page->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $page->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $page->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 1452 1447 if ( in_array($post->post_status, array('pending', 'draft')) ) … … 1894 1889 $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete vim-d vim-destructive'>" . __('Delete') . '</a>'; 1895 1890 $actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a>'; 1896 $actions['quickedit'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\',\'edit\');return false;" class="vim-q" title="'.__('Quick Edit').'" href="#">' . __('Quick Edit') . '</a>';1897 1891 if ( 'spam' != $the_comment_status ) 1898 1892 $actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\');return false;" class="vim-r" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>'; trunk/wp-admin/js/edit-comments.js
r9098 r9162 108 108 r.each(function() { 109 109 $(this).dblclick(function(){ 110 commentReply.toggle(this); 111 }); 112 }); 113 }, 114 115 toggle : function(el) { 116 if ( $(el).css('display') != 'none' ) 117 $(el).find('a.vim-q').click(); 110 commentReply.toggle_edit(this); 111 }); 112 }); 113 }, 114 115 toggle_edit : function(el) { 116 if ( $(el).css('display') != 'none' ) { 117 var id = $(el).attr('id').substr(8); 118 if (id) this.open(id, '', 'edit'); 119 } 118 120 }, 119 121 120 122 revert : function() { 121 123 122 if ( $('#the-comment-list #replyrow').length < 1 ) 123 return false; 124 125 $('#replyrow').fadeOut('fast', function(){ 126 commentReply.close(); 127 }); 124 if ( $('#the-comment-list #replyrow').length > 0 ) { 125 $('#replyrow').fadeOut('fast', function(){ 126 commentReply.close(); 127 }); 128 } 128 129 129 130 return false; … … 145 146 open : function(id, p, a) { 146 147 var t = this; 147 t.close(); 148 149 if ( $('#the-comment-list #replyrow').length > 0 ) 150 t.close(); 151 148 152 t.o = '#comment-'+id; 149 153 … … 315 319 } 316 320 }; 317 $.table_hotkeys($('table.widefat'),['a', 'u', 's', 'd', 'r', 'q',['e', edit_comment],321 $.table_hotkeys($('table.widefat'),['a', 'u', 's', 'd', 'r', ['e', edit_comment], 318 322 ['shift+a', make_bulk('approve')], ['shift+s', make_bulk('markspam')], 319 323 ['shift+d', make_bulk('delete')], ['shift+x', toggle_all]], trunk/wp-admin/js/inline-edit-post.js
r9098 r9162 27 27 // add events 28 28 t.rows.dblclick(function() { inlineEditPost.toggle(this); }); 29 t.addEvents(t.rows);30 29 31 30 $('#bulk-title-div').after( … … 80 79 }, 81 80 82 addEvents : function(r) {83 r.each(function() {84 var row = $(this);85 $('a.editinline', row).click(function() { inlineEditPost.edit(this); return false; });86 row.attr('title', inlineEditL10n.edit);87 });88 },89 90 81 setBulk : function() { 91 82 var te = '', c = ''; … … 99 90 var id = $(this).val(); 100 91 c = c == '' ? ' class="alternate"' : ''; 101 te += '<div'+c+' id="ttle'+id+'"><a id="_'+id+'" class="ntdelbutton">X</a>'+$('#inline_'+id+' .post_title').text()+'</div>';92 te += '<div'+c+' id="ttle'+id+'"><a id="_'+id+'" title="'+inlineEditL10n.rem_title+'" class="ntdelbutton">X</a>'+$('#inline_'+id+' .post_title').text()+'</div>'; 102 93 } 103 94 }); … … 209 200 .animate( { backgroundColor: '#CCEEBB' }, 500) 210 201 .animate( { backgroundColor: '#eefee7' }, 500); 211 inlineEditPost.addEvents(row);212 202 } else { 213 203 $('#edit-'+id+' .quick-edit-save').append('<span class="error">'+inlineEditL10n.error+'</span>'); trunk/wp-admin/js/inline-edit-tax.js
r9098 r9162 21 21 // add events 22 22 t.rows.dblclick(function() { inlineEditTax.toggle(this); }); 23 t.addEvents(t.rows);24 23 25 24 $('#doaction, #doaction2, #post-query-submit').click(function(e){ … … 33 32 34 33 $(t.what+t.getId(el)).css('display') == 'none' ? t.revert() : t.edit(el); 35 },36 37 addEvents : function(r) {38 r.each(function() {39 var row = $(this);40 $('a.editinline', row).click(function() { inlineEditTax.edit(this); return false; });41 row.attr('title', inlineEditL10n.edit);42 });43 34 }, 44 35 … … 113 104 .animate( { backgroundColor: '#CCEEBB' }, 500) 114 105 .animate( { backgroundColor: '#eefee7' }, 500); 115 inlineEditTax.addEvents(row);116 106 } else 117 107 $('#edit-'+id+' .quick-edit-save .error').html(r).show(); trunk/wp-includes/script-loader.php
r9154 r9162 159 159 'strong' => __('Strong') 160 160 ) ); 161 $scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'columns', 'settings-box'), '200810 07' );161 $scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'columns', 'settings-box'), '20081014' ); 162 162 $scripts->localize( 'admin-comments', 'adminCommentsL10n', array( 163 163 'pending' => __('%i% pending'), // must look like: "# blah blah" … … 245 245 $scripts->add( 'theme-preview', '/wp-admin/js/theme-preview.js', array( 'thickbox', 'jquery' ), '20080625' ); 246 246 247 $scripts->add( 'inline-edit-post', '/wp-admin/js/inline-edit-post.js', array( 'jquery', 'jquery-form', 'suggest' ), '200810 07' );247 $scripts->add( 'inline-edit-post', '/wp-admin/js/inline-edit-post.js', array( 'jquery', 'jquery-form', 'suggest' ), '20081014' ); 248 248 $scripts->localize( 'inline-edit-post', 'inlineEditL10n', array( 249 'e dit' => __('Double-click to edit'),250 ' error' => __('Error while saving the changes.')251 ) ); 252 253 $scripts->add( 'inline-edit-tax', '/wp-admin/js/inline-edit-tax.js', array( 'jquery', 'jquery-form' ), '200810 07' );249 'error' => __('Error while saving the changes.'), 250 'rem_title' => __('Remove from batch edit') 251 ) ); 252 253 $scripts->add( 'inline-edit-tax', '/wp-admin/js/inline-edit-tax.js', array( 'jquery', 'jquery-form' ), '20081014' ); 254 254 $scripts->localize( 'inline-edit-tax', 'inlineEditL10n', array( 255 'edit' => __('Double-click to edit'),256 255 'error' => __('Error while saving the changes.') 257 256 ) );
