Skip to content

Commit

Permalink
resized messages, success can be closed
Browse files Browse the repository at this point in the history
  • Loading branch information
jonobrien committed Aug 30, 2016
1 parent 4285900 commit 45b6e0d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
4 changes: 4 additions & 0 deletions static/css/my.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 3 additions & 1 deletion static/js/crestCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -18,7 +20,7 @@ function queryCrest(crestURL) {
console.log('[!!] hit preventative rateLimit, wait 1, requery');
rateLimit = 0;
$('#rl').empty();
$('#rl').append('<div class="ui negative message"><i class="warning sign icon"></i> hit rate limit, please reselect tournament</div>');
$('#rl').append('<div class="ui compact negative message"><i class="warning sign icon"></i> rate limit, please reselect tournament</div>');
}
}

Expand Down
10 changes: 9 additions & 1 deletion static/js/tournamentSeries.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,17 @@ function getSeries(url) {
retrieveAndParse(url, parseSeries);
// done parsing, TODO -- loading icon with async support
$('#rl').empty();
$('#rl').append('<div class="ui info message">parse complete</div>');
$('#rl').append('<div class="ui compact info message"><i class="close icon parsed"></i> parse completed successfully</div>'
);
// update footer with series we query from
$('#ft').append("data pulled from <a target='blank' href='"+url+"'>here</a>");

// messages with close icons can be closed
$('.message .close').on('click', function() {
$(this)
.closest('.message')
.transition('fade');
});
}


Expand Down
2 changes: 1 addition & 1 deletion tournaments.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<span class="text">Choose a Tournament</span>
<div id="tourns" class="right menu"></div>
</div>
<div id="rl"></div>
<div class="ui" id="rl"></div>
</div>

<div>
Expand Down

0 comments on commit 45b6e0d

Please sign in to comment.