diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-08-26 18:10:28 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-08-26 18:10:28 +0200 |
commit | 4d27a90337e30ce85be9e42c2e7aaed2952d0297 (patch) | |
tree | e4a488e125f9d3f48598d047763f4a04fefdd4e5 | |
parent | 95eef3d20cb801501ae61ba8a3ab148f96f01e59 (diff) | |
download | Ishtar-4d27a90337e30ce85be9e42c2e7aaed2952d0297.tar.bz2 Ishtar-4d27a90337e30ce85be9e42c2e7aaed2952d0297.zip |
Imports: loading indicator
-rw-r--r-- | ishtar_common/static/js/ishtar.js | 22 | ||||
-rw-r--r-- | ishtar_common/static/media/style.css | 21 | ||||
-rw-r--r-- | ishtar_common/templates/base.html | 4 | ||||
-rw-r--r-- | ishtar_common/templates/ishtar/import_list.html | 2 | ||||
-rw-r--r-- | version.py | 2 |
5 files changed, 49 insertions, 2 deletions
diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index f469fc546..4d82cb238 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -108,6 +108,28 @@ $(document).on("click", '#progress-content', function(){ $('#progress').hide(); }); +function long_wait(){ + $('#progress').addClass('long'); + $('#progress').show(); + $('.progress-1').show('slow'); + setTimeout(function(){ + $('.progress-1').hide('slow'); + $('.progress-2').show('slow'); + }, 60000); + setTimeout(function(){ + $('.progress-2').hide('slow'); + $('.progress-3').show('slow'); + }, 120000); + setTimeout(function(){ + $('.progress-3').hide('slow'); + $('.progress-4').show('slow'); + }, 180000); + setTimeout(function(){ + $('.progress-4').hide('slow'); + long_wait(); + }, 240000); +} + var last_window; function load_window(url, speed, on_success){ diff --git a/ishtar_common/static/media/style.css b/ishtar_common/static/media/style.css index 42381afa9..02f4d930b 100644 --- a/ishtar_common/static/media/style.css +++ b/ishtar_common/static/media/style.css @@ -1199,6 +1199,27 @@ input.widget-oa{ padding:10px; } +#progress.long #progress-content{ + background-position:center 20px; + width:130px; + height: auto; + padding-top: 60px; +} + +#progress-content p{ + display: none; + padding: 0; + margin: 0; +} + +#progress.long #progress-content p{ + display: block; +} + +#progress.long #progress-content p.progress-detail{ + display: none; +} + #merge-table{ background-color:#fff; width:700px; diff --git a/ishtar_common/templates/base.html b/ishtar_common/templates/base.html index 1a7c8fa54..b601076fe 100644 --- a/ishtar_common/templates/base.html +++ b/ishtar_common/templates/base.html @@ -122,6 +122,10 @@ </div> <div id="progress"> <div id='progress-content'> + <p class='progress-detail progress-1'>{% trans "Processing..." %}</p> + <p class='progress-detail progress-2'>{% trans "This can be long." %}</p> + <p class='progress-detail progress-3'>{% trans "Time to take a coffee?" %} <i class="fa fa-coffee" aria-hidden="true"></i></p> + <p class='progress-detail progress-4'>{% trans "Time to take another coffee?" %} <i class="fa fa-coffee" aria-hidden="true"></i></p></div> </div> </div> </body> diff --git a/ishtar_common/templates/ishtar/import_list.html b/ishtar_common/templates/ishtar/import_list.html index f5734cf98..55a4ea883 100644 --- a/ishtar_common/templates/ishtar/import_list.html +++ b/ishtar_common/templates/ishtar/import_list.html @@ -55,7 +55,7 @@ </tr> {% endfor %} </table> - <input type="submit" value="{% trans "Validate" %}"/> + <input type="submit" onclick="long_wait();return true;" value="{% trans "Validate" %}" /> </form> {% endif %} </div> diff --git a/version.py b/version.py index 0001d3aa0..bd6b03bde 100644 --- a/version.py +++ b/version.py @@ -1,4 +1,4 @@ -VERSION = (0, 97, 2, 2) +VERSION = (0, 97, 2, 3) def get_version(): |