From 848577f33968d88b1c2e20ae1a8b422dc09d5a35 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 30 Jan 2017 06:05:21 +0300 Subject: [PATCH] fixed a couple of small bugs... Signed-off-by: Alex A. Naanou --- ui (gen4)/lib/widget/browse.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ui (gen4)/lib/widget/browse.js b/ui (gen4)/lib/widget/browse.js index bf2ea5c1..1db7694c 100755 --- a/ui (gen4)/lib/widget/browse.js +++ b/ui (gen4)/lib/widget/browse.js @@ -2314,7 +2314,7 @@ var BrowserPrototype = { var that = this var browser = this.dom - var elems = browser.find('.list .item:not(.not-searchable)' + var elems = browser.find('.list .item' + (this.options.elementSeparatorClass ? ':not('+ this.options.elementSeparatorClass +')' : '') @@ -2432,7 +2432,7 @@ var BrowserPrototype = { .removeClass('filtered-out') // clear the highlighting... browser.find('.list b') - .replaceWith(function() { return this.innerHTML }) + .replaceWith(function(){ return this.innerHTML }) // basic filter... } else { @@ -2457,9 +2457,13 @@ var BrowserPrototype = { // rejected... function(i, e){ !e.hasClass('not-filtered-out') - && e.addClass('filtered-out') + && e + .addClass('filtered-out') + .removeClass('selected') - e.removeClass('selected') + // clear selection... + e.find('b') + .replaceWith(function(){ return this.innerHTML }) }, // NOTE: setting this to true will not remove disabled // elements from view as they will neither get @@ -2467,6 +2471,8 @@ var BrowserPrototype = { // thus it will require manual setting of the // .filtered-out class false) + // skip non-searchable... + .filter(':not(.not-searchable)') // passed... .removeClass('filtered-out') // NOTE: this will mess up (clear) any highlighting that was