mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 21:21:27 +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 */
|
/* 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) {
|
$('body').on('click', '[id^=\"table-row-document\"] td:nth-child(2)', function(ev) {
|
||||||
attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3];
|
if(ev.shiftKey) {
|
||||||
window.location = '../out/out.ViewDocument.php?documentid=' + attr_id;
|
$(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
|
<?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 */
|
/* 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) {
|
$('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) {
|
||||||
attr_id = $(ev.currentTarget).parent().data('target-id');
|
if(ev.shiftKey) {
|
||||||
if(typeof attr_id == 'undefined')
|
$(ev.currentTarget).parent().toggleClass('selected');
|
||||||
attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3];
|
} else {
|
||||||
window.location = '../out/out.ViewFolder.php?folderid=' + attr_id;
|
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
|
<?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
|
* the table row when deleting the folder
|
||||||
* This was added for the internal_link extensіon
|
* This was added for the internal_link extensіon
|
||||||
*/
|
*/
|
||||||
attr_id = $(ev.currentTarget).parent().data('target-id');
|
if(ev.shiftKey) {
|
||||||
if(typeof attr_id == 'undefined')
|
$(ev.currentTarget).parent().toggleClass('selected');
|
||||||
attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3];
|
} else {
|
||||||
folderSelectedmaintree(attr_id, '');
|
attr_id = $(ev.currentTarget).parent().data('target-id');
|
||||||
$([document.documentElement, document.body]).animate({
|
if(typeof attr_id == 'undefined')
|
||||||
scrollTop: 200
|
attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3];
|
||||||
}, 200);
|
folderSelectedmaintree(attr_id, '');
|
||||||
|
$([document.documentElement, document.body]).animate({
|
||||||
|
scrollTop: 200
|
||||||
|
}, 200);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
<?php
|
<?php
|
||||||
$this->printClickDocumentJs();
|
$this->printClickDocumentJs();
|
||||||
|
|
|
@ -2798,8 +2798,12 @@ $(document).ready( function() {
|
||||||
?>
|
?>
|
||||||
/* catch click on a document row in the list folders and documents */
|
/* 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) {
|
$('body').on('click', '[id^=\"table-row-document\"] td:nth-child(2)', function(ev) {
|
||||||
attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3];
|
if(ev.shiftKey) {
|
||||||
window.location = '../out/out.ViewDocument.php?documentid=' + attr_id;
|
$(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
|
<?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 */
|
/* 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) {
|
$('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) {
|
||||||
attr_id = $(ev.currentTarget).parent().data('target-id');
|
if(ev.shiftKey) {
|
||||||
if(typeof attr_id == 'undefined')
|
$(ev.currentTarget).parent().toggleClass('selected');
|
||||||
attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3];
|
} else {
|
||||||
window.location = '../out/out.ViewFolder.php?folderid=' + attr_id;
|
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
|
<?php
|
||||||
}
|
}
|
||||||
|
@ -2858,10 +2866,12 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
||||||
* {@link SeedDMS_Bootstrap_Style::folderListRowStart()}
|
* {@link SeedDMS_Bootstrap_Style::folderListRowStart()}
|
||||||
*/
|
*/
|
||||||
function documentListRowStart($document, $class='') { /* {{{ */
|
function documentListRowStart($document, $class='') { /* {{{ */
|
||||||
if($class == 'error')
|
if($class) {
|
||||||
$class = 'table-danger';
|
if($class == 'error')
|
||||||
else
|
$class = 'table-danger';
|
||||||
$class = 'table-'.$class;
|
else
|
||||||
|
$class = 'table-'.$class;
|
||||||
|
}
|
||||||
$docID = $document->getID();
|
$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)."\">";
|
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