From 29e03e9669d5d0c0ed238ba56376aa76ed121258 Mon Sep 17 00:00:00 2001 From: Trevor Elliott Date: Fri, 14 Jun 2013 14:16:20 -0700 Subject: Display the license on the options page --- src/js/fiveui/js/options.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/js') 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({ , ' ' , ' ' , '' - , '<%= name %>' + , '<%= name %><%= license %>' ].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' }); -- cgit v1.2.3