Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update links after editing

  • Loading branch information...
commit 541909389042abd739cbdb1d7508b7e6bc083036 1 parent f1c1023
@namelessjon authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 templates/edit_js.html
View
6 templates/edit_js.html
@@ -9,6 +9,11 @@
format: "textile",
author: User._current_user.name
},
+ onLoad : function(doc) {
+ if (doc._id) {
+ $('form#new-post h2').html('Editing <a href="../page/'+doc._id+'">'+doc._id+'</a>');
+ }
+ },
beforeSave : function(doc) {
if (!doc.created_at) {
doc.created_at = new Date();
@@ -17,6 +22,7 @@
doc._id = doc.name;
},
success: function(resp) {
+ $('form#new-post h2').html('Editing <a href="../page/'+resp.id+'">'+resp.id+'</a>');
$("#saved").text("Saved _rev: "+resp.rev).fadeIn(500).fadeOut(3000);
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.