owncloud-archive / maps

:globe_with_meridians: Maps app for ownCloud
GNU Affero General Public License v3.0
42 stars 20 forks source link

let the user define a name for favorites #85

Closed v1r0x closed 8 years ago

v1r0x commented 8 years ago

After clicking on "add to favorites" a prompt pops up so that the user can enter a name for this favorite marker. In a later PR this could be extended to only prompt if it is not a POI or contact (for POI or contact the app should use the POI's/contact's name as name).

Another part of #9 What do you think? @jancborchardt @Henni @DJaeger

v1r0x commented 8 years ago

Can we merge? Or should I replace anonymous with NULL and set $name to NULL if it is empty?

v1r0x commented 8 years ago

What do you think @jancborchardt @Henni @DJaeger @brantje ?

DJaeger commented 8 years ago

I would use NULL. How would you handle the favorite name, if the user really names it Anonymous?

v1r0x commented 8 years ago

I would use NULL. How would you handle the favorite name, if the user really names it Anonymous?

You're right. I already wanted to edit this, but I moved to a new flat and have no internet there :( ;)

DJaeger commented 8 years ago

:+1:

DJaeger commented 8 years ago

@jancborchardt: Sounds good

v1r0x commented 8 years ago

I replaced Anonymous with NULL and the dialog prompt with a inline input field. What do you guys think?

Henni commented 8 years ago

Why do you store NULL as the string empty in the table?

v1r0x commented 8 years ago

I think you refer to an old commit. Should be replaced by $name

Henni commented 8 years ago

@v1r0x: yes, I actually still had some old entries in the database. Empty names seem to be stored as '' (empty string) which is maybe even better than NULL.

v1r0x commented 8 years ago

'' should be equal to null :)

jancborchardt commented 8 years ago

@v1r0x it’s better! :) However some more enhancements, which maybe should come in a separate PR:

v1r0x commented 8 years ago

So should we merge this one and cover your enhancements in the other issues or a separate PR?

v1r0x commented 8 years ago

@jancborchardt I added two of your enhancements. Replacing "add to favorites" with a star in the upper left is a bit more complicated, because I extract the title of the popup's html code, since I found no other way to access the popup's content. Therefore adding the star would use the star's html code as title. I would cover this in another PR.

I would squash the commits and merge. Is this ok? @jancborchardt @Henni @DJaeger @brantje

jancborchardt commented 8 years ago

Cool with me. :) Just ideally open a follow-up issue then.

Henni commented 8 years ago

:+1: