tweaked api filtering a bit...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2015-03-30 17:42:48 +03:00
parent da60bb12d5
commit 20491386d6

View File

@ -128,6 +128,7 @@ var BrowserPrototype = {
// - disable nav in favor of editing // - disable nav in favor of editing
// - enter/blur to exit edit mode // - enter/blur to exit edit mode
// - esc to cancel and reset // - esc to cancel and reset
// XXX add a filter mode...
.click(function(){ .click(function(){
//that.update(path.concat($(this).text())) //that.update(path.concat($(this).text()))
$(this) $(this)
@ -167,6 +168,12 @@ var BrowserPrototype = {
var that = this var that = this
var browser = this.dom var browser = this.dom
// show all...
if(pattern == null || pattern.trim() == '*'){
this.update()
// basic filter...
} else {
var l = browser.find('.list>div') var l = browser.find('.list>div')
l.each(function(i, e){ l.each(function(i, e){
@ -180,6 +187,9 @@ var BrowserPrototype = {
e.html(t.replace(pattern, pattern.bold())) e.html(t.replace(pattern, pattern.bold()))
} }
}) })
}
return this
}, },
// internal actions... // internal actions...