Skip to content

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

enhancing the search feature typing esc in the search box will close it

uggrockdc8fae2b7d75
diff --git a/data/assets/tagspaces.css b/data/assets/tagspaces.css
index c2a466f4f..5b114ab2b 100644
--- a/data/assets/tagspaces.css
+++ b/data/assets/tagspaces.css
@@ -326,7 +326,7 @@ li hr {
position: absolute;
top: 0;
left: 3px;
- z-index: 999;
+ z-index: 1999;
padding-right: 100px;
background-color: #f2f2f2;
}
@@ -343,13 +343,14 @@ li hr {
}
#searchToolbar {
- z-index: 1000;
+ z-index: 2999;
display: none;
position: absolute;
top: 0;
left:0; right:0;
margin: 0 auto;
width: 250px;
+ background-color: #f2f2f2;
}
#showSearchButton {
@@ -798,9 +799,6 @@ input a.resetFilter {
.addFileInput {
visibility:hidden;
- position:absolute;
- top:-500px;
- left:-500px;
}
.topEdge {
diff --git a/data/js/core.api.js b/data/js/core.api.js
index 9775e1125..c99895032 100644
--- a/data/js/core.api.js
+++ b/data/js/core.api.js
@@ -326,6 +326,7 @@ define(function(require, exports, module) {
layoutContainer.close("west"); // workarround
shouldOpenCol1 = false; //Closing col1
layoutContainer.sizePane("east", fullWidth); // make col3 100%
+ //$(".col3").css("left","0"); // workarround for removing 1px balkan on the left
//east__spacing_open: 1
} else {
if(!layoutContainer.state.west.isClosed) {
diff --git a/data/js/core.ui.js b/data/js/core.ui.js
index 51afc47c4..c5de6f253 100644
--- a/data/js/core.ui.js
+++ b/data/js/core.ui.js
@@ -577,7 +577,9 @@ define(function(require, exports, module) {
TSCORE.PerspectiveManager.redrawCurrentPerspective();
$("#searchOptions").hide();
$("#searchButton").focus();
- } else {
+ } else if (e.keyCode == 27) {
+ cancelSearch();
+ } else {
TSCORE.Search.nextQuery = this.value;
}
if (this.value.length === 0) {
@@ -594,6 +596,7 @@ define(function(require, exports, module) {
$("#showSearchButton").on("click", function() {
TSCORE.showSearchArea();
+ $("#searchBox").focus();
});
$("#searchButton")
@@ -608,14 +611,9 @@ define(function(require, exports, module) {
$("#clearFilterButton")
.prop('disabled', true)
- .click(function(evt) {
- evt.preventDefault();
- clearSearchFilter();
- $("#searchBox").popover("hide");
- $("#searchToolbar").hide();
- $("#showSearchButton").show();
- // Restoring initial dir listing without subdirectories
- TSCORE.IO.listDirectory(TSCORE.currentPath);
+ .click(function(e) {
+ e.preventDefault();
+ cancelSearch();
});
// Search UI END
@@ -689,6 +687,15 @@ define(function(require, exports, module) {
});
};
+ function cancelSearch() {
+ clearSearchFilter();
+ $("#searchBox").popover("hide");
+ $("#searchToolbar").hide();
+ $("#showSearchButton").show();
+ // Restoring initial dir listing without subdirectories
+ TSCORE.IO.listDirectory(TSCORE.currentPath);
+ }
+
function showSearchArea() {
$("#searchToolbar").show(); //.addClass('animated bounceIn');
$("#showSearchButton").hide();