diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-06-20 13:05:18 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-06-20 13:05:18 -0400 |
commit | 20b4fc919871433df6111cbb8b3508fd1693123b (patch) | |
tree | 6be55448e0ecb6529db09ddc630ea0c9c01fd29f | |
parent | 80d3a831f377820ef7b816129ad333a756a4a704 (diff) | |
download | volse-hubzilla-20b4fc919871433df6111cbb8b3508fd1693123b.tar.gz volse-hubzilla-20b4fc919871433df6111cbb8b3508fd1693123b.tar.bz2 volse-hubzilla-20b4fc919871433df6111cbb8b3508fd1693123b.zip |
Do not change active page commit until user reverts the page
-rw-r--r-- | view/tpl/wiki.tpl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl index 990e6c883..aa0b88545 100644 --- a/view/tpl/wiki.tpl +++ b/view/tpl/wiki.tpl @@ -256,6 +256,7 @@ function wiki_delete_wiki(wikiHtmlName, resource_id) { window.console.log('Page saved successfully.'); window.wiki_page_content = currentContent; $('#id_commitMsg').val(''); // Clear the commit message box + $('#wiki-get-history').click(); } else { alert('Error saving page.'); // TODO: Replace alerts with auto-timeout popups window.console.log('Error saving page.'); @@ -301,6 +302,7 @@ function wiki_delete_wiki(wikiHtmlName, resource_id) { $('#revert-'+commitHash).removeClass('btn-danger'); $('#revert-'+commitHash).addClass('btn-success'); $('#revert-'+commitHash).html('Page reverted<br>but not saved'); + window.wiki_page_commit = commitHash; // put contents in editor editor.getSession().setValue(data.content); } else { @@ -323,7 +325,6 @@ function wiki_delete_wiki(wikiHtmlName, resource_id) { }, function (data) { if (data.success) { - window.wiki_page_commit = compareCommit; var modalBody = $('#generic-modal-body-{{$wikiModalID}}'); modalBody.html('<div class="descriptive-text">'+data.diff+'</div>'); $('.modal-dialog').width('80%'); |