TagSpaces is an offline, open source, document manager with tagging support
Extracting location name from the directory path
uggrock28fb88c6a3ba
diff --git a/data/index.html b/data/index.htmlindex f70f90a61..7ca4a8b94 100644--- a/data/index.html+++ b/data/index.html@@ -133,19 +133,19 @@</div><div class="modal-body"><form class="form-horizontal" onsubmit="return false;">- <div class="control-group">- <label class="control-label" for="connectionName">Connection Name</label>- <div class="controls">- <input type="text" name="connectionName" id="connectionName" placeholder="Example: My Documents" />- </div>- </div><div class="control-group"><label class="control-label" for="folderLocation">Folder Location</label><div class="controls"><input type="text" name="folderLocation" id="folderLocation" placeholder="Example: c:\users\ugg\documents" /><button id="selectLocalDirectory" class="btn" title="Select local folder"><i class="icon-folder-open"></i></button></div>- </div>+ </div>+ <div class="control-group">+ <label class="control-label" for="connectionName">Connection Name</label>+ <div class="controls">+ <input type="text" name="connectionName" id="connectionName" placeholder="Example: My Documents" />+ </div>+ </div></form></div><div class="modal-footer">diff --git a/data/js/postioapi.js b/data/js/postioapi.jsindex abd7c1982..06819d463 100644--- a/data/js/postioapi.js+++ b/data/js/postioapi.js@@ -38,9 +38,9 @@ define(function(require, exports, module) {exports.saveTextFile = function(filePath) {TSCORE.PerspectiveManager.refreshFileListContainer();- if(!TSCORE.FileOpener.isFileOpened()) {+ //if(!TSCORE.FileOpener.isFileOpened()) {TSCORE.FileOpener.openFile(filePath);- }+ //}}exports.listDirectory = function(anotatedDirList) {@@ -60,7 +60,9 @@ define(function(require, exports, module) {}exports.selectDirectory = function(dirPath) {- // TODO make the use of this function more general+ // TODO make the use of this function more general+ var dirName = TSCORE.TagUtils.extractContainingDirectoryName(dirPath+TSCORE.TagUtils.DIR_SEPARATOR);+ $("#connectionName").val(dirName);$("#folderLocation").val(dirPath);}