From 3eb4d2c695d0979a13fbbf65a417c86719038385 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sat, 7 Nov 2015 22:14:19 +0300 Subject: [PATCH] now browse filter is case-agnostic... Signed-off-by: Alex A. Naanou --- ui (gen4)/lib/widget/browse.js | 8 +++++--- ui (gen4)/ui.js | 2 ++ ui (gen4)/viewer.js | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ui (gen4)/lib/widget/browse.js b/ui (gen4)/lib/widget/browse.js index 37477f00..9b8ce6ea 100755 --- a/ui (gen4)/lib/widget/browse.js +++ b/ui (gen4)/lib/widget/browse.js @@ -647,7 +647,7 @@ var BrowserPrototype = { // maintain focus within the widget... if(focus && browser.find(':focus').length == 0){ - this.focus() + that.focus() } }) @@ -769,6 +769,8 @@ var BrowserPrototype = { // string... // NOTE: this supports several space-separated patterns. + // NOTE: this is case-agnostic... + // ...for case sensitivity remove .toLowerCase()... // XXX support glob... } else if(typeof(pattern) == typeof('str')){ //var pl = pattern.trim().split(/\s+/) @@ -778,10 +780,10 @@ var BrowserPrototype = { // remove empty strings... .filter(function(e){ return e.trim() != '' }) // remove '\' -- enables direct string comparison... - .map(function(e){ return e.replace(/\\(\s)/g, '$1') }) + .map(function(e){ return e.replace(/\\(\s)/g, '$1').toLowerCase() }) var filter = function(i, e){ e = $(e) - var t = e.text() + var t = e.text().toLowerCase() for(var p=0; p < pl.length; p++){ // NOTE: we are not using search here as it treats // the string as a regex and we need literal diff --git a/ui (gen4)/ui.js b/ui (gen4)/ui.js index 71942856..7497e199 100755 --- a/ui (gen4)/ui.js +++ b/ui (gen4)/ui.js @@ -214,6 +214,8 @@ module.GLOBAL_KEYBOARD = { }, A: { alt: 'browseActions', + 'alt+shift': 'listActions', + ctrl: 'toggleMark!: "ribbon" "on"', }, D: { diff --git a/ui (gen4)/viewer.js b/ui (gen4)/viewer.js index 2002fbb9..7af765da 100755 --- a/ui (gen4)/viewer.js +++ b/ui (gen4)/viewer.js @@ -2369,7 +2369,7 @@ var makeActionLister = function(list, filter, pre_order){ })) // XXX DEBUG - window.LIST = o.client + //window.LIST = o.client return this }