diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 79f27fac7..b93a16179 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2751,8 +2751,12 @@ $(document).ready( function() { ?> /* 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; + if(ev.shiftKey) { + $(ev.currentTarget).parent().toggleClass('selected'); + } else { + attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3]; + window.location = '../out/out.ViewDocument.php?documentid=' + attr_id; + } }); /* 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().data('target-id'); - if(typeof attr_id == 'undefined') - attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3]; - window.location = '../out/out.ViewFolder.php?folderid=' + attr_id; + if(ev.shiftKey) { + $(ev.currentTarget).parent().toggleClass('selected'); + } else { + attr_id = $(ev.currentTarget).parent().data('target-id'); + if(typeof attr_id == 'undefined') + attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3]; + window.location = '../out/out.ViewFolder.php?folderid=' + attr_id; + } }); printClickDocumentJs(); diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index ed720ed63..497b11c0d 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -2798,8 +2798,12 @@ $(document).ready( function() { ?> /* 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; + if(ev.shiftKey) { + $(ev.currentTarget).parent().toggleClass('selected'); + } else { + attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3]; + window.location = '../out/out.ViewDocument.php?documentid=' + attr_id; + } }); /* 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().data('target-id'); - if(typeof attr_id == 'undefined') - attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3]; - window.location = '../out/out.ViewFolder.php?folderid=' + attr_id; + if(ev.shiftKey) { + $(ev.currentTarget).parent().toggleClass('selected'); + } else { + attr_id = $(ev.currentTarget).parent().data('target-id'); + if(typeof attr_id == 'undefined') + attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3]; + window.location = '../out/out.ViewFolder.php?folderid=' + attr_id; + } }); getID(); return "getName(), ENT_QUOTES)."\">"; } /* }}} */