From 398253a850d49ff0d880d87bc3612aa7faca6927 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 14 May 2008 20:01:09 +0000 Subject: [PATCH] Press This: AJAX load all tabs, add tag UI, make category list scrollable. git-svn-id: https://develop.svn.wordpress.org/trunk@7932 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/css/press-this.css | 49 ++++++ wp-admin/js/post.js | 2 + wp-admin/press-this.php | 334 ++++++++++++++++++++---------------- 3 files changed, 233 insertions(+), 152 deletions(-) diff --git a/wp-admin/css/press-this.css b/wp-admin/css/press-this.css index a8b6e61240..70978f8e31 100644 --- a/wp-admin/css/press-this.css +++ b/wp-admin/css/press-this.css @@ -334,6 +334,11 @@ a { color: #007BFF; } +#categories-all { + overflow: auto; + height: 30em; +} + #categories ul { list-style: none; padding: 0; @@ -346,4 +351,48 @@ a { border-style: solid; } +#tagsdiv #newtag { + margin-right: 5px; + width: 16em; +} + +#tagchecklist { + margin-left: 10px; + + font-size: 12px; + overflow: auto; +} + +#tagchecklist strong { + margin-left: -8px; + position: absolute; +} + +#tagchecklist span { + margin-right: 25px; + display: block; + float: left; + font-size: 11px; + line-height: 1.8em; + white-space: nowrap; + cursor: default; +} + +#tagchecklist span a { + margin: 6px 0pt 0pt -9px; + cursor: pointer; + width: 10px; + height: 10px; + display: block; + float: left; + text-indent: -9999px; + overflow: hidden; + position: absolute; +} + +.howto { + font-style: italic; + display: block; +} + /* end quickpost css */ \ No newline at end of file diff --git a/wp-admin/js/post.js b/wp-admin/js/post.js index c938af3015..99cb5c88c3 100644 --- a/wp-admin/js/post.js +++ b/wp-admin/js/post.js @@ -18,6 +18,8 @@ function new_tag_remove_tag() { } function tag_update_quickclicks() { + if ( jQuery( '#tags-input' ).length == 0 ) + return; var current_tags = jQuery( '#tags-input' ).val().split(','); jQuery( '#tagchecklist' ).empty(); shown = false; diff --git a/wp-admin/press-this.php b/wp-admin/press-this.php index 36cbe9d1ac..bdc042deec 100644 --- a/wp-admin/press-this.php +++ b/wp-admin/press-this.php @@ -4,7 +4,7 @@ require_once('admin.php'); if ( ! current_user_can('publish_posts') ) wp_die( __( 'Cheatin’ uh?' )); -function quick_post() { +function press_it() { $quick['post_status'] = 'publish'; $quick['post_category'] = $_REQUEST['post_category']; $quick['tags_input'] = $_REQUEST['tags_input']; @@ -57,14 +57,29 @@ function quick_post() { return $post_ID; } -function tag_input() { - $s = '
-

' . __('Tags') . '

-
' . - __('Comma separated (e.g. Wordpress, Plugins)') . - '
'; - - return $s; +function tag_div() { +?> +

+
+
+

+
+
+
+ +
+

+
+
    + +
+
+
+ - + + + + + + + + + + +
+ +
+ + + + + - - - - - - + - - - - - - - - -
- - - - -
@@ -344,7 +383,7 @@ if ( 'post' == $_REQUEST['action'] ) {
- +
   @@ -352,17 +391,16 @@ if ( 'post' == $_REQUEST['action'] ) {
-
-

- -
+ - + + - -
@@ -381,7 +419,7 @@ if ( 'post' == $_REQUEST['action'] ) {
- +
   @@ -389,17 +427,16 @@ if ( 'post' == $_REQUEST['action'] ) {
-
-

- -
+ - + + - -
@@ -425,7 +462,7 @@ if ( 'post' == $_REQUEST['action'] ) {
- +
   @@ -433,16 +470,9 @@ if ( 'post' == $_REQUEST['action'] ) {
-
-

- -
+ - - - - - - + \ No newline at end of file