Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass redirection as callback #15

Merged
merged 1 commit into from
Jun 24, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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