diff options
author | Josh Frye <joshfng@gmail.com> | 2016-02-10 04:21:47 +0300 |
---|---|---|
committer | Josh Frye <joshfng@gmail.com> | 2016-02-10 04:21:47 +0300 |
commit | cf8a74be5fda908fd5c50a9303c44d1f95fadfa2 (patch) | |
tree | 5a75e26cee959d05d07974cbbc354b755c5df95c /app/assets | |
parent | 929b53c6f256b64b19752d0b1ee6acedf37e164b (diff) |
Cleanup to use one selector
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/dashboard.js.coffee | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/dashboard.js.coffee b/app/assets/javascripts/dashboard.js.coffee index 47f86e31751..62143e66cfe 100644 --- a/app/assets/javascripts/dashboard.js.coffee +++ b/app/assets/javascripts/dashboard.js.coffee @@ -1,11 +1,11 @@ @Dashboard = init: -> - $("input#project-filter-form-field,.projects-list-filter").off('keyup') + $(".projects-list-filter").off('keyup') this.initSearch() initSearch: -> @timer = null - $("input#project-filter-form-field,.projects-list-filter").on('keyup', -> + $(".projects-list-filter").on('keyup', -> clearTimeout(@timer) @timer = setTimeout(Dashboard.filterResults, 500) ) @@ -15,7 +15,7 @@ form = null form = $("form#project-filter-form") - search = $("input#project-filter-form-field").val() + search = $(".projects-list-filter").val() project_filter_url = form.attr('action') + '?' + form.serialize() $.ajax @@ -25,7 +25,7 @@ complete: -> $('.projects-list-holder').fadeTo(250, 1) success: (data) -> - $('.projects-list-holder,.public-projects').replaceWith(data.html) + $('.projects-list-holder').replaceWith(data.html) # Change url so if user reload a page - search results are saved history.replaceState {page: project_filter_url}, document.title, project_filter_url dataType: "json" |