Fix BUG-126 (basically disable next/prev buttons the moment we go back to the server for the previous/next page of images, only re-enable if they make sense after we have loaded the new images
This commit is contained in:
@@ -101,6 +101,9 @@
|
||||
|
||||
function CallViewListRoute(dir)
|
||||
{
|
||||
// dont allow mad spamming of arrows
|
||||
$("#la").prop("disabled", true)
|
||||
$("#ra").prop("disabled", true)
|
||||
data="eids="+$("#eids").val()
|
||||
data+="&cwd={{OPT.cwd}}"
|
||||
data+="&root={{OPT.root}}"
|
||||
@@ -117,10 +120,11 @@
|
||||
objs=res.objs
|
||||
eid_lst=eids.split(",")
|
||||
offset=res.offset
|
||||
if( current == first_eid )
|
||||
$("#la").prop("disabled", true)
|
||||
if( current == last_eid )
|
||||
$("#ra").prop("disabled", true)
|
||||
// okay, we now have results back, can reset next/prev buttons
|
||||
if( current != first_eid )
|
||||
$("#la").prop("disabled", false)
|
||||
if( current != last_eid )
|
||||
$("#ra").prop("disabled", false)
|
||||
ViewImageOrVideo()
|
||||
}
|
||||
})
|
||||
@@ -207,7 +211,7 @@
|
||||
$('#la').attr('disabled', false )
|
||||
}
|
||||
else
|
||||
CallViewListRoute('next')
|
||||
CallViewListRoute('next')
|
||||
|
||||
if( current == last_eid )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user