add method printClickDocumentJs()

adds js for catching the event when clicking on a document row and
onepage mode is on
This commit is contained in:
Uwe Steinmann 2019-11-25 09:50:52 +01:00
parent bf6490f904
commit 24f030f1c7

View File

@ -2238,6 +2238,19 @@ $(document).ready( function() {
";
} /* }}} */
function printClickDocumentJs() { /* {{{ */
$onepage = $this->params['onepage'];
if($onepage) {
?>
/* catch click on a document row in the list folders and documents */
$('body').on('click', '[id^=\"table-row-document\"] td:nth-child(2)', function(ev) {
attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3];
window.location = '../out/out.ViewDocument.php?documentid=' + attr_id;
});
<?php
}
} /* }}} */
/**
* Start the row for a folder in list of documents and folders
*