Skip to content

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

Open file after its creation

uggrock83e8345db5d8
diff --git a/data/js/ioapi.chrome.js b/data/js/ioapi.chrome.js
index 8af323cda..292628c2a 100644
--- a/data/js/ioapi.chrome.js
+++ b/data/js/ioapi.chrome.js
@@ -241,7 +241,7 @@ Still Missing:
reader.onloadend = function(e){
var data = Array.prototype.slice.call(new Uint8Array(reader.result), 0);
nativeIO.saveBlobToFile(filePath, data);
- TSPOSTIO.saveTextFile();
+ TSPOSTIO.saveTextFile(filePath);
}
reader.readAsArrayBuffer(blob);
}
diff --git a/data/js/ioapi.mozilla.js b/data/js/ioapi.mozilla.js
index 8b2f9d41e..02f1f23e1 100644
--- a/data/js/ioapi.mozilla.js
+++ b/data/js/ioapi.mozilla.js
@@ -49,7 +49,7 @@ document.documentElement.addEventListener("tsMessage", function(event) {
break;
case "saveTextFile":
if(message.success){
- TSPOSTIO.saveTextFile();
+ TSPOSTIO.saveTextFile(message.content);
} else {
TSCORE.updateLogger("Save failed");
}
diff --git a/data/js/ioapi.node.js b/data/js/ioapi.node.js
index b42dfea2f..6ff9e8d68 100644
--- a/data/js/ioapi.node.js
+++ b/data/js/ioapi.node.js
@@ -153,7 +153,7 @@ define(function(require, exports, module) {
console.log("Save to file "+filePath+" failed "+error);
return;
}
- TSPOSTIO.saveTextFile();
+ TSPOSTIO.saveTextFile(filePath);
});
}
diff --git a/data/js/postioapi.js b/data/js/postioapi.js
index 1654a965a..abd7c1982 100644
--- a/data/js/postioapi.js
+++ b/data/js/postioapi.js
@@ -27,7 +27,7 @@ define(function(require, exports, module) {
if(TSCORE.FileOpener.isFileOpened() && (oldFilePath == TSCORE.FileOpener.getOpenedFilePath()) ) {
TSCORE.FileOpener.openFile(newFilePath);
}
- // TODO to be replaced with a function which replaced the
+ // TODO to be replaced with a function which replaces the
// renamed file in the model of the perspective
TSCORE.PerspectiveManager.refreshFileListContainer();
}
@@ -36,11 +36,10 @@ define(function(require, exports, module) {
TSCORE.FileOpener.updateEditorContent(content);
}
- exports.saveTextFile = function() {
+ exports.saveTextFile = function(filePath) {
TSCORE.PerspectiveManager.refreshFileListContainer();
- if(TSCORE.FileOpener.isFileOpened()) {
- // TODO Automatically reopening of the file is not desirable in every case ...
- //TSCORE.FileOpener.openFile(message.content);
+ if(!TSCORE.FileOpener.isFileOpened()) {
+ TSCORE.FileOpener.openFile(filePath);
}
}