webdav portal edit fix

This commit is contained in:
vfedosevich 2015-02-03 05:07:16 -08:00
parent 0509b5ff1c
commit 5795ffb0bc
4 changed files with 19 additions and 31 deletions

View file

@ -19,25 +19,6 @@ $(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);
@ -46,6 +27,19 @@ $(document).on('click', '.element-container', function (e) {
wsp.fileBrowser.refreshDeletionBlock();
});
$(document).on('touchstart', '.element-container', function(e) {
var now = new Date().getTime();
var lastTouch = $(this).data('lastTouch') || now + 1;
var delta = now - lastTouch;
if (delta < 300 && delta > 0) {
wsp.fileBrowser.openItem(this);
$(this).data('lastTouch', 0);
}
$(this).data('lastTouch', now);
});
//Double click file open
$(document).on('dblclick', '.element-container', function (e) {
wsp.fileBrowser.openItem(this);