fixed:
- remove a category
- move the elements to another category before deleting the category
* add the delete logic for the categories not sent by the JS to the Restaurant->saveCategories() model
* added a simple UI functionality to trigger the jquery ui buttons hover effects,
* added the delete category button and set a style for it
* added a dialog when the delete category button is clicked, it shows the form for the category that will handle the existing dishes
* created the deleteCategory method that moves the dishes from one category to another and that removes the existing category from the DOM
* fixed a problem with the dish category dialog
* database table for categories, sort field can't be null, 0 by defaylt
ALTER TABLE `category` CHANGE `sort` `sort` INT( 11 ) NOT NULL DEFAULT '0';
* preset the sort value for new categories to list them at the bottom
* make the dish options to be returned using the return value
* made the SQL query to fetch the options readable
* added the sort value to be stored in the Restaurant model
* added style to the CSS to make it clear what the sort field was used for
* added the sort value to be sent when storing the options
* added the sort field to the option form
* return the categories for a restaurant, order by the sort field
* improved the way the field forms are shown, using the new CSS class labeled-fields
* added the category input fields to be able to rename and resort the category
* changed the JS to add the new fields to the API call to store the category changes
* reorder the restaurant form page to make it look more like a standard page
* save button now stores all the restaurant information
* on save-button click, a dialog is shown to lock the page
* the save button will always reload the page with the stored information
* added protected _jsonBoolean() metod to turn json boolean values to something Cana_Table understood to disable the items
* added the sort field to the array of data to be send
* improved the way the dish form looks like because of the different fields
* added the sort form field to the admin.js and the sort value to the saveDishes() js action
* 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
* added new CSS rule for the about-to-close tag
* fixed wrong regex for restaurant pages with the '$comunity/' URL (notice the slash at the end)
* added the restaurant tag in the App.page.community() JS form
* moved the admin.js loadRestaurant() method to a named function
* added the restaurant.js isAboutToClose() method
- 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
* the API for restaurant stores now the notifications
* The restaurant model stores now the notifications
* detect the notification to know what type of notification it is to store it in as the right type
* restaurant model includes now the notification models assigned to it
* the notifications in the restaurant model are filtered by active only if the admin is not logged in
* the notifications in the restaurant model now accept a where filter
* prototype for the notifications form
* included the notifications.js model
* added the admin.js method to populate the notifications form
* loading the notifications in the restaurant.js model
Issue 635: Suggestion.
Added the Suggestion's model.
Added the Suggestion's controller.
Added some Suggestion's viewers.
Added the Suggestion's options at the admin menu.
Added some CSS classes at the admin.css.
Added the object App.suggestions at the admin.js file.
* item descriptions are now being stored
* improved the CSS for the admin at 1024x768
* adding helper to identify Restaurant model in the controller
* fixed the JS that was wrongly displaying the stored description
* added margin in the admin/restaurant hours fields to make space, not with as it looked bad
* removed the in the admin/restaurant hours fields as they were looking bad for the new element, and the code was complex to read
* removed the 2nd param sent to the App.unFormatTime() to store 24:00 instead of 00:00 for the closing hour, reverting the changes from 09/09/2012 as they didn't work