Press This updates from noel. see #7732
git-svn-id: http://svn.automattic.com/wordpress/trunk@8959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e5440f8156
commit
f528acb8df
|
@ -123,10 +123,25 @@ margin:0 12px 12px;
|
|||
|
||||
#category-add input {
|
||||
width: 94%;
|
||||
font-family:Verdana,Arial,Helvetica,sans-serif;
|
||||
font-size:13px;
|
||||
margin:1px;
|
||||
padding:3px;
|
||||
|
||||
}
|
||||
|
||||
#category-add select {
|
||||
width: 100%;
|
||||
width: 70%;
|
||||
-x-system-font:none;
|
||||
border-style:solid;
|
||||
border-width:1px;
|
||||
font-family:"Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;
|
||||
font-size:12px;
|
||||
height:2em;
|
||||
line-height:20px;
|
||||
padding:2px;
|
||||
margin: 1px;
|
||||
vertical-align:top;
|
||||
}
|
||||
|
||||
#category-add input#category-add-sumbit {
|
||||
|
@ -143,12 +158,14 @@ padding: 0.5em 0.9em;
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
#categorydiv ul.categorychecklist ul, #linkcategorydiv ul.categorychecklist ul {
|
||||
#categorydiv ul.categorychecklist ul {
|
||||
margin-left: 18px;
|
||||
}
|
||||
|
||||
|
||||
#categorydiv div.ui-tabs-panel, #linkcategorydiv div.ui-tabs-panel {
|
||||
#categorydiv div.ui-tabs-panel {
|
||||
height:150px;
|
||||
overflow:auto;
|
||||
padding:0.5em 0.9em;
|
||||
}
|
||||
|
||||
|
@ -191,7 +208,7 @@ padding:1.5em 0 0;
|
|||
|
||||
#TB_ajaxContent #options{position:absolute;top:20px;right:25px;padding:5px;}
|
||||
#TB_ajaxContent h3{margin-bottom:.25em;}
|
||||
.updated{margin:0;margin-left:15px;margin-right:15px;padding:0;max-width:980px;border-width:1px;border-style:solid;max-width:950px;margin-top:1em;margin-bottom:1em;width:66%;}
|
||||
.updated{margin:10px 0;padding:0;border-width:1px;border-style:solid; width:99%;}
|
||||
.updated p,.error p{margin:0.6em 0;padding:0 0.6em;}
|
||||
.updated a,.error a{text-decoration:underline;}
|
||||
.updated a{text-decoration:none;padding-bottom:2px;}
|
||||
|
|
|
@ -342,9 +342,15 @@ function media_upload_image() {
|
|||
function media_sideload_image($file, $post_id, $desc = null) {
|
||||
if (!empty($file) ) {
|
||||
$file_array['name'] = basename($file);
|
||||
$file_array['tmp_name'] = download_url($file);
|
||||
$tmp = download_url($file);
|
||||
$file_array['tmp_name'] = $tmp;
|
||||
$desc = @$desc;
|
||||
|
||||
if ( is_wp_error($tmp) ) {
|
||||
@unlink($file_array['tmp_name']);
|
||||
$file_array['tmp_name'] = '';
|
||||
}
|
||||
|
||||
$id = media_handle_sideload($file_array, $post_id, $desc);
|
||||
$src = $id;
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ switch ($_REQUEST['ajax']) {
|
|||
}
|
||||
img_attr += ' style="width: ' + w + 'px; height: ' + h + 'px;"';
|
||||
}
|
||||
if (!skip) strtoappend += '<a href="?ajax=photo_thickbox&i=' + img.src + '&u=<?php echo $url; ?>&height=400&width=500" title="" class="thickbox"><img src="' + img.src + '" ' + img_attr + '/></a>';
|
||||
if (!skip) strtoappend += '<a href="?ajax=photo_thickbox&i=' + encodeURI(img.src) + '&u=<?php echo $url; ?>&height=400&width=500" title="" class="thickbox"><img src="' + img.src + '" ' + img_attr + '/></a>';
|
||||
}
|
||||
|
||||
function pick(img, desc) {
|
||||
|
@ -257,7 +257,7 @@ switch ($_REQUEST['ajax']) {
|
|||
if(length == 0) length = 1;
|
||||
jQuery('.photolist').append('<input name="photo_src[' + length + ']" value="' + img +'" type="hidden"/>');
|
||||
jQuery('.photolist').append('<input name="photo_description[' + length + ']" value="' + desc +'" type="hidden"/>');
|
||||
append_editor("\n\n" + '<p><img src="' + img +'" alt="' + desc + '" class="aligncenter"/></p>');
|
||||
append_editor("\n\n" + '<p style="text-align: center;"><a href="<?php echo urlencode($url); ?>"><img src="' + img +'" alt="' + desc + '" /></a></p>');
|
||||
}
|
||||
tinyMCE.activeEditor.resizeToContent();
|
||||
return false;
|
||||
|
@ -430,6 +430,7 @@ die;
|
|||
}
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
top.resizeTo(700-screen.width+screen.availWidth,680-screen.height+screen.availHeight);
|
||||
jQuery('#photo_button').click(function() { show('photo'); return false; });
|
||||
jQuery('#video_button').click(function() { show('video'); return false; });
|
||||
|
||||
|
@ -450,14 +451,6 @@ die;
|
|||
<div id="wphead">
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ( isset($posted) && intval($posted) ) {
|
||||
$post_ID = intval($posted);
|
||||
?>
|
||||
<div id="message" class="updated fade"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a onclick="window.opener.location.replace(this.href); window.close();" href="<?php echo get_permalink( $post_ID); ?>"><?php _e('View post'); ?></a> | <a href="<?php echo get_edit_post_link( $post_ID ); ?>" onclick="window.opener.location.replace(this.href); window.close();"><?php _e('Edit post'); ?></a> | <a href="#" onclick="window.close();"><?php _e('Close Window'); ?></a></p></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<form action="press-this.php?action=post" method="post">
|
||||
<?php wp_nonce_field('press-this') ?>
|
||||
<input type="hidden" name="post_type" id="post_type" value="text"/>
|
||||
|
@ -514,6 +507,15 @@ if ( isset($posted) && intval($posted) ) {
|
|||
</div>
|
||||
|
||||
<div class="posting">
|
||||
<?php
|
||||
if ( isset($posted) && intval($posted) ) {
|
||||
$post_ID = intval($posted);
|
||||
?>
|
||||
<div id="message" class="updated fade"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a onclick="window.opener.location.replace(this.href); window.close();" href="<?php echo get_permalink( $post_ID); ?>"><?php _e('View post'); ?></a> | <a href="<?php echo get_edit_post_link( $post_ID ); ?>" onclick="window.opener.location.replace(this.href); window.close();"><?php _e('Edit post'); ?></a> | <a href="#" onclick="window.close();"><?php _e('Close Window'); ?></a></p></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<h2 id="title"><label for="post_title"><?php _e('Title') ?></label></h2>
|
||||
<div class="titlewrap">
|
||||
<input name="post_title" id="post_title" class="text" value="<?php echo attribute_escape($title);?>"/>
|
||||
|
|
|
@ -318,7 +318,7 @@ function wp_default_styles( &$styles ) {
|
|||
$styles->add( 'dashboard', '/wp-admin/css/dashboard.css' );
|
||||
$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(), '20080915' );
|
||||
$styles->add( 'press-this', '/wp-admin/css/press-this.css', array(), '20080922' );
|
||||
$styles->add( 'press-this-ie', '/wp-admin/css/press-this-ie.css', array(), '20080915' );
|
||||
$styles->add_data( 'press-this-ie', 'conditional', 'gte IE 6' );
|
||||
$styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array(), '20080613' );
|
||||
|
|
Loading…
Reference in New Issue