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 {
font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
}
/* jquery tabs css */
/* 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... */
.ui-tabs-hide {
display: none;
}
margin: 0px;
padding: 0px;
}
@media projection , screen {
.ui-tabs-hide {
display: none;
}
}
/* Hide useless elements in print layouts... */
@media print {
.ui-tabs-nav {
display: none;
}
.ui-tabs-nav {
display: none;
}
}
/* Skin */
@ -26,89 +25,99 @@ div.ui-tabs-panel {
padding: 0;
position: relative;
}
.ui-tabs-nav {
list-style: none;
list-style: none;
border-bottom: 1px solid #C6D9E9;
padding-left: 8px;
margin-bottom: .5em;
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 {
float: left;
margin: 0;
float: left;
margin: 0;
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 {
margin: 1px 0 0; /* position: relative makes opacity fail for disabled tab in IE */
padding-left: 0;
color: #27537a;
font-weight: bold;
margin: 1px 0 0;
/* position: relative makes opacity fail for disabled tab in IE */
padding-left: 0;
color: #27537a;
font-weight: bold;
line-height: 2em;
text-align: center;
text-decoration: none;
white-space: nowrap; /* required in IE 6 */
outline: 0; /* prevent dotted border in Firefox */
text-align: center;
text-decoration: none;
white-space: nowrap; /* required in IE 6 */
outline: 0; /* prevent dotted border in Firefox */
padding: 0 1em;
}
.ui-tabs-nav .ui-tabs-selected a {
position: relative;
top: 1px;
z-index: 2;
margin-top: 0;
-moz-border-radius-topleft:4px;
-moz-border-radius-topright:4px;
position: relative;
top: 1px;
z-index: 2;
margin-top: 0;
-moz-border-radius-topleft: 4px;
-moz-border-radius-topright: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
border-style:solid;
border-width:1px;
border-color:#C6D9E9 rgb(198, 217, 233) rgb(255, 255, 255);
color:#D54E21;
border-style: solid;
border-width: 1px;
border-color: #C6D9E9 rgb(198, 217, 233) rgb(255, 255, 255);
color: #D54E21;
}
.ui-tabs-nav .ui-tabs-selected a {
background: white;
border-bottom-width:2px;
margin-top: -2px;
background: white;
border-bottom-width: 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 {
/* @ Opera, use pseudo classes otherwise it confuses cursor... */
cursor: pointer;
.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... */
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 {
padding: 0 0 0 20px;
background: url(../images/loading.gif) no-repeat 0 50%;
padding: 0 0 0 20px;
background: url(./images/loading.gif) no-repeat 0 50%;
}
/* Additional IE specific bug fixes... */
* 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 {
border-top: none;
}
.submit input {
}
#wphead {
@ -128,8 +137,10 @@ margin-top: -2px;
top: 6px;
margin: 0 !important;
}
#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;
display: block;
letter-spacing: normal;
@ -146,6 +157,7 @@ margin-top: -2px;
padding-top: 8px !important;
padding-bottom: 8px !important;
}
h1 {
font-size: .75em;
line-height: 2.666em;
@ -153,43 +165,42 @@ h1 {
right: 0;
margin: 0 !important;
padding: 0 !important;
width:236px;
width: 236px;
background: none;
}
input.text {
border:0pt none;
outline-color:-moz-use-text-color;
outline-style:none;
outline-width:medium;
padding:0pt;
width:100%;
border-style:solid;
color:#333333;
border: 0pt none;
outline-color: -moz-use-text-color;
outline-style: none;
outline-width: medium;
padding: 0pt;
width: 100%;
border-style: solid;
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;
min-width: 500px;
}
div#posting {
padding-left: 16px;
position:absolute;
z-index:1;
position: absolute;
z-index: 1;
width: 66%;
}
div#posting h2 {
margin: .5em 0 .25em 0 ;
margin: .5em 0 .25em 0;
font-size: 12px;
padding: 3px;
background: ;
@ -208,6 +219,7 @@ div#categories {
width: 27%;
z-index: 2;
}
div#categories h2 {
font-size: 12px;
margin: 0;
@ -240,7 +252,6 @@ div#categories h2 {
#tagchecklist {
margin-left: 10px;
font-size: 12px;
overflow: auto;
}
@ -281,19 +292,21 @@ div#categories h2 {
width: 99%;
}
/* end quickpost css */
#img_container {
background-color: #fff;
margin-top:10px; overflow:auto; height:100px;
background-color: #fff;
margin-top: 10px;
overflow: auto;
height: 100px;
}
#img_container img {
width: 75px;
height: 75px;
padding: 2px;
background-color: #f4f4f4;
margin-right: 7px;
margin-bottom: 7px;
cursor: pointer;
width: 75px;
height: 75px;
padding: 2px;
background-color: #f4f4f4;
margin-right: 7px;
margin-bottom: 7px;
cursor: pointer;
}
.submitbox {
@ -301,7 +314,6 @@ div#categories h2 {
float: right;
}
.submitbox .submit {
text-align: left;
padding: 12px 10px 10px 10px;
@ -321,6 +333,7 @@ div#categories h2 {
-webkit-border-bottom-right-radius: 3px;
border-bottom-right-radius: 3px;
}
.submitbox .submit a:hover {
border-bottom-width: 1px;
border-bottom-style: solid;
@ -344,5 +357,4 @@ div#categories h2 {
-khtml-border-top-right-radius: 3px;
-webkit-border-top-right-radius: 3px;
border-top-right-radius: 3px;
}
}

View File

@ -22,35 +22,37 @@ function press_it() {
case 'regular':
$content = $_REQUEST['content'];
if ($_REQUEST['content2'])
$content .= '<p>' . $_REQUEST['content2'];
$content .= $_REQUEST['content2'];
break;
case 'quote':
$content = '<blockquote>' . $_REQUEST['content'];
if ($_REQUEST['content2']) {
$content .= '</blockquote>';
$content = $content . '<p>' . $_REQUEST['content2'].'</p>';
$content .= '</blockquote>
';
$content = $content . $_REQUEST['content2'];
}
break;
case 'photo':
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=""/>';
if ($_REQUEST['photo_link'])
$content .= '</a></p>';
$content .= '</a>
';
if ($_REQUEST['content'])
$content = $content . $_REQUEST['content'];
$content = $content . "\n".$_REQUEST['content'];
break;
case "video":
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>';
if ($_REQUEST['content2'])
$content .= '<p>' . $_REQUEST['content2'] . '</p>';
$content .= "\n" . $_REQUEST['content2'];
break;
}
@ -152,7 +154,8 @@ function press_this_js_init() { ?>
remove_linebreaks : true,
accessibility_focus : false,
tab_focus : ":next",
plugins : "safari,inlinepopups"
plugins : "safari,inlinepopups",
entity_encoding : "raw"
});
<?php } ?>
@ -161,7 +164,7 @@ function press_this_js_init() { ?>
tag_update_quickclicks();
// 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('#newtag').focus(function() {
@ -191,6 +194,7 @@ if ( empty($_GET['tab']) ) {
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
<title><?php _e('Press This') ?></title>
<script type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce.js"></script>
<?php
wp_enqueue_script('jquery-ui-tabs');
@ -216,6 +220,8 @@ if ( empty($_GET['tab']) ) {
});
</script>
</head>
<body>
<div id="wphead">
@ -243,9 +249,18 @@ if ( empty($_GET['tab']) ) {
img.style.backgroundColor = '#44f';
}
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;
}
jQuery('.remove').click(function() {
jQuery(this).remove;
});
jQuery(document).ready(function() {
var img, img_tag, aspect, w, h, skip, i, strtoappend = "";
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);"/>
</div>
<div class="photolist"></div>
<h2><?php _e('Link Photo to following URL') ?></h2><?php _e('(leave blank to leave the photo unlinked)') ?>
<div class="titlewrap">
<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>
<div class="editor-container">
<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>
<?php tag_div(); ?>
@ -343,7 +360,7 @@ exit;
<h2><?php _e('Post') ?></h2>
<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>
<?php tag_div(); ?>