sync fixes
This commit is contained in:
parent
721a886afb
commit
0509b5ff1c
6 changed files with 52 additions and 6 deletions
|
@ -19,6 +19,25 @@ $(document).on('click', '.element-container', function (e) {
|
|||
|
||||
} else {
|
||||
|
||||
if (isMobileDevice()) {
|
||||
var now = new Date().getTime();
|
||||
var lastTouch = $(this).data('lastTouch') || now + 1;
|
||||
var delta = now - lastTouch;
|
||||
|
||||
if (delta < 500 && delta > 0) {
|
||||
wsp.fileBrowser.openItem(this);
|
||||
|
||||
$(this).data('lastTouch', 0);
|
||||
|
||||
} else {
|
||||
wsp.fileBrowser.clearAllSelectedItems();
|
||||
|
||||
wsp.fileBrowser.selectItem(this);
|
||||
}
|
||||
|
||||
$(this).data('lastTouch', now);
|
||||
}
|
||||
|
||||
wsp.fileBrowser.clearAllSelectedItems();
|
||||
|
||||
wsp.fileBrowser.selectItem(this);
|
||||
|
@ -51,4 +70,8 @@ $(document).click(function (event) {
|
|||
wsp.fileBrowser.clearAllSelectedItems();
|
||||
wsp.fileBrowser.refreshDeletionBlock();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
function isMobileDevice() {
|
||||
return (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue