Permalink
Browse files

Add displayTitle for SC.Checkbox which allows the title to be localized.

  • Loading branch information...
1 parent 68829d2 commit fb1565bbacea6e1f4f757fecda6c70e99afc49c2 Colin Campbell committed Jun 8, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 frameworks/core_foundation/mixins/template_helpers/checkbox_support.js
@@ -15,8 +15,12 @@ SC.Checkbox = SC.TemplateView.extend(
title: null,
value: null,
+ displayTitle: function() {
+ return SC.String.loc(this.get('title'));
+ }.property('title').cacheable(),
+
classNames: ['sc-checkbox'],
- template: SC.Handlebars.compile('<label><input type="checkbox">{{title}}</label>'),
+ template: SC.Handlebars.compile('<label><input type="checkbox">{{displayTitle}}</label>'),
didCreateLayer: function() {
var self = this;

0 comments on commit fb1565b

Please sign in to comment.