summaryrefslogtreecommitdiff
path: root/ishtar_common/static/js
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-12-25 12:18:39 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-01-11 17:30:46 +0100
commite923740906861369ef03a02edc788bc59574a803 (patch)
tree65e5003eb95c506a83f9cc7d6490e2c0fbb0b607 /ishtar_common/static/js
parent67ee211d9ec5eb81ea2e19b61772e396fe631820 (diff)
downloadIshtar-e923740906861369ef03a02edc788bc59574a803.tar.bz2
Ishtar-e923740906861369ef03a02edc788bc59574a803.zip
JS gallery: fix infinite loop
Diffstat (limited to 'ishtar_common/static/js')
-rw-r--r--ishtar_common/static/js/ishtar.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js
index a41b718a7..e2a022190 100644
--- a/ishtar_common/static/js/ishtar.js
+++ b/ishtar_common/static/js/ishtar.js
@@ -1039,13 +1039,13 @@ var render_gallery = function(data_table, table_name, nb_select){
while (idx_page <= 5){
if (idx_page <= page_total){
html += render_paginate_button(idx_page, page_current);
- idx_page += 1;
}
+ idx_page += 1;
}
if (page_total > 6){
html += render_paginate_button('...');
}
- html += render_paginate_button(page_total, page_current);
+ if (page_total > 1) html += render_paginate_button(page_total, page_current);
} else {
html += render_paginate_button('...');
if (page_total < page_current + 2 &&