Kill the slow-loading iframe in favor of a popup link

git-svn-id: http://svn.automattic.com/wordpress/trunk@5159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2007-03-31 22:02:19 +00:00
parent eaac63e0d0
commit 01961fba45
4 changed files with 16 additions and 14 deletions

View File

@ -144,7 +144,14 @@ endforeach;
</fieldset>
<fieldset id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>">
<legend><?php _e('Post') ?></legend>
<legend><?php _e('Post') ?>
<?php if ( 'publish' == $post->post_status ) { ?>
<a href="<?php echo clean_url(get_permalink($post->ID)); ?>" style="position: absolute; right: 2em; margin-right: 19em; text-decoration: underline;" target="_blank"><?php _e('View &raquo;'); ?></a>
<?php } elseif ( 'edit' == $action ) { ?>
<a href="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" style="position: absolute; right: 2em; margin-right: 19em; text-decoration: underline;" target="_blank"><?php _e('Preview &raquo;'); ?></a>
<?php } ?>
</legend>
<?php the_editor($post->post_content); ?>
</fieldset>

View File

@ -131,7 +131,14 @@ endforeach;
<fieldset id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>">
<legend><?php _e('Page Content') ?></legend>
<legend><?php _e('Page Content') ?>
<?php if ( 'publish' == $post->post_status ) { ?>
<a href="<?php echo clean_url(get_permalink($post->ID)); ?>" style="position: absolute; right: 2em; margin-right: 19em; text-decoration: underline;" target="_blank"><?php _e('View &raquo;'); ?></a>
<?php } elseif ( 'edit' == $action ) { ?>
<a href="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" style="position: absolute; right: 2em; margin-right: 19em; text-decoration: underline;" target="_blank"><?php _e('Preview &raquo;'); ?></a>
<?php } ?>
</legend>
<?php the_editor($post->post_content); ?>
</fieldset>

View File

@ -61,12 +61,6 @@ case 'edit':
die ( __('You are not allowed to edit this page.') );
include('edit-page-form.php');
?>
<div id='preview' class='wrap'>
<h2 id="preview-post"><?php _e('Page Preview (updated when page is saved)'); ?></h2>
<iframe src="<?php echo clean_url(apply_filters('preview_page_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" width="100%" height="600" ></iframe>
</div>
<?php
break;
case 'editattachment':

View File

@ -66,12 +66,6 @@ case 'edit':
include('edit-form-advanced.php');
?>
<div id='preview' class='wrap'>
<h2 id="preview-post"><?php _e('Post Preview (updated when post is saved)'); ?></h2>
<iframe src="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" width="100%" height="600" ></iframe>
</div>
<?php
break;
case 'editattachment':