Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

persistant enabled/disabled on render fix

  • Loading branch information...
commit e09bf51d23fe5403ce7ca46c150d7c4d07b62d63 1 parent 01a1ab7
@jcarrig jcarrig authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/js/time_picker.js
View
9 src/js/time_picker.js
@@ -9,7 +9,10 @@
interval : 30,
// the name given to the text field's input element
- name : null
+ name : null,
+
+ // text field is disabled or enabled
+ disabled : false
},
initialize : function() {
@@ -39,7 +42,8 @@
$(this.el).empty();
this._textField = new Backbone.UI.TextField({
- name : this.options.name
+ name : this.options.name,
+ disabled : this.options.disabled
}).render();
$(this._textField.input).click(_(this._showMenu).bind(this));
$(this._textField.input).keyup(_(this._timeEdited).bind(this));
@@ -76,6 +80,7 @@
},
setEnabled : function(enabled) {
+ this.options.disabled = !enabled;
this._textField.setEnabled(enabled);
},
Please sign in to comment.
Something went wrong with that request. Please try again.