mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +00:00
add js code for catching clicks on folder rows in one page mode
This commit is contained in:
parent
b11aed0d18
commit
975c6cb147
|
@ -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;
|
||||
});
|
||||
<?php
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Start the row for a folder in list of documents and folders
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue
Block a user