aboutsummaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
authorGravatar Trevor Elliott <trevor@galois.com>2013-06-14 14:16:20 -0700
committerGravatar Trevor Elliott <trevor@galois.com>2013-06-14 14:16:20 -0700
commit29e03e9669d5d0c0ed238ba56376aa76ed121258 (patch)
tree23652b07e689c639841a904095e6956f0d49f0f5 /src/js
parente2771d771d7be1413a5528f34f2c89cdb7fddbc4 (diff)
Display the license on the options page
Diffstat (limited to 'src/js')
-rw-r--r--src/js/fiveui/js/options.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/js/fiveui/js/options.js b/src/js/fiveui/js/options.js
index 5a4e48d..29b37ed 100644
--- a/src/js/fiveui/js/options.js
+++ b/src/js/fiveui/js/options.js
@@ -318,7 +318,7 @@ fiveui.RuleSetEntry = Backbone.View.extend({
, ' <button class="edit">edit</button>'
, ' <button class="reload">reload</button>'
, '</div>'
- , '<span class="title"><%= name %></span>'
+ , '<span class="title"><%= name %><%= license %></span>'
].join('')),
// render the rule set as its title, with some buttons to edit/remove/reload
@@ -327,8 +327,16 @@ fiveui.RuleSetEntry = Backbone.View.extend({
// render the rule set
var attrs = _.clone(this.model.attributes);
+
+ // add a comma to the license field, if it's present.
+ if(!_.isEmpty(attrs.license)) {
+ attrs.license = ', ' + attrs.license;
+ }
+
this.$rs.html(this.viewRsTemplate(attrs));
+ console.log(attrs.license);
+
button(this.$rs.find('.edit'), { primary: 'ui-icon-pencil' });
button(this.$rs.find('.reload'), { primary: 'ui-icon-refresh' });
button(this.$rs.find('.remove'), { primary: 'ui-icon-close' });