public/js/views/mixins/search.js in conjur-asset-ui-1.3.1 vs public/js/views/mixins/search.js in conjur-asset-ui-1.3.2
- old
+ new
@@ -1,22 +1,15 @@
-/* global conjur */
-
(function(conjur) {
'use strict';
- this.Search = {
- handleSubmit: function() {
+ conjur.views.mixins.Search = {
+ handleSubmit: function(e) {
var search = this.refs.input.getDOMNode().value;
- if (search && search.length !== 0) {
- conjur.app.router.navigate('/ui/search/' + window.encodeURIComponent(search),
- {trigger: true});
+ if (search && search.length != 0) {
+ conjur.app.router.navigate('/ui/search/' + encodeURIComponent(search), {trigger: true});
}
return false;
}
};
-
-}).bind(conjur.views.mixins)
-(
- conjur
-);
+})(conjur);