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
15
ui/data.js
15
ui/data.js
@ -466,13 +466,16 @@ function ribbonsFromFavDirs(path, images, cmp){
|
|||||||
// collect the images...
|
// collect the images...
|
||||||
$.each(files, function(i, e){
|
$.each(files, function(i, e){
|
||||||
var _gid = index[e]
|
var _gid = index[e]
|
||||||
var found = /.*\.(jpg|jpeg)$/i.test(e) ? ribbon.push(_gid) : false
|
// filter out non-image files...
|
||||||
// remove the found item from each of the below ribbons...
|
if(/.*\.(jpg|jpeg)$/i.test(e)){
|
||||||
if(found !== false){
|
ribbon.push(_gid)
|
||||||
$.each(ribbons, function(i ,e){
|
|
||||||
e.splice(e.indexOf(_gid), 1)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
// remove the found item from each of the below ribbons...
|
||||||
|
$.each(ribbons, function(i ,e){
|
||||||
|
if(e.indexOf(_gid) != -1){
|
||||||
|
e.splice(e.indexOf(_gid), 1)
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
ribbons.push(ribbon)
|
ribbons.push(ribbon)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user