From c7771dcaaf8dfaeb9647783ba6031ed7c97dd88f Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 31 Aug 2005 02:39:17 +0000 Subject: [PATCH] On the fly list manipulation. Delete in style. Mad props to mdawaffe. Applies to #1634 git-svn-id: http://svn.automattic.com/wordpress/trunk@2832 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-functions.php | 8 +-- wp-admin/admin-header.php | 3 +- wp-admin/categories.php | 4 +- wp-admin/edit-comments.php | 10 ++-- wp-admin/edit-pages.php | 7 ++- wp-admin/edit.php | 10 ++-- wp-admin/link-categories.php | 8 +-- wp-admin/link-manager.php | 12 +++-- wp-admin/list-manipulation.js | 96 ++++++++++++++++++++++++++++++++++ wp-admin/list-manipulation.php | 80 ++++++++++++++++++++++++++++ wp-admin/moderation.php | 8 +-- 11 files changed, 219 insertions(+), 27 deletions(-) create mode 100644 wp-admin/list-manipulation.js create mode 100644 wp-admin/list-manipulation.php diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 951b8e88c..830d114d7 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -442,12 +442,12 @@ function cat_rows($parent = 0, $level = 0, $categories = 0) { $count = $wpdb->get_var("SELECT COUNT(post_id) FROM $wpdb->post2cat WHERE category_id = $category->cat_ID"); $pad = str_repeat('— ', $level); if ( current_user_can('manage_categories') ) - $edit = "" . __('Edit') . "escape($category->cat_name)) . "')\" class='delete'>" . __('Delete') . ""; + $edit = "" . __('Edit') . "cat_ID, '" . sprintf(__("You are about to delete the category "%s". All of its posts will go to the default category.\\n"OK" to delete, "Cancel" to stop."), wp_specialchars($category->cat_name, 1)) . "' );\" class='delete'>" . __('Delete') . ""; else $edit = ''; $class = ('alternate' == $class) ? '' : 'alternate'; - echo "$category->cat_ID$pad $category->cat_name + echo "$category->cat_ID$pad $category->cat_name $category->category_description $count $edit @@ -473,7 +473,7 @@ function page_rows( $parent = 0, $level = 0, $pages = 0 ) { $id = $post->ID; $class = ('alternate' == $class) ? '' : 'alternate'; ?> - + ID; ?> @@ -482,7 +482,7 @@ function page_rows( $parent = 0, $level = 0, $pages = 0 ) { post_modified); ?> " . __('Edit') . ""; } ?> - " . __('Delete') . ""; } ?> + " . __('Delete') . ""; } ?> + + @@ -104,7 +106,6 @@ tinyMCE.init({ -