From 830428b928dac514209bdf7ff13d2d19b9bc17b2 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 11 Jun 2008 17:45:50 +0000 Subject: [PATCH] Press This UI changes and photo loading fixes from noel. fixes #7120 see #6813 git-svn-id: http://svn.automattic.com/wordpress/trunk@8071 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/css/press-this.css | 15 ++++++++++----- wp-admin/press-this.php | 22 +++++++++++++--------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/wp-admin/css/press-this.css b/wp-admin/css/press-this.css index 8dad13b1c..a9cb1c106 100644 --- a/wp-admin/css/press-this.css +++ b/wp-admin/css/press-this.css @@ -1,5 +1,6 @@ body { font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; + color: #333; margin: 0px; padding: 0px; } @@ -213,15 +214,16 @@ div#categories { } div#categories h2 { + color: #333; font-size: 12px; - margin: 0; + margin: .5em 0 0 1em; padding: 0; } #categories-all { overflow: auto; padding: 1em; - height: 20em; + height: 15em; } #categories ul { @@ -243,18 +245,20 @@ div#categories h2 { } #tagchecklist { - margin-left: 10px; + padding-left: 1em; + margin-bottom: 1em; font-size: 12px; overflow: auto; } #tagchecklist strong { - margin-left: -8px; position: absolute; + font-size: .75em; } #tagchecklist span { - margin-right: 25px; + margin-right: .5em; + margin-left: 10px; display: block; float: left; font-size: 11px; @@ -369,6 +373,7 @@ padding: 0; #jaxtag { clear: both; + padding-left: 1em; } .ac_results { diff --git a/wp-admin/press-this.php b/wp-admin/press-this.php index 4be9329d6..94a408877 100644 --- a/wp-admin/press-this.php +++ b/wp-admin/press-this.php @@ -57,21 +57,22 @@ function press_it() { return $post_ID; } -function tag_div() { ?> -

-
-
-

+
+

+

+

+
+

@@ -157,6 +158,7 @@ $url = urldecode($url); $url = str_replace(' ', '%20', $url); function get_images_from_uri($uri) { + if(preg_match('/\.(jpg|png|gif)/', $uri)) return "'".$uri."'"; $content = wp_remote_fopen($uri); $host = parse_url($uri); if ( false === $content ) return ''; @@ -179,7 +181,8 @@ $url = str_replace(' ', '%20', $url); $sources[] = $src; } return "'" . implode("','", $sources) . "'"; - } + } + echo 'new Array('.get_images_from_uri($url).')'; die; @@ -251,7 +254,7 @@ if($_REQUEST['ajax'] == 'photo') { ?>

-
Loading Images...
+
set_editor('') jQuery('#extra_fields').show(); + jQuery('#extra_fields').prepend('

Loading...

'); jQuery('#extra_fields').load(''); - jQuery('#extra_fields').prepend('

Loading...

'); jQuery.ajax({ type: "GET", cache : false, @@ -431,6 +434,7 @@ if($_REQUEST['ajax'] == 'photo') { ?> data: "ajax=photo_js&u=", dataType : "script", success : function() { + jQuery('#waiting').innerHTML(''); } }); @@ -490,7 +494,7 @@ if($_REQUEST['ajax'] == 'photo') { ?>
- +