Press This: properly add and load press-this-ie.css, cleanup of the bookmarklet code. Props azaozz. see #6813

git-svn-id: http://svn.automattic.com/wordpress/trunk@8323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-07-13 04:57:01 +00:00
parent 91ffbd5d4d
commit 4846338eeb
4 changed files with 22 additions and 16 deletions

View File

@ -0,0 +1,8 @@
#posting {
position: static !important;
}
.ui-tabs-nav {
margin-left: 0;
border: 0 !important;
}

View File

@ -79,12 +79,10 @@ if ( 'post' == $_REQUEST['action'] ) {
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
<title><?php _e('Press This') ?></title>
<!--[if gte IE 6]>
<link rel="stylesheet" href="./css/press-this-ie.css" type="text/css" media="screen" charset="utf-8" />
<![endif]-->
<?php
add_thickbox();
wp_enqueue_style('press-this');
wp_enqueue_style('press-this-ie');
wp_enqueue_style( 'colors' );
wp_enqueue_script('post');
@ -294,12 +292,10 @@ if($_REQUEST['ajax'] == 'photo') { ?>
<title><?php _e('Press This') ?></title>
<script type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce.js?ver=311"></script>
<!--[if gte IE 6]>
<?php wp_enqueue_style('press-this-ie'); ?>
<![endif]-->
<?php
add_thickbox();
wp_enqueue_style('press-this');
wp_enqueue_style('press-this-ie');
wp_enqueue_style( 'colors' );
wp_enqueue_script('post');
wp_enqueue_script('editor_functions');

View File

@ -745,16 +745,16 @@ function posts_nav_link($sep=' &#8212; ', $prelabel='&laquo; Previous Page', $nx
function get_shortcut_link() {
$link = "javascript:
var d=document;
var w=window;
var e=w.getSelection;
var k=d.getSelection;
var x=d.selection;
var s=(e?e():(k)?k():(x?x.createRange().text:0));
var f='" . admin_url('press-this.php') . "';
var l=d.location;
var e=encodeURIComponent;
var g=f+'?u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s)+'&v=2';
var d=document,
w=window,
e=w.getSelection,
k=d.getSelection,
x=d.selection,
s=(e?e():(k)?k():(x?x.createRange().text:0)),
f='" . admin_url('press-this.php') . "',
l=d.location,
e=encodeURIComponent,
g=f+'?u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s)+'&v=2';
function a(){
if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=700,height=500')){
l.href=g;

View File

@ -230,6 +230,8 @@ function wp_default_styles( &$styles ) {
$styles->add( 'install', '/wp-admin/css/install.css', array(), '20080708' );
$styles->add( 'theme-editor', '/wp-admin/css/theme-editor.css' );
$styles->add( 'press-this', '/wp-admin/css/press-this.css', array(), '20080710' );
$styles->add( 'press-this-ie', '/wp-admin/css/press-this-ie.css', array(), '20080710' );
$styles->add_data( 'press-this-ie', 'conditional', 'gte IE 6' );
$styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array(), '20080613' );
$styles->add( 'login', '/wp-admin/css/login.css' );