Press This fixes from noel. see #6998

git-svn-id: https://develop.svn.wordpress.org/trunk@7983 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-05-22 15:47:37 +00:00
parent 16f62693a7
commit 0a875a8617
2 changed files with 134 additions and 105 deletions

View File

@ -1,20 +1,19 @@
body { body {
font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
} margin: 0px;
/* jquery tabs css */ padding: 0px;
}
/* Caution! Ensure accessibility in print and other media types... */
@media projection, screen { /* Use class for showing/hiding tab content, so that visibility can be better controlled in different media types... */ @media projection , screen {
.ui-tabs-hide { .ui-tabs-hide {
display: none; display: none;
} }
} }
/* Hide useless elements in print layouts... */
@media print { @media print {
.ui-tabs-nav { .ui-tabs-nav {
display: none; display: none;
} }
} }
/* Skin */ /* Skin */
@ -26,89 +25,99 @@ div.ui-tabs-panel {
padding: 0; padding: 0;
position: relative; position: relative;
} }
.ui-tabs-nav { .ui-tabs-nav {
list-style: none; list-style: none;
border-bottom: 1px solid #C6D9E9; border-bottom: 1px solid #C6D9E9;
padding-left: 8px; padding-left: 8px;
margin-bottom: .5em; margin-bottom: .5em;
margin-top: -2em; margin-top: -2em;
}
.ui-tabs-nav:after {
/* clearing without presentational markup, IE gets extra treatment */
display: block;
clear: both;
content: " ";
} }
.ui-tabs-nav:after { /* clearing without presentational markup, IE gets extra treatment */
display: block;
clear: both;
content: " ";
}
.ui-tabs-nav li { .ui-tabs-nav li {
float: left; float: left;
margin: 0; margin: 0;
height: 2em; height: 2em;
line-height: 2em; line-height: 2em;
} }
.ui-tabs-nav a, .ui-tabs-nav a span {
display: block; .ui-tabs-nav a,.ui-tabs-nav a span {
display: block;
} }
.ui-tabs-nav a { .ui-tabs-nav a {
margin: 1px 0 0; /* position: relative makes opacity fail for disabled tab in IE */ margin: 1px 0 0;
padding-left: 0; /* position: relative makes opacity fail for disabled tab in IE */
color: #27537a; padding-left: 0;
font-weight: bold; color: #27537a;
font-weight: bold;
line-height: 2em; line-height: 2em;
text-align: center; text-align: center;
text-decoration: none; text-decoration: none;
white-space: nowrap; /* required in IE 6 */ white-space: nowrap; /* required in IE 6 */
outline: 0; /* prevent dotted border in Firefox */ outline: 0; /* prevent dotted border in Firefox */
padding: 0 1em; padding: 0 1em;
} }
.ui-tabs-nav .ui-tabs-selected a { .ui-tabs-nav .ui-tabs-selected a {
position: relative; position: relative;
top: 1px; top: 1px;
z-index: 2; z-index: 2;
margin-top: 0; margin-top: 0;
-moz-border-radius-topleft:4px; -moz-border-radius-topleft: 4px;
-moz-border-radius-topright:4px; -moz-border-radius-topright: 4px;
-webkit-border-top-left-radius: 4px; -webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px; -webkit-border-top-right-radius: 4px;
border-style:solid; border-style: solid;
border-width:1px; border-width: 1px;
border-color:#C6D9E9 rgb(198, 217, 233) rgb(255, 255, 255); border-color: #C6D9E9 rgb(198, 217, 233) rgb(255, 255, 255);
color:#D54E21; color: #D54E21;
} }
.ui-tabs-nav .ui-tabs-selected a { .ui-tabs-nav .ui-tabs-selected a {
background: white; background: white;
border-bottom-width:2px; border-bottom-width: 2px;
margin-top: -2px; margin-top: -2px;
} }
.ui-tabs-nav .ui-tabs-selected a:link, .ui-tabs-nav .ui-tabs-selected a:visited, .ui-tabs-nav .ui-tabs-disabled a:link, .ui-tabs-nav .ui-tabs-disabled a:visited { .ui-tabs-nav .ui-tabs-selected a:link,.ui-tabs-nav .ui-tabs-selected a:visited,.ui-tabs-nav .ui-tabs-disabled a:link,.ui-tabs-nav .ui-tabs-disabled a:visited
/* @ Opera, use pseudo classes otherwise it confuses cursor... */ { /* @ Opera, use pseudo classes otherwise it confuses cursor... */
cursor: pointer; cursor: pointer;
}
.ui-tabs-nav a:hover,.ui-tabs-nav a:focus,.ui-tabs-nav a:active,.ui-tabs-nav .ui-tabs-unselect a:hover,.ui-tabs-nav .ui-tabs-unselect a:focus,.ui-tabs-nav .ui-tabs-unselect a:active
{ /* @ Opera, we need to be explicit again here now... */
cursor: pointer;
} }
.ui-tabs-nav a:hover, .ui-tabs-nav a:focus, .ui-tabs-nav a:active,
.ui-tabs-nav .ui-tabs-unselect a:hover, .ui-tabs-nav .ui-tabs-unselect a:focus, .ui-tabs-nav .ui-tabs-unselect a:active {
/* @ Opera, we need to be explicit again here now... */
cursor: pointer;
}
.ui-tabs-loading em { .ui-tabs-loading em {
padding: 0 0 0 20px; padding: 0 0 0 20px;
background: url(../images/loading.gif) no-repeat 0 50%; background: url(./images/loading.gif) no-repeat 0 50%;
} }
/* Additional IE specific bug fixes... */ /* Additional IE specific bug fixes... */
* html .ui-tabs-nav { /* auto clear, @ IE 6 & IE 7 Quirks Mode */ * html .ui-tabs-nav { /* auto clear, @ IE 6 & IE 7 Quirks Mode */
display: inline-block; display: inline-block;
} }
*:first-child+html .ui-tabs-nav { /* @ IE 7 Standards Mode - do not group selectors, otherwise IE 6 will ignore complete rule (because of the unknown + combinator)... */
display: inline-block; * :first-child+html .ui-tabs-nav {
/* @ IE 7 Standards Mode - do not group selectors, otherwise IE 6 will ignore complete rule (because of the unknown + combinator)... */
display: inline-block;
} }
#wphead { #wphead {
border-top: none; border-top: none;
} }
.submit input { .submit input {
} }
#wphead { #wphead {
@ -128,8 +137,10 @@ margin-top: -2px;
top: 6px; top: 6px;
margin: 0 !important; margin: 0 !important;
} }
#wphead #viewsite a { #wphead #viewsite a {
font: 12px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; font: 12px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana,
sans-serif;
padding: 3px 4px; padding: 3px 4px;
display: block; display: block;
letter-spacing: normal; letter-spacing: normal;
@ -146,6 +157,7 @@ margin-top: -2px;
padding-top: 8px !important; padding-top: 8px !important;
padding-bottom: 8px !important; padding-bottom: 8px !important;
} }
h1 { h1 {
font-size: .75em; font-size: .75em;
line-height: 2.666em; line-height: 2.666em;
@ -153,43 +165,42 @@ h1 {
right: 0; right: 0;
margin: 0 !important; margin: 0 !important;
padding: 0 !important; padding: 0 !important;
width:236px; width: 236px;
background: none; background: none;
} }
input.text { input.text {
border:0pt none; border: 0pt none;
outline-color:-moz-use-text-color; outline-color: -moz-use-text-color;
outline-style:none; outline-style: none;
outline-width:medium; outline-width: medium;
padding:0pt; padding: 0pt;
width:100%; width: 100%;
border-style:solid; border-style: solid;
color:#333333; color: #333333;
} }
.titlewrap {
border-style:solid;
border-width:1px;
padding:2px 3px;
border-color:#CCCCCC;
}
div#container {
.titlewrap {
border-style: solid;
border-width: 1px;
padding: 2px 3px;
border-color: #CCCCCC;
}
div#container {
margin: 0; margin: 0;
min-width: 500px; min-width: 500px;
} }
div#posting { div#posting {
padding-left: 16px; padding-left: 16px;
position:absolute; position: absolute;
z-index:1; z-index: 1;
width: 66%; width: 66%;
} }
div#posting h2 { div#posting h2 {
margin: .5em 0 .25em 0 ; margin: .5em 0 .25em 0;
font-size: 12px; font-size: 12px;
padding: 3px; padding: 3px;
background: ; background: ;
@ -208,6 +219,7 @@ div#categories {
width: 27%; width: 27%;
z-index: 2; z-index: 2;
} }
div#categories h2 { div#categories h2 {
font-size: 12px; font-size: 12px;
margin: 0; margin: 0;
@ -240,7 +252,6 @@ div#categories h2 {
#tagchecklist { #tagchecklist {
margin-left: 10px; margin-left: 10px;
font-size: 12px; font-size: 12px;
overflow: auto; overflow: auto;
} }
@ -281,19 +292,21 @@ div#categories h2 {
width: 99%; width: 99%;
} }
/* end quickpost css */
#img_container { #img_container {
background-color: #fff; background-color: #fff;
margin-top:10px; overflow:auto; height:100px; margin-top: 10px;
overflow: auto;
height: 100px;
} }
#img_container img { #img_container img {
width: 75px; width: 75px;
height: 75px; height: 75px;
padding: 2px; padding: 2px;
background-color: #f4f4f4; background-color: #f4f4f4;
margin-right: 7px; margin-right: 7px;
margin-bottom: 7px; margin-bottom: 7px;
cursor: pointer; cursor: pointer;
} }
.submitbox { .submitbox {
@ -301,7 +314,6 @@ div#categories h2 {
float: right; float: right;
} }
.submitbox .submit { .submitbox .submit {
text-align: left; text-align: left;
padding: 12px 10px 10px 10px; padding: 12px 10px 10px 10px;
@ -321,6 +333,7 @@ div#categories h2 {
-webkit-border-bottom-right-radius: 3px; -webkit-border-bottom-right-radius: 3px;
border-bottom-right-radius: 3px; border-bottom-right-radius: 3px;
} }
.submitbox .submit a:hover { .submitbox .submit a:hover {
border-bottom-width: 1px; border-bottom-width: 1px;
border-bottom-style: solid; border-bottom-style: solid;
@ -344,5 +357,4 @@ div#categories h2 {
-khtml-border-top-right-radius: 3px; -khtml-border-top-right-radius: 3px;
-webkit-border-top-right-radius: 3px; -webkit-border-top-right-radius: 3px;
border-top-right-radius: 3px; border-top-right-radius: 3px;
} }

View File

@ -22,35 +22,37 @@ function press_it() {
case 'regular': case 'regular':
$content = $_REQUEST['content']; $content = $_REQUEST['content'];
if ($_REQUEST['content2']) if ($_REQUEST['content2'])
$content .= '<p>' . $_REQUEST['content2']; $content .= $_REQUEST['content2'];
break; break;
case 'quote': case 'quote':
$content = '<blockquote>' . $_REQUEST['content']; $content = '<blockquote>' . $_REQUEST['content'];
if ($_REQUEST['content2']) { if ($_REQUEST['content2']) {
$content .= '</blockquote>'; $content .= '</blockquote>
$content = $content . '<p>' . $_REQUEST['content2'].'</p>'; ';
$content = $content . $_REQUEST['content2'];
} }
break; break;
case 'photo': case 'photo':
if ($_REQUEST['photo_link']) if ($_REQUEST['photo_link'])
$content = '<p><a href="' . $_REQUEST['photo_link'] . '" target="_new">'; $content = '<a href="' . $_REQUEST['photo_link'] . '" target="_new">';
$content .= '<img src="' . $_REQUEST['photo_src'] . '" alt=""/>'; $content .= '<img src="' . $_REQUEST['photo_src'] . '" alt=""/>';
if ($_REQUEST['photo_link']) if ($_REQUEST['photo_link'])
$content .= '</a></p>'; $content .= '</a>
';
if ($_REQUEST['content']) if ($_REQUEST['content'])
$content = $content . $_REQUEST['content']; $content = $content . "\n".$_REQUEST['content'];
break; break;
case "video": case "video":
list($garbage,$video_id) = split("v=", $_REQUEST['content']); list($garbage,$video_id) = split("v=", $_REQUEST['content']);
$content = '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/' . $video_id . '"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/' . $video_id . '" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>'; $content = '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/' . $video_id . '"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/' . $video_id . '" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>';
if ($_REQUEST['content2']) if ($_REQUEST['content2'])
$content .= '<p>' . $_REQUEST['content2'] . '</p>'; $content .= "\n" . $_REQUEST['content2'];
break; break;
} }
@ -152,7 +154,8 @@ function press_this_js_init() { ?>
remove_linebreaks : true, remove_linebreaks : true,
accessibility_focus : false, accessibility_focus : false,
tab_focus : ":next", tab_focus : ":next",
plugins : "safari,inlinepopups" plugins : "safari,inlinepopups",
entity_encoding : "raw"
}); });
<?php } ?> <?php } ?>
@ -161,7 +164,7 @@ function press_this_js_init() { ?>
tag_update_quickclicks(); tag_update_quickclicks();
// add the quickadd form // add the quickadd form
jQuery('#jaxtag').prepend('<span id="ajaxtag"><input type="text" name="newtag" id="newtag" class="form-input-tip" size="16" autocomplete="off" value="'+postL10n.addTag+'" /><input type="button" class="button" id="tagadd" value="' + postL10n.add + '" tabindex="3" /><input type="hidden"/><input type="hidden"/><span class="howto">'+postL10n.separate+'</span></span>'); jQuery('#jaxtag').prepend('<span id="ajaxtag"><input type="text" name="newtag" id="newtag" class="form-input-tip" size="16" autocomplete="off" value="'+postL10n.addTag+'" /><input type="submit" class="button" id="tagadd" value="' + postL10n.add + '" tabindex="3" onclick="return false;" /><input type="hidden"/><input type="hidden"/><span class="howto">'+postL10n.separate+'</span></span>');
jQuery('#tagadd').click( tag_flush_to_text ); jQuery('#tagadd').click( tag_flush_to_text );
jQuery('#newtag').focus(function() { jQuery('#newtag').focus(function() {
@ -191,6 +194,7 @@ if ( empty($_GET['tab']) ) {
<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>
<script type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce.js"></script> <script type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce.js"></script>
<?php <?php
wp_enqueue_script('jquery-ui-tabs'); wp_enqueue_script('jquery-ui-tabs');
@ -216,6 +220,8 @@ if ( empty($_GET['tab']) ) {
}); });
</script> </script>
</head> </head>
<body> <body>
<div id="wphead"> <div id="wphead">
@ -243,9 +249,18 @@ if ( empty($_GET['tab']) ) {
img.style.backgroundColor = '#44f'; img.style.backgroundColor = '#44f';
} }
last = img; last = img;
/*jQuery('.photolist').append('<h2><?php _e("Photo URL") ?></h2>' +
'<div class="titlewrap">' +
'<a href="#" class="remove">remove <input name="photo_src" id="photo_src[]" value ="'+ img.src +'" class="text" onkeydown="pick(0);"/></a>' +
'</div>');*/
return false; return false;
} }
jQuery('.remove').click(function() {
jQuery(this).remove;
});
jQuery(document).ready(function() { jQuery(document).ready(function() {
var img, img_tag, aspect, w, h, skip, i, strtoappend = ""; var img, img_tag, aspect, w, h, skip, i, strtoappend = "";
var my_src = [<?php echo get_images_from_uri($url); ?>]; var my_src = [<?php echo get_images_from_uri($url); ?>];
@ -300,6 +315,8 @@ if ( empty($_GET['tab']) ) {
<input name="photo_src" id="photo_src" class="text" onkeydown="pick(0);"/> <input name="photo_src" id="photo_src" class="text" onkeydown="pick(0);"/>
</div> </div>
<div class="photolist"></div>
<h2><?php _e('Link Photo to following URL') ?></h2><?php _e('(leave blank to leave the photo unlinked)') ?> <h2><?php _e('Link Photo to following URL') ?></h2><?php _e('(leave blank to leave the photo unlinked)') ?>
<div class="titlewrap"> <div class="titlewrap">
<input name="photo_link" id="photo_link" class="text" value="<?php echo attribute_escape($url);?>"/> <input name="photo_link" id="photo_link" class="text" value="<?php echo attribute_escape($url);?>"/>
@ -315,7 +332,7 @@ if ( empty($_GET['tab']) ) {
<h2><?php _e('Caption') ?></h2> <h2><?php _e('Caption') ?></h2>
<div class="editor-container"> <div class="editor-container">
<textarea name="content" id="photo_post_two" style="" class="mceEditor"><?php echo $selection;?> <textarea name="content" id="photo_post_two" style="" class="mceEditor"><?php echo $selection;?>
&lt;a href="<?php echo attribute_escape($url);?>"&gt;<?php echo $title;?>&lt;/a&gt;</textarea> &lt;a href="<?php echo attribute_escape($url);?>"&gt;<?php echo $title;?>&lt;/a&gt; </textarea>
</div> </div>
<?php tag_div(); ?> <?php tag_div(); ?>
@ -343,7 +360,7 @@ exit;
<h2><?php _e('Post') ?></h2> <h2><?php _e('Post') ?></h2>
<div class="editor-container"> <div class="editor-container">
<textarea name="content" id="regular_post_two" style="height:170px;width:100%;" class="mceEditor"><?php echo $selection;?>&lt;a href="<?php echo $url;?>"&gt;<?php echo $title;?>&lt;/a&gt;</textarea> <textarea name="content" id="regular_post_two" style="height:170px;width:100%;" class="mceEditor"><?php echo $selection;?><a href="<?php echo $url;?>"><?php echo $title;?></a></textarea>
</div> </div>
<?php tag_div(); ?> <?php tag_div(); ?>