TagSpaces is an offline, open source, document manager with tagging support
perspectiveGrid new promise api impl.
Borislav Sapundzhiev5bdc187c1d89
diff --git a/data/ext/perspectiveGrid/perspectiveUI.js b/data/ext/perspectiveGrid/perspectiveUI.jsindex 8ccd8ea2f..90d15e863 100644--- a/data/ext/perspectiveGrid/perspectiveUI.js+++ b/data/ext/perspectiveGrid/perspectiveUI.js@@ -8,6 +8,7 @@ define(function(require, exports, module) {console.log("Loading UI for perspectiveDefault");var TSCORE = require("tscore");+ var TSPOSTIO = require("tspostioapi");var TMB_SIZES = ["200px", "300px", "100px"];var MONTH = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];@@ -225,8 +226,16 @@ define(function(require, exports, module) {$.i18n.t(dlgConfirmMsgId, {selectedFiles: selFiles.toString()}), function() {- TSCORE.selectedFiles.forEach(function(file) {- TSCORE.IO.deleteElement(file);+ TSCORE.selectedFiles.forEach(function(filePath) {+ TSCORE.IO.deleteFilePromise(filePath).then(function() {+ TSPOSTIO.deleteElement(filePath);+ },+ function(error) {+ TSCORE.hideLoadingAnimation();+ TSCORE.showAlertDialog("Deleting file " + filePath + " failed.");+ console.error("Deleting file " + filePath + " failed " + error);+ }+ );});});});