diff options
author | zotlabs <mike@macgirvin.com> | 2016-11-28 11:19:20 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2016-11-28 11:19:20 -0800 |
commit | 90f3cc7328511083ec226305a7bd7faeda12cb39 (patch) | |
tree | d99b779b87cd483ee114b73118dfe6269d95c668 /view/tpl/wiki.tpl | |
parent | 7de4f1d96f5f1fe4dccd56c1456df1d82aa5c30b (diff) | |
parent | 683a09781ad9c9be00ce67e35f560e6fca051f3b (diff) | |
download | volse-hubzilla-90f3cc7328511083ec226305a7bd7faeda12cb39.tar.gz volse-hubzilla-90f3cc7328511083ec226305a7bd7faeda12cb39.tar.bz2 volse-hubzilla-90f3cc7328511083ec226305a7bd7faeda12cb39.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'view/tpl/wiki.tpl')
-rw-r--r-- | view/tpl/wiki.tpl | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl index 6d9f78800..bdce4f4be 100644 --- a/view/tpl/wiki.tpl +++ b/view/tpl/wiki.tpl @@ -11,9 +11,6 @@ <a id="rename-page" class="nav-link" href="#"><i class="fa fa-edit"></i> Rename Page</a> </li> <li class="nav-item"> - <a id="delete-page" class="nav-link" href="#"><i class="fa fa-trash-o"></i> Delete Page</a> - </li> - <li class="nav-item"> <a id="embed-image" class="nav-link" href="#"><i class="fa fa-picture-o"></i> Embed Image</a> </li> </ul> @@ -239,33 +236,6 @@ ev.preventDefault(); }); - $('#delete-page').click(function (ev) { - if (window.wiki_resource_id === '' || window.wiki_page_name === '' || window.wiki_page_name === 'Home') { - window.console.log('You must have a wiki page open in order to delete pages.'); - ev.preventDefault(); - return false; - } - if(!confirm('Are you sure you want to delete the page: ' + window.wiki_page_name)) { - ev.preventDefault(); - return; - } - $.post("wiki/{{$channel}}/delete/page", {name: window.wiki_page_name, resource_id: window.wiki_resource_id}, - function (data) { - if (data.success) { - window.console.log('Page deleted successfully.'); - var url = window.location.href; - if (url.substr(-1) == '/') url = url.substr(0, url.length - 2); - url = url.split('/'); - url.pop(); - window.location = url.join('/'); - } else { - alert('Error deleting page.'); // TODO: Replace alerts with auto-timeout popups - window.console.log('Error deleting page.'); - } - }, 'json'); - ev.preventDefault(); - }); - function wiki_revert_page(commitHash) { if (window.wiki_resource_id === '' || window.wiki_page_name === '') { window.console.log('You must have a wiki page open in order to revert pages.'); @@ -409,14 +379,6 @@ 'json'); }; - function wiki_show_new_page_form() { - $('div[id^=\'edit-wiki-form-wrapper\']').hide(); - $('#edit-wiki-form-wrapper').hide(); - $('#new-wiki-form-wrapper').hide(); - $('#new-page-form-wrapper').toggle(); - return false; - } - function wiki_show_edit_wiki_form(wiki_title, wiki_resource_id) { window.wiki_resource_id = wiki_resource_id; window.wiki_title = wiki_title; |