* fixing the problem of the admin loading the community and all it's dependencies twice because a naming collition
* replacing $this->community for $this->restaurantCommunity in the admin/restaurant form because of the naming collition
* detecting if the call has been from the admin or from the front end because API calls do not send params
* unifying the return exit in the API _returnRestaurant() action
* sending the $where filters from the API controller instead of detecint it in the models
* sending the $where param in cascade from the API to the Restaurant model to the Category model for the Category->dishes($where) filter
* improving the readability in the bundle where the community is sent, adding documentation about the $view->category variable in the view file
* restored code removed in 49ac22c7d9ac9ccb2845f25fa7963b7225e270cb
* removed the session validation in the model
* saw that the filter could be fetched in the Restaurant->saveDishes(), renamed
a couple of variables to make it more understandable why the filter was removed.
4) no way to change sort order of restaurants, use quick solution with input field
* added the sort value to the restaurant/community table in the _saveRestaurant() action
* added the sort field to the restaurant form
* improved the CSS to align numbers to the right
* refactorize the save restaurant controller, to have the save block in it's own private method
* created a flashMessage static method in the Crunchbutton_Session class to handle the "saved" messages as flash messages.
* creating a flashWidget that returns a JQuery UI widget with the message in the session
* added the flashWidget to the restaurant view
* refactorizing the action to list the restaurants, adding the communities to the action
* add the modal dialog to create a new restaurant
* the dialog shows a form and sends those values to the saveRestaurant existing method
* always load the restaurant page after saving the new data, this is because the same method is used both in the restaurant form as in the new restaurant call
* the admin controller loads the testing community as the default for new restaurants
* the Community model encapsulates the testing community fetching
* the view accepts not setting a default community
* centralize the way the restaurant's fax is fetched
* adding Notification types as class constants to reduce possible bugs
* centralize the way to get the restanurant's email address
* improve code readability in the CSV exporter
* adding restaurant fax and email to the CSV
- action in the api/restaurant controller to set the dishes categories
- method in the Restaurant model to store the categories associated to the restaurant
- improved the way the add category looks in the admin/restaurant view and CSS file
- refactorize the methods in the admin JS app, so the methods were outside every object to be able to use the IDE outliner to show the methods outside the onload function, helps sorting the work folding the methods
- added the _saveCategories() method in the JS admin app to send the categories to the api/restaurant controller
- added the _saveCategories() to the saveRestaurant method
- made the getValues() method a global function to reuse it
- added a App.createCategory() to add a new category in the DOM to be stored later
- the admin app, onLoad method does not define any functions inside it anymore