Skip to content

Commit

Permalink
Fix edit preview function, which probably broke with the upgrade of F…
Browse files Browse the repository at this point in the history
…ormtastic.
  • Loading branch information
jasoncheow committed Jan 9, 2009
1 parent e1308f7 commit 97523e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/javascripts/admin/edit-preview.js
@@ -1,7 +1,7 @@
$(document).ready(function() {
var form = $('form.new_post, form.edit_post, form.new_page, form.edit_page');
var form = $('form.formtastic');

if (form.length > 0) {
if (form.length > 0 && form.attr('id').match(/^(new_post|edit_post|new_page|edit_page)/)) {
var dest = window.location.href;
if (!dest.match(/\/new$/)) {
dest = dest.replace(/\/\d+$/, '');
Expand Down

0 comments on commit 97523e6

Please sign in to comment.