TagSpaces is an offline, open source, document manager with tagging support
Drag and Drop issues fixed
uggrock4b356447dfa2
diff --git a/data/ext/perspectiveDefault/perspectiveUI.js b/data/ext/perspectiveDefault/perspectiveUI.jsindex bed2d65d0..66c453abe 100644--- a/data/ext/perspectiveDefault/perspectiveUI.js+++ b/data/ext/perspectiveDefault/perspectiveUI.js@@ -355,24 +355,31 @@ console.debug("Loading UI for perspectiveDefault");TSCORE.TagUtils.addTag(TSCORE.selectedFiles, [tagName]);self.handleElementActivation();++ $(ui.helper).remove();}})+ // Disable due incompatibility with the select checkbox+ //.click( function() {+ // var titleBut = $(this).find(".fileTitleButton");+ // self.selectFile(titleBut, $(titleBut).attr("filepath"));+ //} ).dblclick( function() {console.debug("Opening file...");var rowData = self.fileTable.fnGetData( this );-TSCORE.FileOpener.openFile(rowData[TC_FILEPATH]);++ var titleBut = $(this).find(".fileTitleButton");+ self.selectFile(titleBut, $(titleBut).attr("filepath"));} );this.fileTable.$('.fileTitleButton').draggable({- cancel:false,- appendTo: "body",- helper: "clone",- revert: true,- start: function() {- self.selectFile(this, $(this).attr("filepath"));- }+ "cancel": false,+ "appendTo": "body",+ "helper": "clone",+ "revert": true,+ "start": function() { self.selectFile(this, $(this).attr("filepath")); }}).click( function() {self.selectFile(this, $(this).attr("filepath"));@@ -416,13 +423,11 @@ console.debug("Loading UI for perspectiveDefault");this.fileTable.$('.tagButton').draggable({- cancel:false,- appendTo: "body",- helper: "clone",- revert: true,- start: function() {- self.selectFile(this, $(this).attr("filepath"));- }+ "cancel": false,+ "appendTo": "body",+ "helper": "clone",+ "revert": true,+ "start": function() { self.selectFile(this, $(this).attr("filepath")); }}).click( function() {self.selectFile(this, $(this).attr("filepath"));diff --git a/data/js/directories.ui.js b/data/js/directories.ui.jsindex 014936908..2ecba2983 100644--- a/data/js/directories.ui.js+++ b/data/js/directories.ui.js@@ -90,13 +90,14 @@ define(function(require, exports, module) {).droppable({accept: '.fileTitleButton',- hoverClass: "btn-warning",+ hoverClass: "btn-info",drop: function( event, ui ) {var filePath = ui.draggable.attr("filepath");var fileName = TSCORE.TagUtils.extractFileName(filePath);var targetDir = $(this).attr("key");console.log("Moving file: "+filePath+" to "+targetDir);TSCORE.IO.renameFile(filePath, targetDir+TSCORE.TagUtils.DIR_SEPARATOR+fileName);+ $(ui.helper).remove();}})@@ -146,13 +147,14 @@ define(function(require, exports, module) {}).droppable({accept: ".fileTitleButton",- hoverClass: "btn-warning",+ hoverClass: "btn-info",drop: function( event, ui ) {var filePath = ui.draggable.attr("filepath");var fileName = TSCORE.TagUtils.extractFileName(filePath);var targetDir = $(this).attr("key");console.log("Moving file: "+filePath+" to "+targetDir);TSCORE.IO.renameFile(filePath, targetDir+TSCORE.TagUtils.DIR_SEPARATOR+fileName);+ $(ui.helper).remove();}}).html("<i class='icon-folder-close-alt'></i> "+directoryHistory[i]["children"][j].title)@@ -361,12 +363,12 @@ define(function(require, exports, module) {nameCurrentFavorite = $(this).attr( "name" );openFavorite($(this).attr( "title" ), $(this).attr( "name" ));})- .append("<i class='icon-briefcase'></i>")+ .append("<i class='icon-bookmark'></i>").append(" "+favoritesList[i].name)));};$( "#favoritesList" ).append('<li class="divider"></li>');- $( "#favoritesList" ).append('<li id="createNewLocation"><a href="#"><i class="icon-magnet"></i> New Location</a></li>');+ $( "#favoritesList" ).append('<li id="createNewLocation"><a href="#"><i class="icon-bookmark-empty"></i> New Location</a></li>');$( "#favoritesList" ).append('<li id="deleteFavorite"><a href="#"><i class="icon-trash"></i> Remove Location</a></li>');$( "#createNewLocation" ).click(function() {diff --git a/data/js/tags.ui.js b/data/js/tags.ui.jsindex c8204b9b5..32bdcc0ab 100644--- a/data/js/tags.ui.js+++ b/data/js/tags.ui.js@@ -168,6 +168,7 @@ define(function(require, exports, module) {console.log("Moving tag: "+tagGroupData.title+" to "+targetTagGroupKey);TSCORE.Config.moveTag(tagGroupData, targetTagGroupKey);generateTagGroups();+ $(ui.helper).remove();}})@@ -220,10 +221,9 @@ define(function(require, exports, module) {TSCORE.selectedTagData.parentKey = $(this).attr("parentKey");}).draggable({- "cancel": false,"appendTo": "body","helper": "clone",- "revert": true,+ "revert": 'invalid',}).append("<span class='caret'/>").dropdown( 'attach' , '#tagTreeMenu' )