From b705fdab44f599b8838451f08642bb9bbd058b42 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 28 Oct 2019 09:26:35 +0100 Subject: [PATCH] fix up to parent button on ViewFolder page --- views/bootstrap/class.ViewFolder.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.ViewFolder.php b/views/bootstrap/class.ViewFolder.php index b45acfff2..ab433cfeb 100644 --- a/views/bootstrap/class.ViewFolder.php +++ b/views/bootstrap/class.ViewFolder.php @@ -163,6 +163,15 @@ console.log("location: " + document.location + ", state: " + JSON.stringify(even console.log(JSON.stringify(event.state)); window.location = document.location; }; +/* catch click on 'goto parent button' */ +$('body').on('click', '#goto-parent', function(ev) { + attr_id = $(ev.currentTarget).data('parentid'); + folderSelected(attr_id, ''); + $([document.documentElement, document.body]).animate({ + scrollTop: 200 + }, 200); +}); +/* catch click on a folder 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]; folderSelected(attr_id, ''); @@ -170,6 +179,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) scrollTop: 200 }, 200); }); +/* 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; @@ -326,7 +336,7 @@ $('body').on('click', '.order-btn', function(ev) { else { print ""; print "\n\n"; - print "\n"; + print "\n"; print "
".($parent ? '' : '')."".($parent ? '' : '')."".getMLText("name"); print " ".($orderby=="n"||$orderby=="na"?' ':($orderby=="nd"?' ':' ')).""; print " ".($orderby=="s"||$orderby=="sa"?' ':($orderby=="sd"?' ':' '))."";