Skip to content

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

adding focus window function to the platform APIs

Ilian33e910c045a7
diff --git a/data/chromelight/chrome.api.js b/data/chromelight/chrome.api.js
index 3b6988823..913fd94b7 100644
--- a/data/chromelight/chrome.api.js
+++ b/data/chromelight/chrome.api.js
@@ -302,6 +302,12 @@
}*/
};
+ // Bring the TagSpaces window on top of the windows
+ var focusWindow = function() {
+ window.focus();
+ };
+
+ exports.focusWindow = focusWindow;
exports.createDirectory = createDirectory;
exports.copyFile = copyFile;
exports.renameFile = renameFile;
diff --git a/data/cordova/cordova.api.js b/data/cordova/cordova.api.js
index 786fb9080..875d7601d 100644
--- a/data/cordova/cordova.api.js
+++ b/data/cordova/cordova.api.js
@@ -579,7 +579,13 @@ define(function (require, exports, module) {
}
);
};
-
+
+ // Bring the TagSpaces window on top of the windows
+ var focusWindow = function() {
+ console.log("Focusing window is not implemented yet.");
+ };
+
+ exports.focusWindow = focusWindow;
exports.createDirectory = createDirectory;
exports.copyFile = copyFile;
exports.renameFile = renameFile;
diff --git a/data/mozilla/mozilla.api.js b/data/mozilla/mozilla.api.js
index 7aea2025e..ab1cb0073 100644
--- a/data/mozilla/mozilla.api.js
+++ b/data/mozilla/mozilla.api.js
@@ -307,11 +307,14 @@ define(function(require, exports, module) {
// TODO implement openFile for firefox
console.log("Open file functionality not implemented in Firefox yet!");
TSCORE.showAlertDialog($.i18n.t("ns.dialogs:openFileNativelyAlert"));
- };
-
- exports.saveSettings = saveSettings;
- exports.loadSettings = loadSettings;
-
+ };
+
+ // Bring the TagSpaces window on top of the windows
+ var focusWindow = function() {
+ console.log("Focusing window is not implemented yet.");
+ };
+
+ exports.focusWindow = focusWindow;
exports.createDirectory = createDirectory;
exports.copyFile = copyFile;
exports.renameFile = renameFile;
@@ -332,4 +335,7 @@ define(function(require, exports, module) {
exports.checkNewVersion = checkNewVersion;
exports.getFileProperties = getFileProperties;
+ // mozilla specific
+ exports.saveSettings = saveSettings;
+ exports.loadSettings = loadSettings;
});
diff --git a/data/web/web.api.js b/data/web/web.api.js
index 0a3c22c6e..7df78377d 100644
--- a/data/web/web.api.js
+++ b/data/web/web.api.js
@@ -241,8 +241,14 @@ define(function(require, exports, module) {
TSPOSTIO.getFileProperties(fileProperties);
},1
);
- };
-
+ };
+
+ // Bring the TagSpaces window on top of the windows
+ var focusWindow = function() {
+ window.focus();
+ };
+
+ exports.focusWindow = focusWindow;
exports.createDirectory = createDirectory;
exports.copyFile = copyFile;
exports.renameFile = renameFile;