summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-02-12 10:25:42 +0100
committerRoeland Jago Douma <rullzer@owncloud.com>2016-02-12 10:25:42 +0100
commitb786523bb7ee25ff784e89692cb77e1f903a90bc (patch)
treef4565b601404f078d4b18bb6c46056349e01e828
parent113bfb0b072f274fca6116153bf3c83d645b21c7 (diff)
downloadnextcloud-server-b786523bb7ee25ff784e89692cb77e1f903a90bc.tar.gz
nextcloud-server-b786523bb7ee25ff784e89692cb77e1f903a90bc.zip
Clear error when removing text
-rw-r--r--core/js/sharedialogview.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js
index 72d57c0c667..ea7e198cb46 100644
--- a/core/js/sharedialogview.js
+++ b/core/js/sharedialogview.js
@@ -67,6 +67,10 @@
/** @type {object} **/
shareeListView: undefined,
+ events: {
+ 'input .shareWithField': 'onShareWithFieldChanged'
+ },
+
initialize: function(options) {
var view = this;
@@ -109,7 +113,18 @@
: 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) {