bugfix in tags...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2014-02-13 18:59:44 +04:00
parent 92b928fbfb
commit ef10c17fc3
2 changed files with 13 additions and 7 deletions

View File

@ -202,7 +202,7 @@ function updateTags(tags, gid, tagset, images){
function tagSelectAND(tags, from, no_sort, tagset){
tags = typeof(tags) == typeof('str') ? [ tags ] : tags
tagset = tagset == null ? TAGS : tagset
from = from == null ? getLoadedGIDs() : from
from = from == null ? getLoadedGIDs() : getLoadedGIDs(from)
// special case: a single tag...
// NOTE: this is significantly faster.
@ -300,15 +300,19 @@ function tagSelectOR(tags, from, no_sort, tagset){
*/
function tagList(list, tags){
list.forEach(function(gid){
addTag(tags, gid)
})
list = getLoadedGIDs(list)
list
.forEach(function(gid){
addTag(tags, gid)
})
return list
}
function untagList(list, tags){
list.forEach(function(gid){
removeTag(tags, gid)
})
list = getLoadedGIDs(list)
list
.forEach(function(gid){
removeTag(tags, gid)
})
return list
}
// same as tagList(..), but will also remove the tags form gids no in

View File

@ -570,6 +570,8 @@ function progressBar(name, container, close, hide_timeout, auto_remove){
setTimeout(function(){
widget.hide()
// XXX this is not a good way to go...
// need a clean way to reset...
if(auto_remove){
widget.remove()
}