mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-12-17 08:41:40 +00:00
fixed a bug in updateRibbonsFromFavDirs()...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
a2537c5b20
commit
bf1766351e
13
ui/data.js
13
ui/data.js
@ -466,13 +466,16 @@ function ribbonsFromFavDirs(path, images, cmp){
|
||||
// collect the images...
|
||||
$.each(files, function(i, e){
|
||||
var _gid = index[e]
|
||||
var found = /.*\.(jpg|jpeg)$/i.test(e) ? ribbon.push(_gid) : false
|
||||
// filter out non-image files...
|
||||
if(/.*\.(jpg|jpeg)$/i.test(e)){
|
||||
ribbon.push(_gid)
|
||||
}
|
||||
// remove the found item from each of the below ribbons...
|
||||
if(found !== false){
|
||||
$.each(ribbons, function(i ,e){
|
||||
$.each(ribbons, function(i ,e){
|
||||
if(e.indexOf(_gid) != -1){
|
||||
e.splice(e.indexOf(_gid), 1)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
ribbons.push(ribbon)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user