Preview for both drafts and published posts/pages

git-svn-id: http://svn.automattic.com/wordpress/trunk@9451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz
2008-10-31 22:47:07 +00:00
parent 0018370f9d
commit 9fba444f3b
11 changed files with 154 additions and 9 deletions

View File

@@ -260,6 +260,14 @@ jQuery(document).ready( function($) {
return s;
}
});
// preview
$('#post-preview').click(function(e){
$('input#wp-preview').val('dopreview');
$('form#post').attr('target', 'wp-preview').submit().attr('target', '');
$('input#wp-preview').val('');
});
});
(function($){
@@ -314,7 +322,7 @@ jQuery(document).ready( function($) {
return false;
}
}
};
})(jQuery);