From 45b6e0de7d778e458a2a28aec439c8d5ede60320 Mon Sep 17 00:00:00 2001 From: Jon O'Brien Date: Tue, 30 Aug 2016 10:44:03 -0400 Subject: [PATCH] resized messages, success can be closed --- static/css/my.css | 4 ++++ static/js/crestCache.js | 4 +++- static/js/tournamentSeries.js | 10 +++++++++- tournaments.html | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/static/css/my.css b/static/css/my.css index 7540cad..f51a1d8 100644 --- a/static/css/my.css +++ b/static/css/my.css @@ -8,4 +8,8 @@ /* dropdowns need consistent spacing applied and undecided series have shadows*/ .ui.message { box-shadow: 0 0 0 0; +} +.ui.message>.close.icon { + margin: .3em 0em 0em 0em; + right: .2em; } \ No newline at end of file diff --git a/static/js/crestCache.js b/static/js/crestCache.js index 34b80c6..9743f24 100644 --- a/static/js/crestCache.js +++ b/static/js/crestCache.js @@ -5,6 +5,8 @@ var max = 150; var rateLimit = 0; // max 150 /* * not cached or expired cache, get data + * every 150 requests we forcefully stop as CREST is rate-limited to 150/sec + * so this works for a really simple client-side control of that */ function queryCrest(crestURL) { rateLimit +=1; @@ -18,7 +20,7 @@ function queryCrest(crestURL) { console.log('[!!] hit preventative rateLimit, wait 1, requery'); rateLimit = 0; $('#rl').empty(); - $('#rl').append('
hit rate limit, please reselect tournament
'); + $('#rl').append('
rate limit, please reselect tournament
'); } } diff --git a/static/js/tournamentSeries.js b/static/js/tournamentSeries.js index a9b3c64..786d1f3 100644 --- a/static/js/tournamentSeries.js +++ b/static/js/tournamentSeries.js @@ -26,9 +26,17 @@ function getSeries(url) { retrieveAndParse(url, parseSeries); // done parsing, TODO -- loading icon with async support $('#rl').empty(); - $('#rl').append('
parse complete
'); + $('#rl').append('
parse completed successfully
' + ); // update footer with series we query from $('#ft').append("data pulled from here"); + + // messages with close icons can be closed + $('.message .close').on('click', function() { + $(this) + .closest('.message') + .transition('fade'); + }); } diff --git a/tournaments.html b/tournaments.html index 50ce821..8db97ca 100644 --- a/tournaments.html +++ b/tournaments.html @@ -32,7 +32,7 @@ Choose a Tournament -
+