" . htmlspecialchars($document->getName()) . "";
if($comment) {
@@ -1292,17 +1292,56 @@ $(function() {
echo "\n";
} /* }}} */
+ /**
+ * Print button with link for deleting a document
+ *
+ * This button is used in document listings (e.g. on the ViewFolder page)
+ * for deleting a document. In seeddms version < 4.3.9 this was just a
+ * link to the out/out.RemoveDocument.php page which asks for confirmation
+ * an than calls op/op.RemoveDocument.php. Starting with version 4.3.9
+ * the button just opens a small popup asking for confirmation and than
+ * calls the ajax command 'deletedocument'. The ajax call is called
+ * in the click function of 'button.removedocument'. That button needs
+ * to have two attributes: 'rel' for the id of the document, and 'msg'
+ * for the message shown by notify if the document could be deleted.
+ *
+ * @param object $document document to be deleted
+ * @param string $msg message shown in case of successful deletion
+ */
function printDeleteDocumentButton($document, $msg){ /* {{{ */
$docid = $document->getID();
?>
-
+
addFooterJS("
-$('#delete-btn-".$docid."').popover({
+$('#delete-document-btn-".$docid."').popover({
title: '".getMLText("rm_document")."',
placement: 'left',
html: true,
- content: '