Deal with 304 status with board navigation
This commit is contained in:
parent
879206219b
commit
3b7aa9f398
@ -2192,6 +2192,7 @@
|
|||||||
if (g.BOARD.ID === 'f' || g.VIEW === 'catalog' || !Conf['JSON Navigation']) {
|
if (g.BOARD.ID === 'f' || g.VIEW === 'catalog' || !Conf['JSON Navigation']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.board = "" + g.BOARD;
|
||||||
this.button = $.el('a', {
|
this.button = $.el('a', {
|
||||||
className: 'index-refresh-shortcut fa fa-refresh',
|
className: 'index-refresh-shortcut fa fa-refresh',
|
||||||
title: 'Refresh',
|
title: 'Refresh',
|
||||||
@ -2585,7 +2586,8 @@
|
|||||||
}
|
}
|
||||||
Navigate.title();
|
Navigate.title();
|
||||||
try {
|
try {
|
||||||
if (req.status === 200) {
|
if (req.status === 200 || Index.board !== ("" + g.BOARD)) {
|
||||||
|
Index.board = "" + g.BOARD;
|
||||||
Index.parse(JSON.parse(req.response), pageNum);
|
Index.parse(JSON.parse(req.response), pageNum);
|
||||||
} else if (req.status === 304 && (pageNum != null)) {
|
} else if (req.status === 304 && (pageNum != null)) {
|
||||||
Index.pageNav(pageNum);
|
Index.pageNav(pageNum);
|
||||||
|
|||||||
@ -2202,6 +2202,7 @@
|
|||||||
if (g.BOARD.ID === 'f' || g.VIEW === 'catalog' || !Conf['JSON Navigation']) {
|
if (g.BOARD.ID === 'f' || g.VIEW === 'catalog' || !Conf['JSON Navigation']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.board = "" + g.BOARD;
|
||||||
this.button = $.el('a', {
|
this.button = $.el('a', {
|
||||||
className: 'index-refresh-shortcut fa fa-refresh',
|
className: 'index-refresh-shortcut fa fa-refresh',
|
||||||
title: 'Refresh',
|
title: 'Refresh',
|
||||||
@ -2595,7 +2596,8 @@
|
|||||||
}
|
}
|
||||||
Navigate.title();
|
Navigate.title();
|
||||||
try {
|
try {
|
||||||
if (req.status === 200) {
|
if (req.status === 200 || Index.board !== ("" + g.BOARD)) {
|
||||||
|
Index.board = "" + g.BOARD;
|
||||||
Index.parse(JSON.parse(req.response), pageNum);
|
Index.parse(JSON.parse(req.response), pageNum);
|
||||||
} else if (req.status === 304 && (pageNum != null)) {
|
} else if (req.status === 304 && (pageNum != null)) {
|
||||||
Index.pageNav(pageNum);
|
Index.pageNav(pageNum);
|
||||||
|
|||||||
@ -2,6 +2,8 @@ Index =
|
|||||||
init: ->
|
init: ->
|
||||||
return if g.BOARD.ID is 'f' or g.VIEW is 'catalog' or !Conf['JSON Navigation']
|
return if g.BOARD.ID is 'f' or g.VIEW is 'catalog' or !Conf['JSON Navigation']
|
||||||
|
|
||||||
|
@board = "#{g.BOARD}"
|
||||||
|
|
||||||
@button = $.el 'a',
|
@button = $.el 'a',
|
||||||
className: 'index-refresh-shortcut fa fa-refresh'
|
className: 'index-refresh-shortcut fa fa-refresh'
|
||||||
title: 'Refresh'
|
title: 'Refresh'
|
||||||
@ -274,7 +276,8 @@ Index =
|
|||||||
Navigate.title()
|
Navigate.title()
|
||||||
|
|
||||||
try
|
try
|
||||||
if req.status is 200
|
if req.status is 200 or Index.board isnt "#{g.BOARD}"
|
||||||
|
Index.board = "#{g.BOARD}"
|
||||||
Index.parse JSON.parse(req.response), pageNum
|
Index.parse JSON.parse(req.response), pageNum
|
||||||
else if req.status is 304 and pageNum?
|
else if req.status is 304 and pageNum?
|
||||||
Index.pageNav pageNum
|
Index.pageNav pageNum
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user