scope icons now show up everywhere
parent
d0fdf8140e
commit
62b931ee0d
|
@ -80,7 +80,7 @@
|
|||
this.template = _.template($('#tmpl-list-widget').html());
|
||||
}
|
||||
|
||||
this.$el.addClass("table table-condensed table-hover span4");
|
||||
this.$el.addClass("table table-condensed table-hover table-striped span4");
|
||||
this.collection.bind('add', this.render, this);
|
||||
|
||||
},
|
||||
|
@ -221,7 +221,7 @@
|
|||
},
|
||||
|
||||
getByValue: function(value) {
|
||||
var scopes = this.where({value: scope});
|
||||
var scopes = this.where({value: value});
|
||||
if (scopes.length == 1) {
|
||||
return scopes[0];
|
||||
} else {
|
||||
|
@ -340,6 +340,10 @@
|
|||
this.template = _.template($('#tmpl-client').html());
|
||||
}
|
||||
|
||||
if (!this.scopeTemplate) {
|
||||
this.scopeTemplate = _.template($('#tmpl-scope-list').html());
|
||||
}
|
||||
|
||||
this.model.bind('change', this.render, this);
|
||||
|
||||
},
|
||||
|
@ -347,6 +351,8 @@
|
|||
render:function (eventName) {
|
||||
this.$el.html(this.template(this.model.toJSON()));
|
||||
|
||||
$('.scope-list', this.el).html(this.scopeTemplate({scopes: this.model.get('scope'), systemScopes: app.systemScopeList}));
|
||||
|
||||
this.$('.dynamically-registered').tooltip({title: 'This client was dynamically registered'});
|
||||
|
||||
return this;
|
||||
|
@ -750,6 +756,10 @@
|
|||
if (!this.template) {
|
||||
this.template = _.template($('#tmpl-grant').html());
|
||||
}
|
||||
if (!this.scopeTemplate) {
|
||||
this.scopeTemplate = _.template($('#tmpl-scope-list').html());
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
render: function() {
|
||||
|
@ -757,6 +767,8 @@
|
|||
|
||||
this.$el.html(this.template(json));
|
||||
|
||||
$('.scope-list', this.el).html(this.scopeTemplate({scopes: this.options.client.get('scope'), systemScopes: app.systemScopeList}));
|
||||
|
||||
this.$('.dynamically-registered').tooltip({title: 'This client was dynamically registered'});
|
||||
this.$('.whitelisted-site').tooltip({title: 'This site was whitelisted by an adminstrator'});
|
||||
|
||||
|
@ -840,6 +852,10 @@
|
|||
this.template = _.template($('#tmpl-whitelist').html());
|
||||
}
|
||||
|
||||
if (!this.scopeTemplate) {
|
||||
this.scopeTemplate = _.template($('#tmpl-scope-list').html());
|
||||
}
|
||||
|
||||
this.model.bind('change', this.render, this);
|
||||
},
|
||||
|
||||
|
@ -849,6 +865,8 @@
|
|||
|
||||
this.$el.html(this.template(json));
|
||||
|
||||
$('.scope-list', this.el).html(this.scopeTemplate({scopes: this.model.get('allowedScopes'), systemScopes: app.systemScopeList}));
|
||||
|
||||
this.$('.dynamically-registered').tooltip({title: 'This client was dynamically registered'});
|
||||
|
||||
return this;
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
<td>
|
||||
<%=clientId%>
|
||||
<!-- scopes and stuff -->
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
@ -17,6 +16,7 @@
|
|||
<% if (clientDescription) { %>
|
||||
<blockquote><small><%=clientDescription%></small></blockquote>
|
||||
<% } %>
|
||||
<div class="scope-list"></div>
|
||||
<!--expandable future information-->
|
||||
</td>
|
||||
|
||||
|
@ -345,7 +345,10 @@
|
|||
|
||||
<td>
|
||||
<%=whiteList.clientId%>
|
||||
<% if (client.clientDescription) { %>
|
||||
<blockquote><small><%=client.clientDescription%></small></blockquote>
|
||||
<% } %>
|
||||
<div class="scope-list"></div>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
@ -449,7 +452,7 @@
|
|||
|
||||
<div class="well">
|
||||
|
||||
<h3>Sites that have been whitelisted by an administrator<h3>
|
||||
<h3>Sites that have been whitelisted by an administrator</h3>
|
||||
<p>If you revoke them here, they will automatically be re-approved on your next visit.</p>
|
||||
|
||||
<table id="grant-whitelist-table" class="table table-hover table-striped">
|
||||
|
@ -484,8 +487,10 @@
|
|||
|
||||
<td>
|
||||
<%= client.clientName != null ? client.clientName : client.clientId %>
|
||||
<% if (client.clientDescription) { %>
|
||||
<blockquote><small><%=client.clientDescription%></small></blockquote>
|
||||
<!-- put scopes and other info here -->
|
||||
<% } %>
|
||||
<div class="scope-list"></div>
|
||||
</td>
|
||||
|
||||
|
||||
|
@ -682,3 +687,25 @@
|
|||
</div>
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="tmpl-scope-list">
|
||||
|
||||
<%
|
||||
_.each(scopes, function(s) {
|
||||
%>
|
||||
<span class="badge badge-info">
|
||||
<%
|
||||
var ss = systemScopes.getByValue(s);
|
||||
if (ss && ss.get('icon')) {
|
||||
%>
|
||||
<i class="icon-<%=ss.get('icon')%> icon-white"></i>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%=s%>
|
||||
</span>
|
||||
<%
|
||||
});
|
||||
%>
|
||||
|
||||
</script>
|
Loading…
Reference in New Issue