forked from ioncache/Tag-Handler
-
Notifications
You must be signed in to change notification settings - Fork 1
Tag Handler is a jquery plugin used for managing tag-type metadata.
License
Dodger77/Tag-Handler
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
jQuery Tag Handler v1.0 Copyright (C) 2010 Mark Jubenville Mark Jubenville - ioncache@gmail.com http://ioncache.github.com/Tag-Handler Development time supported by: Raybec Communications http://www.raybec.com http://www.mysaleslink.com Based heavily on: Tag it! by Levy Carneiro Jr (http://levycarneiro.com/) http://levycarneiro.com/projects/tag-it/example.html http://github.com/levycarneiro/tag-it http://plugins.jquery.com/project/tag-it Tag icons/cursors converted from: From the famfamfam.com Silk icon set: http://www.famfamfam.com/lab/icons/silk/ Loader image created at: Preloaders.net http://preloaders.net/ ---------------------------------------------------------------------------- Description ---------------------------------------------------------------------------- Tag Handler is a jquery plugin used for managing tag-type metadata. Tag Handler must be attached to one or more <ul> tags in your HTML. To add a tag, click on the tag box, type in a name, and hit enter or comma. Tags may be removed from the tag box by hitting backspace or clicking on the tag. Tag Handler may receive a list of tags when initialized or by pulling data via ajax from a supplied URL. It may also post back a list of tags to a separately specified URL. If tags are retrieved with the a URL, the server must supply a JSON formatted string with an array titled 'availableTags' and optionally an array titled 'assignedTags'. The 'availableTags' array will populate the autocomplete list for the tag input field, and the list of 'assignedTags' will be added as tags to the tag container. If tags are updated via ajax, then an array of tags will be sent back to the updateURL named 'tags'. You may also specify any additional data to be sent with the updateData option. A sample CSS file is included that can be used to help with formatting tags. ---------------------------------------------------------------------------- Plugin Examples ---------------------------------------------------------------------------- Example 1: The Tag Handler will be initialized with no options and no default tags: $("#tag_container").tagHandler(); Example 2: The Tag Handler will be initialized with preset tags from the assignedTags and availableTags arrays, and autocomplete witll be turned on: $("#tag_container").tagHandler({ assignedTags: [ 'Perl' ] , availableTags: [ 'C', 'C++', 'C#', 'Java', 'Perl', 'PHP', 'Python' ], autocomplete: true }); Example 3: The Tag Handler will be initialized and pull data via ajax, also sending some data to the server: $("#tag_container").tagHandler({ getData: { 'id': user_id, 'type': 'user' }, getURL: '/get_record_tags', autocomplete: true }); ---------------------------------------------------------------------------- Plugin Options ---------------------------------------------------------------------------- Tag data options: assignedTags: optional array to use for assignedTags: default: [] availableTags: optional array to use for availableTags: default: [] getData: data field with info for getURL - default: '' getURL: URL to get tag list via ajax - default: '' updatetData: data field with info for updateURL - default: '' updateURL: URL to update tag list via ajax - default: '' Misc options: allowEdit: indicates whether the tag list is editable - default: true autocomplete: requires jqueryui autocomplete plugin - default: false autoUpdate: indicates whether updating occurs automatically whenever a tag is added/deleted. If set true, the save button will not be shown - default: false className: class to add to all tags - default: 'tagHandler' debug: turns debugging on and off - default: false delimiter: extra delimiter to use to separate tags - default: '' Note: enter and comma are always allowed sortTags: sets sorting of tag names alphabetically - default: true ---------------------------------------------------------------------------- To Do ---------------------------------------------------------------------------- Error checking of some sort should be added to the ajax methods. ---------------------------------------------------------------------------- License ---------------------------------------------------------------------------- This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see < http://www.gnu.org/licenses/ >.
About
Tag Handler is a jquery plugin used for managing tag-type metadata.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published