72 Commits

Author SHA1 Message Date
Stuardo Rodríguez
7c942fd50c fixed #786, checkboxes not working on admin
* fixed the JS
2013-02-27 12:38:21 -05:00
Stuardo Rodríguez
2f9eb4f251 fixed #789, Multiple Hours Entry
* the new extra field is now added right for the new hours
2013-02-27 10:19:44 -05:00
Stuardo Rodríguez
6c7b8bb5d2 partial #377, ability to rearrange order of items
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
2013-02-26 11:56:36 -05:00
arzynik
00869f4b55 updated admin for new jquery libs 2013-02-23 00:02:12 -05:00
Daniel Camargo
3e7c9b6f59 fixed #734 2013-02-22 12:19:05 -03:00
Stuardo Rodríguez
f344a9dd5f fixed #733, Important: Firefox Displays "Recommended Order" At Bottom of Menu
* 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
2013-02-21 10:34:49 -05:00
Stuardo Rodríguez
e3d40408f1 setting sort value = 0 for categories if not defined 2013-02-20 07:43:20 -05:00
arzynik
bded64143e fixed missing + 2013-02-12 13:59:04 -05:00
arzynik
8bfae49e11 removed trailing comma 2013-02-12 13:51:53 -05:00
arzynik
7983f227cd removed trailing comma 2013-02-12 10:33:35 -08:00
Stuardo Rodríguez
41ce854ab5 partial for issue #377, ability to rearrange order of items
* 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
2013-02-12 11:03:21 -05:00
Stuardo Rodríguez
8fc6d789d7 partial for Issue #377, ability to rearrange order of items
* 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
2013-02-11 22:59:18 -05:00
Stuardo Rodríguez
edae74c959 partial #711
* 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
2013-02-11 11:42:26 -05:00
Stuardo Rodríguez
e5560670b3 partial for issue #377, rearrange dishesh
* 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
2013-02-08 10:33:08 -05:00
Stuardo Rodríguez
9e7c75d0d7 partial for issue #22
* 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
2013-02-07 10:35:25 -05:00
Stuardo Rodríguez
1ae2a98788 fixed #681, ability to deactivate a menu item 2013-02-06 15:21:41 -05:00
Stuardo Rodríguez
d870fdd35b checking how to add fields for the sort order 2013-02-06 13:07:47 -05:00
Stuardo Rodríguez
5e0197bbaa fixed #25, closed restaurant countdown
* 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
2013-02-06 10:13:34 -05:00
Stuardo Rodríguez
a8f884005a partial for issue #22 save "delivery" field
* adding the delivery flag to be stored for the restaurant
* adding documentation to fix the bug in the checkbox, for later
2013-01-29 16:06:36 -05:00
Stuardo Rodríguez
ce6b9a0aa4 finish the "add new dish" for issue #22
- better CSS for the dish block form
- dialog to select the category for the new dish
2013-01-28 16:35:06 -05:00
Stuardo Rodríguez
91b0a7bb82 partial for #22
- 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
2013-01-28 14:21:26 -05:00
Stuardo Rodríguez
63f0e4338a issue #22 | enable to add / edit notifications
* 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
2013-01-24 18:25:35 -05:00
Stuardo Rodríguez
59344c71b7 Adding the functionality to add empty notifications in case we get out of inputs
Also it's now loading an empty field per type on load
2013-01-24 15:36:37 -05:00
Stuardo Rodríguez
4d5ed7eace Working in the admmin issue #22
* 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
2013-01-24 12:24:55 -05:00
Daniel Camargo
16db235439 Merge branch 'master' of https://github.com/crunchbutton/crunchbutton 2013-01-22 19:47:27 -02:00
Stuardo Rodríguez
36eac38d0c * loading real file if exists
* adding documentation to the JS saveDishes() method
2013-01-22 16:38:13 -05:00
Stuardo Rodríguez
feec195279 allowing a dish to be changed from category 2013-01-22 16:10:05 -05:00
Daniel Camargo
41cd230545 Merge branch 'master' of https://github.com/crunchbutton/crunchbutton 2013-01-22 18:11:04 -02:00
Stuardo Rodríguez
f674b7eb2d group dishes per category 2013-01-22 14:18:28 -05:00
Daniel Camargo
5c7dd2824e Merge branch 'master' of https://github.com/crunchbutton/crunchbutton 2013-01-22 14:44:47 -02:00
Daniel Camargo
29fea3583a Suggestion - Admin - Issue 635
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.
2013-01-22 14:44:37 -02:00
Stuardo Rodríguez
e83dbd88d8 partial for #22
* 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
2013-01-21 16:53:13 -05:00
Stuardo Rodríguez
e142a1d0e0 fixed #374
* 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
2013-01-11 15:39:17 -05:00
arzynik
a55f1f0d55 fixes #357 2012-12-04 14:12:01 -05:00
arzynik
e37a193fb0 temp fix for restaurant saving 2012-10-18 12:20:09 -04:00
arzynik
91b292b25a wtf 2012-09-27 14:42:25 -04:00
arzynik
6ccc49b7f6 removed any aumated refreshing for shityness 2012-09-27 14:32:39 -04:00
arzynik
2521457515 safe save 2012-09-27 12:33:21 -04:00
arzynik
47ea999912 fixes #324 2012-09-26 16:40:04 -07:00
arzynik
d67bd8a554 fixed new restaurant issues 2012-09-26 11:01:48 -07:00
arzynik
20d58e8932 fixed select issues 2012-09-25 12:44:11 -07:00
arzynik
6a2e82be9b lots of admin saving shit 2012-09-25 10:19:09 -07:00
arzynik
34138c7039 hella admin saving bugs 2012-09-25 00:04:45 -07:00
arzynik
1047038551 fixed some collection and saving issues 2012-09-24 19:20:39 -07:00
arzynik
3242edf564 fixed u hella payment shit 2012-09-24 17:41:17 -07:00
arzynik
8f432b4b64 admin save progress 2012-09-21 08:41:16 -07:00
arzynik
1586e71c51 more admin orer ui tweaks 2012-09-20 16:19:16 -07:00
arzynik
9f68335df9 fixes #292. fixes #16. posible fix for #17. 2012-09-20 15:50:31 -07:00
arzynik
e7d8f686b8 admin: save state 2012-09-18 17:22:33 -04:00
arzynik
2b02808b58 admin ui tweaks 2012-09-18 16:57:28 -04:00