diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 4e0a8cb3b..f1dcb76b4 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2262,6 +2262,27 @@ $('body').on('click', '[id^=\"table-row-document\"] td:nth-child(2)', function(e } } /* }}} */ + /** + * Print js code which catches clicks on folder rows + * + * This method will catch a click on a folder row and changes the + * window.location to the out.ViewFolder.php page + * This code is not needed on the out.ViewFolder.php page itself, because + * a click will just reload the list of folders and documents. + */ + function printClickFolderJs() { /* {{{ */ + $onepage = $this->params['onepage']; + if($onepage) { +?> +/* catch click on a document row in the list folders and documents */ +$('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) { + attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3]; + window.location = '../out/out.ViewFolder.php?folderid=' + attr_id; +}); +