Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
HCSVLAB-1180 Change colour and timeout of home page alert
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-intersect committed Nov 24, 2015
1 parent 9c44c6d commit 1455880
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 5 additions & 1 deletion app/assets/javascripts/alerts.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ $(window).load(function() {
if (alert.length > 0) {
alert.slideDown();

alertTimeout = 9000;
if (alert.hasClass('long-alert')) {
alertTimeout = 20000;
}
var alerttimer = window.setTimeout(function() {
alert.slideUp();
}, 9000);
}, alertTimeout);
$(".alert").click(function () {
window.clearTimeout(alerttimer);
alert.slideUp();
Expand Down
16 changes: 6 additions & 10 deletions app/views/catalog/_home_text.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@
<h2>Above and Beyond Speech, Language and Music</h2>
<h4> A Virtual Lab for Human Communication Science </h4>
</header>
<% if !@hasAccessToEveryCollection and @hasAccessToSomeCollections %>
<div class="alert info">
<a class="close" data-dismiss="alert" href="#">×</a>
<div class="alert long-alert">
<a class="close" data-dismiss="alert" href="#">×</a>
<% if !@hasAccessToEveryCollection and @hasAccessToSomeCollections %>
<p><strong>Welcome!</strong> To gain access to more Collections, visit the <a href="account/licence_agreements" class="alert-link">Licence Agreements</a> page.</p>
</div>
<% elsif !@hasAccessToEveryCollection %>
<div class="info">
<a class="close" data-dismiss="alert" href="#">×</a>
<% elsif !@hasAccessToEveryCollection %>
<p><strong>Welcome!</strong> To gain access to Collections, visit the <a href="account/licence_agreements" class="alert-link">Licence Agreements</a> page.</p>
</div>
<% end %>

<% end %>
</div>

0 comments on commit 1455880

Please sign in to comment.