mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +00:00
check if shift key was preset when clicked in a folder/document row
This commit is contained in:
parent
639c280920
commit
1ac8f31105
|
@ -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;
|
||||
}
|
||||
});
|
||||
<?php
|
||||
}
|
||||
|
@ -2772,10 +2776,14 @@ $('body').on('click', '[id^=\"table-row-document\"] td:nth-child(2)', function(e
|
|||
?>
|
||||
/* 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;
|
||||
}
|
||||
});
|
||||
<?php
|
||||
}
|
||||
|
|
|
@ -194,13 +194,17 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
* the table row when deleting the folder
|
||||
* This was added for the internal_link extensіon
|
||||
*/
|
||||
attr_id = $(ev.currentTarget).parent().data('target-id');
|
||||
if(typeof attr_id == 'undefined')
|
||||
attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3];
|
||||
folderSelectedmaintree(attr_id, '');
|
||||
$([document.documentElement, document.body]).animate({
|
||||
scrollTop: 200
|
||||
}, 200);
|
||||
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];
|
||||
folderSelectedmaintree(attr_id, '');
|
||||
$([document.documentElement, document.body]).animate({
|
||||
scrollTop: 200
|
||||
}, 200);
|
||||
}
|
||||
});
|
||||
<?php
|
||||
$this->printClickDocumentJs();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
});
|
||||
<?php
|
||||
}
|
||||
|
@ -2819,10 +2823,14 @@ $('body').on('click', '[id^=\"table-row-document\"] td:nth-child(2)', function(e
|
|||
?>
|
||||
/* 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;
|
||||
}
|
||||
});
|
||||
<?php
|
||||
}
|
||||
|
@ -2858,10 +2866,12 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
* {@link SeedDMS_Bootstrap_Style::folderListRowStart()}
|
||||
*/
|
||||
function documentListRowStart($document, $class='') { /* {{{ */
|
||||
if($class == 'error')
|
||||
$class = 'table-danger';
|
||||
else
|
||||
$class = 'table-'.$class;
|
||||
if($class) {
|
||||
if($class == 'error')
|
||||
$class = 'table-danger';
|
||||
else
|
||||
$class = 'table-'.$class;
|
||||
}
|
||||
$docID = $document->getID();
|
||||
return "<tr id=\"table-row-document-".$docID."\" data-target-id=\"".$docID."\" class=\"table-row-document droptarget ".($class ? ' '.$class : '')."\" data-droptarget=\"document_".$docID."\" rel=\"document_".$docID."\" formtoken=\"".createFormKey('')."\" draggable=\"true\" data-name=\"".htmlspecialchars($document->getName(), ENT_QUOTES)."\">";
|
||||
} /* }}} */
|
||||
|
|
Loading…
Reference in New Issue
Block a user