hailwood / jQuery-Tagit

The Jquery Tagit Plugin transforms an html unordered list into a unique tagging plugin.
264 stars 109 forks source link

Features: tagit-label and tags edit support #60

Closed AAverin closed 11 years ago

AAverin commented 12 years ago

Implemented tags edit feature, added a couple of fixes. Details:

small fixes:

  1. 'style' is now cleared after highlight animation, so it no longer messes with other things you want to style.

features:

  1. each tag label is now marked as 'tagit-label' class - simplifies use of ellipsis for tags and etc.
  2. option 'editable', methods _edit and _postEdit were added

Edit logic: if 'editable=true' click on a tag:

Anyway, all this is in code, some comments were also added. With lots of css changes for tagit in my project I wasn't able to add sample styles for: 'tagit-edit', 'hidden', 'edited', 'tagit-label' I hope you will figure our yourself how to style these parts.

Changes were also added to tagit-themeroller, although weren't tested, so be careful when using.

AAverin commented 12 years ago

Great, all my commits stack in this pull request=)

Added a fix for #61

hailwood commented 11 years ago

Any reason you closed the pull request?

AAverin commented 11 years ago

I've played a little with branches in my repo, spliiting fixes for editing into separate one and adding another branch for more fixes from me. Thought that changing branches could affect this pull request, so I closed it and made a new one. Sorry if that made understanding more difficult - still learning github

hailwood commented 11 years ago

Oh ok, that makes sense, apologies for being so slow at merging in the changes, I just need to take the time to check the commits as people have a habit of not applying the edits to both the themeroller and non-themeroller versions!

Although it looks like all yours have both files edited. Your changes are quite substantial, so if you could ensure that your changes work in both the themeroller and non-themeroller versions I will merge all your changes in as I don't have time to check at the moment, so busy with work!

AAverin commented 11 years ago

Testing themeroller might be a bit difficult - the project I currently use tagit on doesn't use themeroller at all. I just merged my changes from tagit.js to tagit-themeroller.js in comparison tool, so not sure if it works fine. Maybe someone with project on Themeroller could help us test this editing feature? I'm pretty sure other plugin users should like tag edit support=)

hailwood commented 11 years ago

Yeah, I am sure they would too, I actually have a big rewrite planned for tagit when I get the chance, to include proper callbacks etc. and tag editing was one of the features I had planned.

As for testing, I am planning on adding unit testing to the repo, but for now is there any reason that using the demo page that is included won't work?

AAverin commented 11 years ago

Haven't thought about demo page=) Added some styles and an editable demo to demopage, see my pull request. Seems like themeroller is ok, although you might want to play with styles a little - editing is a bit jumpy now.