Skip to content

Commit

Permalink
button now highlights based on last issuer used
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Richer committed Mar 14, 2013
1 parent be801cc commit 7d2dd8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ <h2 class="well-small">Sign in</h2>

<script type="text/html" id="tmpl-button">
<div class="span3">
<a class="btn btn-large btn-primary">
<% if (image) { %>
<div><img src="<%=image%>"></div>
<a class="btn btn-large<%= (last_issuer == button.issuer) ? " btn-primary" : ""%>">
<% if (button.image) { %>
<div><img src="<%=button.image%>"></div>
<% } %>
<div>
<i class="icon-user icon-white"></i>
Sign in with <%=descriptor%>
Sign in with <%=button.descriptor%>
</div>
</a>

Expand Down
2 changes: 1 addition & 1 deletion resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ $(function () {
$.each(OIDCproviders, function (key, button) {

// build a button and append it
var $buttonEl = $(button_tmpl(button)).appendTo('#button-container');
var $buttonEl = $(button_tmpl({button: button, last_issuer: last_issuer})).appendTo('#button-container');

// bind a click event
$("a", $buttonEl).click(function () {
Expand Down

0 comments on commit 7d2dd8d

Please sign in to comment.