give folder tree a unique id

This commit is contained in:
Uwe Steinmann 2020-08-28 11:54:12 +02:00
parent d7fe2087d1
commit f3c0c1847c

View File

@ -118,7 +118,7 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style {
parent::jsTranslations(array('cancel', 'splash_move_document', 'confirm_move_document', 'move_document', 'confirm_transfer_link_document', 'transfer_content', 'link_document', 'splash_move_folder', 'confirm_move_folder', 'move_folder'));
?>
seeddms_folder = <?= $folder->getID() ?>;
function folderSelected(id, name) {
function folderSelectedmaintree(id, name) {
<?php if(!$onepage) { ?>
window.location = '../out/out.ViewFolder.php?folderid=' + id;
<?php } else { ?>
@ -177,7 +177,7 @@ console.log(JSON.stringify(event.state));
/* catch click on 'goto parent button' */
$('body').on('click', '#goto-parent', function(ev) {
attr_id = $(ev.currentTarget).data('parentid');
folderSelected(attr_id, '');
folderSelectedmaintree(attr_id, '');
$([document.documentElement, document.body]).animate({
scrollTop: 200
}, 200);
@ -192,7 +192,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
attr_id = $(ev.currentTarget).parent().data('target-id');
if(typeof attr_id == 'undefined')
attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3];
folderSelected(attr_id, '');
folderSelectedmaintree(attr_id, '');
$([document.documentElement, document.body]).animate({
scrollTop: 200
}, 200);
@ -209,7 +209,7 @@ $('body').on('click', '.order-btn', function(ev) {
<?php } ?>
<?php
if($showtree == 1)
$this->printNewTreeNavigationJs($folder->getID(), M_READ, 0, '', ($expandFolderTree == 1) ? -1 : 3, $orderby);
$this->printNewTreeNavigationJs($folder->getID(), M_READ, 0, 'maintree', ($expandFolderTree == 1) ? -1 : 3, $orderby);
if ($enableDropUpload && $folder->getAccessMode($user) >= M_READWRITE) {
echo "SeedDMSUpload.setUrl('../op/op.Ajax.php');";
@ -299,7 +299,7 @@ $('body').on('click', '.order-btn', function(ev) {
?>
<tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td>
<td><?php echo htmlspecialchars(implode(', ', $attribute->getValueAsArray())); ?></td>
<td><?php echo $this->getAttributeValue($attribute); ?></td>
</tr>
<?php
}
@ -581,7 +581,7 @@ $('body').on('click', '.order-btn', function(ev) {
* access expandFolderTree with $this->params because it can
* be changed by preContent hook.
*/
$this->printNewTreeNavigationHtml($folderid, M_READ, 0, '', ($this->params['expandFolderTree'] == 1) ? -1 : 3, $orderby);
$this->printNewTreeNavigationHtml($folderid, M_READ, 0, 'maintree', ($this->params['expandFolderTree'] == 1) ? -1 : 3, $orderby);
$this->contentContainerEnd();
} else {
$this->contentHeading("<a href=\"../out/out.ViewFolder.php?folderid=". $folderid."&showtree=1\"><i class=\"fa fa-plus-circle\"></i></a>", true);