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)
|
function CallViewListRoute(dir)
|
||||||
{
|
{
|
||||||
|
// dont allow mad spamming of arrows
|
||||||
|
$("#la").prop("disabled", true)
|
||||||
|
$("#ra").prop("disabled", true)
|
||||||
data="eids="+$("#eids").val()
|
data="eids="+$("#eids").val()
|
||||||
data+="&cwd={{OPT.cwd}}"
|
data+="&cwd={{OPT.cwd}}"
|
||||||
data+="&root={{OPT.root}}"
|
data+="&root={{OPT.root}}"
|
||||||
@@ -117,10 +120,11 @@
|
|||||||
objs=res.objs
|
objs=res.objs
|
||||||
eid_lst=eids.split(",")
|
eid_lst=eids.split(",")
|
||||||
offset=res.offset
|
offset=res.offset
|
||||||
if( current == first_eid )
|
// okay, we now have results back, can reset next/prev buttons
|
||||||
$("#la").prop("disabled", true)
|
if( current != first_eid )
|
||||||
if( current == last_eid )
|
$("#la").prop("disabled", false)
|
||||||
$("#ra").prop("disabled", true)
|
if( current != last_eid )
|
||||||
|
$("#ra").prop("disabled", false)
|
||||||
ViewImageOrVideo()
|
ViewImageOrVideo()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -207,7 +211,7 @@
|
|||||||
$('#la').attr('disabled', false )
|
$('#la').attr('disabled', false )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
CallViewListRoute('next')
|
CallViewListRoute('next')
|
||||||
|
|
||||||
if( current == last_eid )
|
if( current == last_eid )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user