Add explanatory notes to deletion logics.

This commit is contained in:
Bart Kamphorst
2018-10-19 21:32:22 +02:00
parent 1a8b6d6823
commit 8d611ea25a
@@ -44,6 +44,7 @@ function abspath(path, name){
// ua
$(document).ready(function() {
// for deleting the current page
$('#delete-link').click( function(e) {
var ok = confirm($(this).data('confirm'));
if ( ok ) {
@@ -57,7 +58,7 @@ $(document).ready(function() {
// Don't navigate on cancel.
e.preventDefault();
} );
// for deleting files and pages from the overview
$('.delete-file').click( function(e) {
var ok = confirm($(this).data('confirm'));
if ( ok ) {
@@ -65,7 +66,7 @@ $(document).ready(function() {
$.post('<%=delete_path %>' + $(this).data('file-path'),
{},
function (result) {
// page successfully deleted, stay on page but remove element from DOM
// file successfully deleted, stay on overview but remove element from DOM
element.closest("li").remove();
});
}