mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
tweaked api filtering a bit...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
da60bb12d5
commit
20491386d6
@ -128,6 +128,7 @@ var BrowserPrototype = {
|
||||
// - disable nav in favor of editing
|
||||
// - enter/blur to exit edit mode
|
||||
// - esc to cancel and reset
|
||||
// XXX add a filter mode...
|
||||
.click(function(){
|
||||
//that.update(path.concat($(this).text()))
|
||||
$(this)
|
||||
@ -167,19 +168,28 @@ var BrowserPrototype = {
|
||||
var that = this
|
||||
var browser = this.dom
|
||||
|
||||
var l = browser.find('.list>div')
|
||||
// show all...
|
||||
if(pattern == null || pattern.trim() == '*'){
|
||||
this.update()
|
||||
|
||||
l.each(function(i, e){
|
||||
e = $(e)
|
||||
var t = e.text()
|
||||
var i = t.search(pattern)
|
||||
if(i < 0){
|
||||
e.remove()
|
||||
// basic filter...
|
||||
} else {
|
||||
var l = browser.find('.list>div')
|
||||
|
||||
} else {
|
||||
e.html(t.replace(pattern, pattern.bold()))
|
||||
}
|
||||
})
|
||||
l.each(function(i, e){
|
||||
e = $(e)
|
||||
var t = e.text()
|
||||
var i = t.search(pattern)
|
||||
if(i < 0){
|
||||
e.remove()
|
||||
|
||||
} else {
|
||||
e.html(t.replace(pattern, pattern.bold()))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return this
|
||||
},
|
||||
|
||||
// internal actions...
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user