app/assets/javascripts/global_search.js.coffee in tawork-0.0.21 vs app/assets/javascripts/global_search.js.coffee in tawork-0.0.22
- old
+ new
@@ -1,13 +1,17 @@
class window.GlobalSearch extends Backbone.View
events:
'keyup #global-search': 'search'
+ 'submit form': "submit"
initialize: (options = {}) ->
@$field = $("#global-search")
@$results = $("#global-search-results")
@$results.css
right: @$field.offset().left - @$field.outerWidth() - @$results.outerWidth()
+
+ submit: (event) ->
+ false
search: (event) ->
value = $.trim @$field.val()
return @clear() if value.length == 0