aaltowebapps / zouba

Github repository for the Team 14
3 stars 0 forks source link

[locations] make editor view #18

Open davidmaxwaterman opened 12 years ago

davidmaxwaterman commented 12 years ago

The locations view needs some way for the user to add a new location. At the moment, the information is hard coded, but there needs to be some way to enter that.

The way I see this working is :

The Locations view is a listview where each list item is a location. Each of these locations, when clicked, could expand in some way - perhaps it could be an accordion :

http://jquerymobile.com/test/docs/content/content-collapsible-set.html

and the name and address would be shown below it.

By default, the name and address would be just list items, but the page's header has an 'Edit' button which could change the view into edit mode allowing the user to change the values.

When the list is all compacted (ie no items are expanded) the header's edit button could be labelled 'new' and clicking on it will add a new list item at the top of the list, expanded with empty name and address in edit mode. Typing in the 'name' field would change the text on the button itself, and compacting the item will cause it to save (or could be save on focusout?).

mdenti commented 12 years ago

we could make it so that the fields are editable whenever the location is expanded (there was a way to do it, we did it for the TimeTracker exercise iirc, and it saved on focusout). Though I wouldn't put the new button only when the locations are all collapsed, it may not be the most intuitive thing for a user..