#107 ✓resolved
Kieran P

Adding tags via item show page

Reported by Kieran P | October 23rd, 2008 @ 10:38 AM | in 1.2

  • When a user view an item they can click a + button in the tags div.
  • A text field becomes visible which, when typed into, presents a list of possible tags based on current input via AJAX calls
  • When the appropriate tag is found, and "add tag" button is clicked, using AJAX, and updated the tags list once complete.

Comments and changes to this ticket

  • Walter McGinnis

    Walter McGinnis October 23rd, 2008 @ 11:23 AM

    Just to be clear, it should create a new tag if the user's input is different from any existing tag.

    There is an interesting wrinkle... should we allow comma separated list of tags in this text input.

    My inclination is yes, so you will want to take that into account with your ajax calls. In other words, the ajax should only take as input value to check against the anything after the last comma in the text input. The trick might be in avoiding overwriting everything up to the last comma. Make sense?

    Cheers, Walter

  • Kieran P

    Kieran P October 23rd, 2008 @ 11:40 AM

    Just to be clear, it should create a new tag if the user's input is different from any existing tag.

    The acts_as_taggable on can take a list and pull the unqiue tags, so "this, that, this" will come out as "this, that".

    My plan was to tag a list of tags, and add it to the end of the existing ones "this, that, new, ones" and run it though the item update.

    Should take care of the rest.

    There is an interesting wrinkle... should we allow comma separated list of tags in this text input.

    My inclination is yes, so you will want to take that into account with your ajax calls. In other words, the ajax should only take as input value to check against the anything after the last comma in the text input. The trick might be in avoiding overwriting everything up to the last comma. Make sense?

    It makes sense. I'm using a preexisting ajax autocomplete plugin, so by simply adding :tokens => ',', its already working like that.

    I love Rails ^^ I'd have had to do everything by hand with PHP ^^

    Regards Kieran

  • Kieran P

    Kieran P November 18th, 2008 @ 09:06 AM

    • State changed from “new” to “resolved”

    Work has been merged into master. Resolving ticket.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Kete was developed by Horowhenua Library Trust and Katipo Communications Ltd. to build a digital library of Horowhenua material.

People watching this ticket

Pages