Skip to content

TagSpaces is an offline, open source, document manager with tagging support

fixing broken drag and drop of files and tags

Iliand3918948e3a1
diff --git a/data/ext/perspectiveList/perspectiveUI.js b/data/ext/perspectiveList/perspectiveUI.js
index 82810787d..1fb29bf2f 100644
--- a/data/ext/perspectiveList/perspectiveUI.js
+++ b/data/ext/perspectiveList/perspectiveUI.js
@@ -321,18 +321,30 @@ console.log("Loading UI for perspectiveList");
//$(ui.helper).remove();
}
})
- .hammer().on("doubletap", function() {
- console.log("Doubletap & Opening file...");
- var titleBut = $(this).find(".fileTitleButton");
- TSCORE.FileOpener.openFile($(titleBut).attr("filepath"));
- self.selectFile(titleBut, $(titleBut).attr("filepath"));
- })
.click( function() {
console.log("Selecting file...");
var titleBut = $(this).find(".fileTitleButton");
self.selectFile(titleBut, $(titleBut).attr("filepath"));
} );
+ if(isCordova) {
+ this.fileTable.$('tr')
+ .hammer().on("doubletap", function () {
+ console.log("Doubletap & Opening file...");
+ var titleBut = $(this).find(".fileTitleButton");
+ TSCORE.FileOpener.openFile($(titleBut).attr("filepath"));
+ self.selectFile(titleBut, $(titleBut).attr("filepath"));
+ })
+ } else {
+ this.fileTable.$('tr')
+ .on("dblclick", function () {
+ console.log("Doubletap & Opening file...");
+ var titleBut = $(this).find(".fileTitleButton");
+ TSCORE.FileOpener.openFile($(titleBut).attr("filepath"));
+ self.selectFile(titleBut, $(titleBut).attr("filepath"));
+ })
+ }
+
this.fileTable.$('.fileTitleButton')
.draggable({
"cancel": false,