codeforboston / pantry_pickup

Combining city data with a list of specific needs from food pantries will allow citizens to most effectively make useful and needed donations assisted by the Pantry Pick-Up App.
http://www.pantrypickup.org
21 stars 35 forks source link

message when no pantries are found #50

Closed ohnorobo closed 10 years ago

ohnorobo commented 10 years ago

solves some of #41. I didn't include links in the copy. I'd like to find a better way of doing the inline html.

WheresHJ commented 10 years ago

What is the issue with doing the inline HTML with tags in the append? I assume there's some programmatic reason that it's bad practice?

carpeliam commented 10 years ago

@WheresHJ yep. Reasons are:

  1. JavaScript is for behavior, mark up is for content; gotta keep 'em separated
  2. You can't put sizable chunks of HTML in there, it gets messy fast
  3. You end up having to do things like class=\"noPantries\" because you're putting quotes inside of quotes.. again, gets messy fast
  4. There are other ways of doing this that result in 0 puppy deaths (JavaScript templates)

I can finish this one off, thanks for getting it started!