diff options
| 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 | 
| commit | 82d8f12cf5c408e30416061712ff7a6b01e5c80d (patch) | |
| tree | 65e5003eb95c506a83f9cc7d6490e2c0fbb0b607 | |
| parent | c69e8fc0f386f6572405ca12e5323b559f7386c0 (diff) | |
| download | Ishtar-82d8f12cf5c408e30416061712ff7a6b01e5c80d.tar.bz2 Ishtar-82d8f12cf5c408e30416061712ff7a6b01e5c80d.zip | |
JS gallery: fix infinite loop
| -rw-r--r-- | ishtar_common/static/js/ishtar.js | 4 | 
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 && | 
