TagSpaces is an offline, open source, document manager with tagging support
Added handler for the open natively button
Ilian82d95761d06d
diff --git a/data/js/fileopener.js b/data/js/fileopener.jsindex 92f0ac37b..2411e8d2f 100644--- a/data/js/fileopener.js+++ b/data/js/fileopener.js@@ -76,11 +76,6 @@ define(function(require, exports, module) {$('iframe').get(0).contentWindow.print();});- $( "#openDirectory" )- .click( function() {- TSCORE.IO.openDirectory(TSCORE.currentPath);- });-$( "#renameFile" ).click( function() {TSCORE.showFileRenameDialog(_openedFilePath);@@ -96,6 +91,16 @@ define(function(require, exports, module) {TSCORE.showFileDeleteDialog(_openedFilePath);});+ $( "#openNatively" )+ .click( function() {+ TSCORE.IO.openFile(_openedFilePath);+ });++ $( "#openDirectory" )+ .click( function() {+ TSCORE.IO.openDirectory(TSCORE.currentPath);+ });+$( "#fullscreenFile" ).click(function() {var docElm = $("#viewer")[0];@@ -129,13 +134,17 @@ define(function(require, exports, module) {function closeFile() {if(_isEditMode) {- TSCORE.showConfirmDialog("Confirm","If you confirm, all made changes will be lost.", function() {- // Cleaning the viewer/editor- document.getElementById("viewer").innerHTML = "";- TSCORE.FileOpener.setFileOpened(false);- TSCORE.closeFileViewer();- _isEditMode = false;- });+ TSCORE.showConfirmDialog(+ "Confirm",+ "If you confirm, all made changes will be lost.",+ function() {+ // Cleaning the viewer/editor+ document.getElementById("viewer").innerHTML = "";+ TSCORE.FileOpener.setFileOpened(false);+ TSCORE.closeFileViewer();+ _isEditMode = false;+ }+ );} else {// Cleaning the viewer/editordocument.getElementById("viewer").innerHTML = "";diff --git a/data/js/postioapi.js b/data/js/postioapi.jsindex 5d6f4c35e..ea66cb323 100644--- a/data/js/postioapi.js+++ b/data/js/postioapi.js@@ -10,13 +10,14 @@ define(function(require, exports, module) {var TSCORE = require("tscore");exports.createDirectoryIndex = function(directoryIndex) {+ console.log("Directory index created");TSCORE.PerspectiveManager.updateFileBrowserData(directoryIndex);- TSCORE.hideLoadingAnimation();+ //TSCORE.hideLoadingAnimation();};exports.createDirectoryTree = function(directoyTree) {TSCORE.PerspectiveManager.updateTreeData(directoyTree);- TSCORE.hideLoadingAnimation();+ //TSCORE.hideLoadingAnimation();};exports.createDirectory = function() {@@ -66,7 +67,7 @@ define(function(require, exports, module) {exports.listDirectory = function(anotatedDirList) {TSCORE.PerspectiveManager.updateFileBrowserData(anotatedDirList);TSCORE.updateSubDirs(anotatedDirList);- TSCORE.hideLoadingAnimation();+ //TSCORE.hideLoadingAnimation();};exports.errorOpeningPath = function() {diff --git a/data/js/tags.ui.js b/data/js/tags.ui.jsindex 086388c49..c5057f9e2 100644--- a/data/js/tags.ui.js+++ b/data/js/tags.ui.js@@ -112,7 +112,7 @@ define(function(require, exports, module) {$( "#tagGroupMenuDeleteTagGroup" ).click( function() {TSCORE.showConfirmDialog("Delete TagGroup",- "Do you want to delete this taggroup?",+ "Do you want to delete taggroup '"+TSCORE.selectedTagData.title+"' ?",function() {TSCORE.Config.deleteTagGroup(TSCORE.selectedTagData);generateTagGroups();