|
@@ -79,6 +79,12 @@
|
|
color:white;
|
|
color:white;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ .ts.button.active.darkTheme{
|
|
|
|
+ background-color:#312f42 !important;
|
|
|
|
+ border: 1px solid #262533;
|
|
|
|
+ color:white;
|
|
|
|
+ }
|
|
|
|
+
|
|
.ts.button.darkTheme:hover{
|
|
.ts.button.darkTheme:hover{
|
|
background-color:#312f42 !important;
|
|
background-color:#312f42 !important;
|
|
color:white !important;
|
|
color:white !important;
|
|
@@ -686,8 +692,9 @@
|
|
<input autocomplete="off" id="searchInput" type="text" class="whiteTheme" placeholder="File Search (Start wildcard search with / , e.g. /*.mp3)" onkeypress="handleSearchBarPress(event);">
|
|
<input autocomplete="off" id="searchInput" type="text" class="whiteTheme" placeholder="File Search (Start wildcard search with / , e.g. /*.mp3)" onkeypress="handleSearchBarPress(event);">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <button class="ts icon tiny button standard whiteTheme" onclick="handleSearch();"><i class="search icon"></i></button>
|
|
|
|
- <button class="ts icon tiny button standard whiteTheme" onclick="hideSearchBar();"><i class="remove icon"></i></button>
|
|
|
|
|
|
+ <button class="ts icon tiny button standard whiteTheme" title="Case Sensitive" onclick="toggleCaseSensitive(this);">Aa</button>
|
|
|
|
+ <button class="ts icon tiny button standard whiteTheme" title="Search" onclick="handleSearch();"><i class="search icon"></i></button>
|
|
|
|
+ <button class="ts icon tiny button standard whiteTheme" title="Clear Search" onclick="hideSearchBar();"><i class="remove icon"></i></button>
|
|
</div>
|
|
</div>
|
|
<div class="msgbox" style="z-index:999; display:none;">
|
|
<div class="msgbox" style="z-index:999; display:none;">
|
|
<i class="checkmark icon"></i> <span>No Message</span>
|
|
<i class="checkmark icon"></i> <span>No Message</span>
|
|
@@ -1111,6 +1118,7 @@
|
|
let useLocalstorage = lscheck();
|
|
let useLocalstorage = lscheck();
|
|
let overwriteMode = "keep"; //Overwrite mode, support {skip, overwrite, keep}
|
|
let overwriteMode = "keep"; //Overwrite mode, support {skip, overwrite, keep}
|
|
let thumbRenderWebSocket = null;
|
|
let thumbRenderWebSocket = null;
|
|
|
|
+ let searchCaseSensitive = false;
|
|
|
|
|
|
//Keypress listeners
|
|
//Keypress listeners
|
|
let ctrlHold = false;
|
|
let ctrlHold = false;
|
|
@@ -1136,7 +1144,7 @@
|
|
let isChromium = window.chrome;
|
|
let isChromium = window.chrome;
|
|
let isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
|
|
let isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
|
|
let isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
let isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
- var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
|
|
|
|
+ let isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
|
|
|
|
//Intiiation functions
|
|
//Intiiation functions
|
|
initRootDirs();
|
|
initRootDirs();
|
|
@@ -4419,15 +4427,29 @@
|
|
}
|
|
}
|
|
searchMode = false;
|
|
searchMode = false;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //Handle case sensitive in keyword searching
|
|
|
|
+ function toggleCaseSensitive(btn){
|
|
|
|
+ if ($(btn).hasClass("active")){
|
|
|
|
+ $(btn).removeClass("active");
|
|
|
|
+ searchCaseSensitive = false;
|
|
|
|
+ }else{
|
|
|
|
+ $(btn).addClass("active");
|
|
|
|
+ searchCaseSensitive = true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
function handleSearch(){
|
|
function handleSearch(){
|
|
var keyword = $("#searchInput").val();
|
|
var keyword = $("#searchInput").val();
|
|
$("#folderList").html(`<div class="ts basic segment ${currentTheme}">
|
|
$("#folderList").html(`<div class="ts basic segment ${currentTheme}">
|
|
<i class="loading spinner icon ${currentTheme}"></i> <span class="${currentTheme}">Searching</span>
|
|
<i class="loading spinner icon ${currentTheme}"></i> <span class="${currentTheme}">Searching</span>
|
|
</div>`);
|
|
</div>`);
|
|
|
|
+ $("#fileList").hide();
|
|
|
|
+ $("#fileList").html("");
|
|
|
|
+
|
|
$.ajax({
|
|
$.ajax({
|
|
url: "../../system/file_system/search",
|
|
url: "../../system/file_system/search",
|
|
- data: {path: currentPath, keyword: keyword},
|
|
|
|
|
|
+ data: {path: currentPath, keyword: keyword, casesensitive: searchCaseSensitive},
|
|
success: function(data){
|
|
success: function(data){
|
|
if (data.error !== undefined){
|
|
if (data.error !== undefined){
|
|
msgbox("remove", data.error);
|
|
msgbox("remove", data.error);
|
|
@@ -4435,6 +4457,7 @@
|
|
//Render the filelist
|
|
//Render the filelist
|
|
console.log(data);
|
|
console.log(data);
|
|
if (data.length == 0){
|
|
if (data.length == 0){
|
|
|
|
+ $("#folderList").show();
|
|
$("#folderList").html(`<div class="ts basic segment ${currentTheme}">
|
|
$("#folderList").html(`<div class="ts basic segment ${currentTheme}">
|
|
<div class="ts header ${currentTheme}">
|
|
<div class="ts header ${currentTheme}">
|
|
<i class="question icon" ${currentTheme}></i> <span class="${currentTheme}">No Matching Results</span>
|
|
<i class="question icon" ${currentTheme}></i> <span class="${currentTheme}">No Matching Results</span>
|