Skip to content

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

Exchanging refresh perspective after delete with change in the model and removals in the UI

Ilian26b3d649e0fa
diff --git a/data/ext/perspectiveGrid/extension.js b/data/ext/perspectiveGrid/extension.js
index 516934828..2737b177b 100644
--- a/data/ext/perspectiveGrid/extension.js
+++ b/data/ext/perspectiveGrid/extension.js
@@ -52,6 +52,11 @@ define(function(require, exports, module) {
var clearSelectedFiles = function() {
UI.clearSelectedFiles();
};
+
+ var removeFileFromUI = function(filePath) {
+ console.log("Removing from UI");
+ $("#"+extensionID+"Container li[filepath='"+filePath+"']").remove();
+ };
var getNextFile = function (filePath) {
return UI.getNextFile(filePath);
@@ -76,4 +81,6 @@ define(function(require, exports, module) {
exports.clearSelectedFiles = clearSelectedFiles;
exports.getNextFile = getNextFile;
exports.getPrevFile = getPrevFile;
+ exports.removeFileFromUI = removeFileFromUI;
+
});
\ No newline at end of file
diff --git a/data/js/postioapi.js b/data/js/postioapi.js
index 3f8ebfa2f..5b065fbb6 100644
--- a/data/js/postioapi.js
+++ b/data/js/postioapi.js
@@ -56,8 +56,11 @@ define(function(require, exports, module) {
TSCORE.PerspectiveManager.updateFileBrowserData([]);
};
- exports.deleteElement = function() {
- TSCORE.PerspectiveManager.refreshFileListContainer();
+ exports.deleteElement = function(filePath) {
+ console.log("Delete POST IO");
+ TSCORE.removeFileFromModell(TSCORE.fileList, filePath);
+ TSCORE.PerspectiveManager.removeFileFromPerspectives(filePath);
+ //TSCORE.PerspectiveManager.refreshFileListContainer();
};
exports.checkNewVersion = function(data) {