Clear error when removing text
This commit is contained in:
parent
113bfb0b07
commit
b786523bb7
|
@ -67,6 +67,10 @@
|
||||||
/** @type {object} **/
|
/** @type {object} **/
|
||||||
shareeListView: undefined,
|
shareeListView: undefined,
|
||||||
|
|
||||||
|
events: {
|
||||||
|
'input .shareWithField': 'onShareWithFieldChanged'
|
||||||
|
},
|
||||||
|
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
var view = this;
|
var view = this;
|
||||||
|
|
||||||
|
@ -109,7 +113,18 @@
|
||||||
: options[name];
|
: options[name];
|
||||||
}
|
}
|
||||||
|
|
||||||
_.bindAll(this, 'autocompleteHandler', '_onSelectRecipient');
|
_.bindAll(this,
|
||||||
|
'autocompleteHandler',
|
||||||
|
'_onSelectRecipient',
|
||||||
|
'onShareWithFieldChanged'
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
|
onShareWithFieldChanged: function() {
|
||||||
|
var $el = this.$el.find('.shareWithField');
|
||||||
|
if ($el.val().length < 2) {
|
||||||
|
$el.removeClass('error').tooltip('hide');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
autocompleteHandler: function (search, response) {
|
autocompleteHandler: function (search, response) {
|
||||||
|
|
Loading…
Reference in New Issue