enhanced "more info" panel

pull/567/head
Justin Richer 2014-03-17 23:21:23 -04:00
parent 515c481d79
commit 1680eaad8c
5 changed files with 13 additions and 3 deletions

View File

@ -248,10 +248,13 @@ var ClientView = Backbone.View.extend({
// hide it
$('.moreInformation', this.el).hide('fast');
$('.toggleMoreInformation i', this.el).attr('class', 'icon-chevron-right');
$('.moreInformationContainer', this.el).removeClass('alert').removeClass('alert-info').addClass('muted');
} else {
// show it
$('.moreInformation', this.el).show('fast');
$('.toggleMoreInformation i', this.el).attr('class', 'icon-chevron-down');
$('.moreInformationContainer', this.el).addClass('alert').addClass('alert-info').removeClass('muted');
}
},

View File

@ -252,12 +252,14 @@ var ApprovedSiteView = Backbone.View.extend({
// hide it
$('.moreInformation', this.el).hide('fast');
$('.toggleMoreInformation i', this.el).attr('class', 'icon-chevron-right');
$('.moreInformationContainer', this.el).removeClass('alert').removeClass('alert-info').addClass('muted');
} else {
// show it
$('.moreInformation', this.el).show('fast');
$('.toggleMoreInformation i', this.el).attr('class', 'icon-chevron-down');
$('.moreInformationContainer', this.el).addClass('alert').addClass('alert-info').removeClass('muted');
}
},
close:function() {

View File

@ -142,12 +142,14 @@ var AccessTokenView = Backbone.View.extend({
// hide it
$('.moreInformation', this.el).hide('fast');
$('.toggleMoreInformation i', this.el).attr('class', 'icon-chevron-right');
$('.moreInformationContainer', this.el).removeClass('alert').removeClass('alert-info').addClass('muted');
} else {
// show it
$('.moreInformation', this.el).show('fast');
$('.toggleMoreInformation i', this.el).attr('class', 'icon-chevron-down');
$('.moreInformationContainer', this.el).addClass('alert').addClass('alert-info').removeClass('muted');
}
},
close:function () {

View File

@ -216,10 +216,13 @@ var WhiteListView = Backbone.View.extend({
// hide it
$('.moreInformation', this.el).hide('fast');
$('.toggleMoreInformation i', this.el).attr('class', 'icon-chevron-right');
$('.moreInformationContainer', this.el).removeClass('alert').removeClass('alert-info').addClass('muted');
} else {
// show it
$('.moreInformation', this.el).show('fast');
$('.toggleMoreInformation i', this.el).attr('class', 'icon-chevron-down');
$('.moreInformationContainer', this.el).addClass('alert').addClass('alert-info').removeClass('muted');
}
},

View File

@ -53,7 +53,7 @@
<script type="text/html" id="tmpl-client-more-info-block">
<% if (client.clientDescription || client.clientUri || client.policyUri || client.tosUri || client.contacts != null && client.contacts.length > 0) { %>
<div class="alert alert-info">
<div class="muted moreInformationContainer">
<%=client.clientDescription%>
<% if (client.clientUri || client.policyUri || client.tosUri || client.contacts) { %>
<div class="toggleMoreInformation" style="cursor: pointer;">