Skip to content

Commit

Permalink
Merge pull request #15 from Erwyn/patch-1
Browse files Browse the repository at this point in the history
Pass redirection as callback
  • Loading branch information
charlesthomas committed Jun 24, 2014
2 parents 0a01ab1 + 7d07dc7 commit 8fa880b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions magpie/template/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<input type=text name=new_notebook_name id=new_notebook_name>
<input
onclick="var new_notebook='/'+document.getElementById('new_notebook_name').value
$.post(new_notebook).done(window.location=new_notebook)"
$.post(new_notebook).done(function(){window.location=new_notebook})"
type=button class='btn btn-primary' value=Create>
<input type=button class='btn btn-danger' value=Cancel
onclick="this.parentElement.className='hidden'">
Expand Down Expand Up @@ -70,7 +70,7 @@
<input type=text name=new_note_name id=new_note_name><br><br>
<input type=button class='btn btn-primary' value=Create
onclick="var new_note='/{{ url_escape(notebook_name) }}/'+document.getElementById('new_note_name').value
$.post(new_note,data={'save': true, 'note': ''}).done(window.location=new_note)">
$.post(new_note,data={'save': true, 'note': ''}).done(function(){window.location=new_note})">
<input type=button class='btn btn-danger' value=Cancel id=cancel
onclick="this.parentElement.className='hidden'"></a></li>
<!-- TODO this causes the new note button to not work again until a page refresh -->
Expand Down

0 comments on commit 8fa880b

Please sign in to comment.