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