mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-30 10:50: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))
|
return getEXIFDate(normalizePath(img.path))
|
||||||
.done(function(date){
|
.done(function(date){
|
||||||
img.ctime = Date.fromTimeStamp(date).getTime()/1000
|
img.ctime = Date.fromTimeStamp(date).getTime()/1000
|
||||||
|
imageUpdated(gid)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function readImagesDates(images){
|
function readImagesDates(images){
|
||||||
@ -1136,9 +1137,6 @@ function readImagesDates(images){
|
|||||||
|
|
||||||
return $.when.apply(null, $.map(images, function(_, gid){
|
return $.when.apply(null, $.map(images, function(_, gid){
|
||||||
return readImageDate(gid, images)
|
return readImageDate(gid, images)
|
||||||
.done(function(){
|
|
||||||
imageUpdated(gid)
|
|
||||||
})
|
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
function readImagesDatesQ(images){
|
function readImagesDatesQ(images){
|
||||||
@ -1148,10 +1146,6 @@ function readImagesDatesQ(images){
|
|||||||
|
|
||||||
$.each(images, function(gid, img){
|
$.each(images, function(gid, img){
|
||||||
queue.enqueue(readImageDate, gid, images)
|
queue.enqueue(readImageDate, gid, images)
|
||||||
.always(function(){
|
|
||||||
imageUpdated(gid)
|
|
||||||
//queue.notify(gid, 'done')
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
return queue
|
return queue
|
||||||
@ -1209,6 +1203,8 @@ function updateImagesGIDs(images, data){
|
|||||||
return $.when.apply(null, $.map(images, function(_, key){
|
return $.when.apply(null, $.map(images, function(_, key){
|
||||||
return updateImageGID(key, images, data)
|
return updateImageGID(key, images, data)
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
IMAGES_CREATED = true
|
||||||
}
|
}
|
||||||
function updateImagesGIDsQ(images, data){
|
function updateImagesGIDsQ(images, data){
|
||||||
images = images == null ? IMAGES : images
|
images = images == null ? IMAGES : images
|
||||||
@ -1217,9 +1213,6 @@ function updateImagesGIDsQ(images, data){
|
|||||||
|
|
||||||
$.each(images, function(key){
|
$.each(images, function(key){
|
||||||
queue.enqueue(updateImageGID, key, images, data)
|
queue.enqueue(updateImageGID, key, images, data)
|
||||||
.always(function(){
|
|
||||||
//queue.notify(key, 'done')
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
IMAGES_CREATED = true
|
IMAGES_CREATED = true
|
||||||
|
|||||||
5
ui/ui.js
5
ui/ui.js
@ -263,8 +263,10 @@ function updateInfo(elem, data, target){
|
|||||||
elem.append(data)
|
elem.append(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
return elem
|
elem
|
||||||
.appendTo(target)
|
.appendTo(target)
|
||||||
|
|
||||||
|
return elem
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -381,6 +383,7 @@ function showStatusQ(message){
|
|||||||
function showErrorStatus(message){
|
function showErrorStatus(message){
|
||||||
message = Array.apply(Array, arguments)
|
message = Array.apply(Array, arguments)
|
||||||
message.splice(0, 0, 'Error:')
|
message.splice(0, 0, 'Error:')
|
||||||
|
//return showStatusQ.apply(null, message)
|
||||||
return updateStatus.apply(null, message)
|
return updateStatus.apply(null, message)
|
||||||
.one('click', function(){ $(this).fadeOut() })
|
.one('click', function(){ $(this).fadeOut() })
|
||||||
//.stop()
|
//.stop()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user