rhodes369/rhodes-ror — pull request #103 by doktorj (2012-04-03 17:39:46+00:00)
Title: major refactor of front end search code

+ after playing with the haml-filter gem for some time and almost getting it to do as i pleased, i decided, instead to do a major refactor and clean up of the public materials.js.coffee (and misc other files), and moved everything into a more proper SearchMaterials class, which now gets called on page load for /materials pages, as well as when any filter changes...so now our material search invokation code isn't split/duplicated in two places, and easier to maintain

+ this also fixed multiple bugs, such as hitting the back button in chrome, keeps to the same results whereas before it was resetting the results, and keeping the filter settings...as well as mats with no images no show up on initial page load (they weren't before until you selected a filter)

+ added a log coffee method to replace all console.log which breaks some browsers