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> <head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
<title><?php _e('Press This') ?></title> <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 <?php
add_thickbox(); add_thickbox();
wp_enqueue_style('press-this'); wp_enqueue_style('press-this');
wp_enqueue_style('press-this-ie');
wp_enqueue_style( 'colors' ); wp_enqueue_style( 'colors' );
wp_enqueue_script('post'); wp_enqueue_script('post');
@ -294,12 +292,10 @@ if($_REQUEST['ajax'] == 'photo') { ?>
<title><?php _e('Press This') ?></title> <title><?php _e('Press This') ?></title>
<script type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce.js?ver=311"></script> <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 <?php
add_thickbox(); add_thickbox();
wp_enqueue_style('press-this'); wp_enqueue_style('press-this');
wp_enqueue_style('press-this-ie');
wp_enqueue_style( 'colors' ); wp_enqueue_style( 'colors' );
wp_enqueue_script('post'); wp_enqueue_script('post');
wp_enqueue_script('editor_functions'); 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() { function get_shortcut_link() {
$link = "javascript: $link = "javascript:
var d=document; var d=document,
var w=window; w=window,
var e=w.getSelection; e=w.getSelection,
var k=d.getSelection; k=d.getSelection,
var x=d.selection; x=d.selection,
var s=(e?e():(k)?k():(x?x.createRange().text:0)); s=(e?e():(k)?k():(x?x.createRange().text:0)),
var f='" . admin_url('press-this.php') . "'; f='" . admin_url('press-this.php') . "',
var l=d.location; l=d.location,
var e=encodeURIComponent; e=encodeURIComponent,
var g=f+'?u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s)+'&v=2'; g=f+'?u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s)+'&v=2';
function a(){ function a(){
if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=700,height=500')){ if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=700,height=500')){
l.href=g; 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( 'install', '/wp-admin/css/install.css', array(), '20080708' );
$styles->add( 'theme-editor', '/wp-admin/css/theme-editor.css' ); $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', '/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( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array(), '20080613' );
$styles->add( 'login', '/wp-admin/css/login.css' ); $styles->add( 'login', '/wp-admin/css/login.css' );