mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
more refactoring and simplification...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
285c40ff06
commit
57f80a6070
13
ui/files.js
13
ui/files.js
@ -1129,6 +1129,7 @@ function readImageDate(gid, images){
|
||||
return getEXIFDate(normalizePath(img.path))
|
||||
.done(function(date){
|
||||
img.ctime = Date.fromTimeStamp(date).getTime()/1000
|
||||
imageUpdated(gid)
|
||||
})
|
||||
}
|
||||
function readImagesDates(images){
|
||||
@ -1136,9 +1137,6 @@ function readImagesDates(images){
|
||||
|
||||
return $.when.apply(null, $.map(images, function(_, gid){
|
||||
return readImageDate(gid, images)
|
||||
.done(function(){
|
||||
imageUpdated(gid)
|
||||
})
|
||||
}))
|
||||
}
|
||||
function readImagesDatesQ(images){
|
||||
@ -1148,10 +1146,6 @@ function readImagesDatesQ(images){
|
||||
|
||||
$.each(images, function(gid, img){
|
||||
queue.enqueue(readImageDate, gid, images)
|
||||
.always(function(){
|
||||
imageUpdated(gid)
|
||||
//queue.notify(gid, 'done')
|
||||
})
|
||||
})
|
||||
|
||||
return queue
|
||||
@ -1209,6 +1203,8 @@ function updateImagesGIDs(images, data){
|
||||
return $.when.apply(null, $.map(images, function(_, key){
|
||||
return updateImageGID(key, images, data)
|
||||
}))
|
||||
|
||||
IMAGES_CREATED = true
|
||||
}
|
||||
function updateImagesGIDsQ(images, data){
|
||||
images = images == null ? IMAGES : images
|
||||
@ -1217,9 +1213,6 @@ function updateImagesGIDsQ(images, data){
|
||||
|
||||
$.each(images, function(key){
|
||||
queue.enqueue(updateImageGID, key, images, data)
|
||||
.always(function(){
|
||||
//queue.notify(key, 'done')
|
||||
})
|
||||
})
|
||||
|
||||
IMAGES_CREATED = true
|
||||
|
||||
5
ui/ui.js
5
ui/ui.js
@ -263,8 +263,10 @@ function updateInfo(elem, data, target){
|
||||
elem.append(data)
|
||||
}
|
||||
|
||||
return elem
|
||||
elem
|
||||
.appendTo(target)
|
||||
|
||||
return elem
|
||||
}
|
||||
|
||||
|
||||
@ -381,6 +383,7 @@ function showStatusQ(message){
|
||||
function showErrorStatus(message){
|
||||
message = Array.apply(Array, arguments)
|
||||
message.splice(0, 0, 'Error:')
|
||||
//return showStatusQ.apply(null, message)
|
||||
return updateStatus.apply(null, message)
|
||||
.one('click', function(){ $(this).fadeOut() })
|
||||
//.stop()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user