Press This updates from noel. see #7949

git-svn-id: http://svn.automattic.com/wordpress/trunk@9326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-10-24 17:20:06 +00:00
parent 7ab57a07e4
commit 15a965cf80
2 changed files with 22 additions and 25 deletions

View File

@ -10,7 +10,7 @@ img { border: 0; }
/* Header */
#wphead{border-top:none;padding-top:8px; background: #444 !important;}
.button{font-family:"Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;padding:3px 5px;font-size:12px;line-height:1.5em;border-width:1px;border-style:solid;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;cursor:pointer;margin-left:5px;text-decoration:none;}
#poststuff #edButtonPreview, #poststuff #edButtonHTML, .button{font-family:"Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;padding:3px 5px;font-size:12px;line-height:1.5em;border-width:1px;border-style:solid;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;cursor:pointer;margin-left:5px;text-decoration:none;}
.howto {
font-size: 11px;
@ -47,14 +47,8 @@ position:absolute;
width:0;
}
#poststuff #edButtonPreview, #poststuff #edButtonHTML {
display: block;
height: 20px;
padding: 5px 5px 1px;
margin: 5px 8px 0 0;
float: right;
cursor: pointer;
}
#poststuff #edButtonPreview.active, #poststuff #edButtonHTML.active { display: none; }
.posting {
margin-right: 228px;

View File

@ -116,9 +116,12 @@ switch ($_REQUEST['ajax']) {
<script type="text/javascript" charset="utf-8">
jQuery('.select').click(function() {
append_editor(jQuery('#embed-code').val());
jQuery('#extra_fields').hide();
jQuery('#extra_fields').html('');
});
jQuery('.close').click(function() {
jQuery('#extra_fields').hide();
jQuery('#extra_fields').html('');
});
</script>
<h2><label for="embed-code"><?php _e('Embed Code') ?></label></h2>
@ -273,6 +276,7 @@ switch ($_REQUEST['ajax']) {
src = jQuery('#this_photo').val();
pick(src, desc);
jQuery('#extra_fields').hide();
jQuery('#extra_fields').html('');
return false;
}
@ -280,6 +284,7 @@ switch ($_REQUEST['ajax']) {
jQuery('#extra_fields').html('<h2>Photo <small id="photo_directions">(<?php _e("click images to select") ?>)</small></h2><ul id="actions"><li><a href="#" id="photo_add_url" class="thickbox button"><?php _e("Add from URL") ?> +</a></li></ul><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a></p>');
jQuery('.close').click(function() {
jQuery('#extra_fields').hide();
jQuery('#extra_fields').html('');
});
jQuery('#img_container').html(strtoappend);
jQuery('#photo_add_url').attr('href', '?ajax=photo_thickbox_url&height=200&width=500');
@ -351,6 +356,7 @@ die;
switch(tab_name) {
case 'video' :
jQuery('#extra_fields').html('');
jQuery('#extra_fields').show();
jQuery('#extra_fields').load('<?php echo clean_url($_SERVER['PHP_SELF']); ?>', { ajax: 'video', s: '<?php echo attribute_escape($selection); ?>'}, function() {
<?php
@ -376,7 +382,7 @@ die;
return false;
break;
case 'photo' :
if(jQuery('#extra_fields').css('display') == 'none') {
jQuery('#extra_fields').html('');
jQuery('#extra_fields').show();
jQuery('#extra_fields').before('<p id="waiting"><img src="images/loading.gif" alt="" /><?php echo js_escape( __( 'Loading...' ) ); ?></p>');
jQuery.ajax({
@ -389,9 +395,7 @@ die;
jQuery('#waiting').remove();
}
});
} else {
jQuery('#extra_fields').hide();
}
return false;
break;
}
@ -499,21 +503,20 @@ die;
<ul id="actions">
<li id="photo_button"><a href="#" class="button"><?php _e( 'Add Photo' ); ?></a></li>
<li id="video_button"><a href="#" class="button"><?php _e( 'Add Video' ); ?></a></li>
<li id="switcher"><?php if ( user_can_richedit() ) {
$wp_default_editor = wp_default_editor(); ?>
<div class="zerosize"><input accesskey="e" type="button" onclick="switchEditors.go('<?php echo $id; ?>')" /></div>
<?php if ( 'html' == $wp_default_editor ) {
add_filter('the_editor_content', 'wp_htmledit_pre'); ?>
<a id="edButtonHTML" class="active" onclick="switchEditors.go('<?php echo $id; ?>', 'html');"><?php _e('HTML'); ?></a>
<a id="edButtonPreview" onclick="switchEditors.go('<?php echo $id; ?>', 'tinymce');"><?php _e('Visual'); ?></a>
<?php } else {
add_filter('the_editor_content', 'wp_richedit_pre'); ?>
<li id="switcher">
<?php wp_print_scripts( 'quicktags' ); ?>
<?php add_filter('the_editor_content', 'wp_richedit_pre'); ?>
<a id="edButtonHTML" onclick="switchEditors.go('<?php echo $id; ?>', 'html');"><?php _e('HTML'); ?></a>
<a id="edButtonPreview" class="active" onclick="switchEditors.go('<?php echo $id; ?>', 'tinymce');"><?php _e('Visual'); ?></a>
<?php }
} ?></li>
<div class="zerosize"><input accesskey="e" type="button" onclick="switchEditors.go('<?php echo $id; ?>')" /></div>
</li>
</ul>
<div id="quicktags">
</div>
<h2 id="content_type"><label for="content"><?php _e('Post') ?></label></h2>
<div class="editor-container">