Skip to content

Commit

Permalink
Item8445: Cleaning up JQuery UI in TagMePlugin for release.
Browse files Browse the repository at this point in the history
Item3867: This commit provides a way to directly add tags without selection.
Item8288: This commit provides a way for admin users, users with topic CHANGE permissions, or everybody (configurable) to remove tags from a topic regardless of vote count.
Item5153: This commit provides a way to add multiple tags without leaving the topic being tagged.
Item8365: This commit fixes the MANIFEST to address missing styleblog files.
Item8343: This commit fixes the MANIFEST to address missing styleblog files.
Item8531: This commit removes minified/compressed files from svn.



git-svn-id: http://svn.foswiki.org/trunk/TagMePlugin@6568 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
PaulHarvey authored and PaulHarvey committed Feb 28, 2010
1 parent 89c7012 commit 7b475ee
Show file tree
Hide file tree
Showing 12 changed files with 289 additions and 282 deletions.
36 changes: 19 additions & 17 deletions data/System/TagMeAjaxHelper.txt
Expand Up @@ -7,20 +7,22 @@
include=".*%URLPARAM{"q"}%.*"
}%
%ENDSECTION{"tagquery"}%
%STARTSECTION{"jqui"}%%JQREQUIRE{"textboxlist"}%%JQREQUIRE{"autocomplete"}%%JQREQUIRE{"simplemodal"}%%JQREQUIRE{"hoverintent"}%%JQREQUIRE{"queryobject"}%%ADDTOHEAD{
"TAGMEPLUGIN::JQUI"
text="<meta name='foswiki.TagMePlugin.jquitags'
content='%TAGME{tpaction="%URLPARAM{"tpaction" default="showalltags"}%"
tag="%URLPARAM{"tptag"}%" web="%BASEWEB%" topic="%BASETOPIC%" separator=","}%'
/><script type='text/javascript' src='%PUBURLPATH%/%SYSTEMWEB%/%TOPIC%/jquery.tagmeui.js'></script>
<link rel='stylesheet' href='%PUBURLPATH%/%SYSTEMWEB%/TagMeAjaxHelper/jquery.tagmeui.css'
type='text/css' media='all'/>"
requires="JQUERYPLUGIN::TEXTBOXLIST, JQUERYPLUGIN::AUTOCOMPLETE, JQUERYPLUGIN::SIMPLEMODAL, JQUERYPLUGIN::HOVERINTENT, JQUERYPLUGIN::QUERYOBJECT"
}%<div id='tagmejqcontainer'><span id="tagmejqtagstatus">&nbsp;</span>
%STARTSECTION{"jqui"}%%JQREQUIRE{"textboxlist"}%%JQREQUIRE{"autocomplete"}%%JQREQUIRE{"simplemodal"}%%JQREQUIRE{"hoverintent"}%%JQREQUIRE{"queryobject"}%%ADDTOZONE{"head"
tag="TAGMEPLUGIN::JQUI:CSS"
text="<meta name='foswiki.TagMePlugin.jquitags' content='%TAGME{tpaction="%URLPARAM{"tpaction" default="showalltags"}%" tag="%URLPARAM{"tptag"}%" web="%BASEWEB%" topic="%BASETOPIC%" separator=","}%' />
<meta name='foswiki.TagMePlugin.remove' content='%IF{"($TAGMEPLUGIN_JQUIREMOVEALL='everybody') OR ($TAGMEPLUGIN_JQUIREMOVEALL='topicchange' AND '%BASEWEB%.%BASETOPIC%' allows 'CHANGE') OR ('%USERNAME%' ingroup 'AdminGroup')" then="all"}%' />
<link rel='stylesheet' href='%PUBURLPATH%/%SYSTEMWEB%/TagMeAjaxHelper/jquery.tagmeui.css' type='text/css' media='all'/>"
requires="JQUERYPLUGIN::TEXTBOXLIST, JQUERYPLUGIN::AUTOCOMPLETE, JQUERYPLUGIN::SIMPLEMODAL, JQUERYPLUGIN::HOVERINTENT, JQUERYPLUGIN::QUERYOBJECT, JQUERYPLUGIN"
}%%ADDTOZONE{"body"
tag="TAGMEPLUGIN::JQUI::JS"
text="<script type='text/javascript' src='%PUBURLPATH%/%SYSTEMWEB%/%TOPIC%/jquery.tagmeui.js'></script>"
requires="JQUERYPLUGIN::TEXTBOXLIST, JQUERYPLUGIN::AUTOCOMPLETE, JQUERYPLUGIN::SIMPLEMODAL, JQUERYPLUGIN::HOVERINTENT, JQUERYPLUGIN::QUERYOBJECT, JQUERYPLUGIN"
}%<div id='tagmejqcontainer'>
<div id="tagmejqcloud" style="display:none"></div>
<span id="tagmejqtag" title="%MAKETEXT{"Click for tag cloud pop-up"}%">
<form id="tagmejqtaglistform" name="tagmeshow" method="post" action="%SCRIPTURLPATH{"viewauth"}%/%WEB%/%TOPIC%">
<span id="tagmejqtagstatus">&nbsp;</span>
<span id="tagmejqtagbutton" title="%MAKETEXT{"Click for tag cloud pop-up"}%">
%MAKETEXT{"Tags"}%&nbsp;</span>
<form name="tagmeshow" method="post" action="%SCRIPTURLPATH{"viewauth"}%/%WEB%/%TOPIC%">
<input type="text" name="add" id="tagmejqinputfield" title="%MAKETEXT{"Enter a tag name to apply to this topic"}%" size="15" value="%TAGME{ tpaction="showalltags" web="%BASEWEB%" topic="%BASETOPIC%"}%"/>
</form></div>%ENDSECTION{"jqui"}%

Expand All @@ -29,13 +31,14 @@
then="%MAKETEXT{"all webs"}%"
else="%MAKETEXT{"[[[_1].WebHome][[_1]]] web" args="%URLPARAM{"tpweb"}%"}%"
}%
<form id="tagmeWebSelect" method="post" action="%SCRIPTURLPATH{"view"}%/%WEB%/%TOPIC%">
<input type="checkbox" id="tagmeCheckboxJustThisWeb" name="tpweb"\
<br/>
<form id="tagmejqWebSelect" method="post" action="%SCRIPTURLPATH{"view"}%/%WEB%/%TOPIC%">
<input type="checkbox" id="tagmejqCheckboxJustThisWeb" name="tpweb"\
value="%URLPARAM{"tpweb"}%" %IF{"'%URLPARAM{"tpweb"}%'=''" then="checked='checked'"}%\
title="%MAKETEXT{"Show tags from all webs"}%"\
/>
<label for="tpweb">%MAKETEXT{"all webs"}%</label> |
<input type="checkbox" id="tagmeCheckboxJustMe" name="tpuser" value="me" \
<input type="checkbox" id="tagmejqCheckboxJustMe" name="tpuser" value="me" \
%IF{"'%URLPARAM{"tpuser"}%'='me'" then="checked='checked'"}%\
title="%MAKETEXT{"Show tags used by me"}%"\
/>
Expand All @@ -45,7 +48,7 @@
<a href="%SCRIPTURLPATH{"view"}%/%SYSTEMWEB%/TagMeDeleteTag"\
title="%MAKETEXT{"Delete tags"}%">%MAKETEXT{"delete..."}%</a>
</form>
<div id="tagmeTagCloud" style="line-height:2em;">
<div id="tagmejqTagCloud" style="line-height:2em;">
%TAGME{tpaction="showalltags"
web="%URLPARAM{"tpweb"}%"
by="%URLPARAM{"tpuser"}%"
Expand All @@ -59,4 +62,3 @@
<!--
* Set NOWYSIWYG = 1
-->

24 changes: 18 additions & 6 deletions data/System/TagMePlugin.txt
Expand Up @@ -64,20 +64,32 @@ An experimental interactive user interface is also provided, implemented using t

All features work without having to re-load the topic:
* Auto-complete tag names. Saves newly selected tags immediately
* If auto-complete fails to match the entered tag and the user submits
it, the tag is immediately created and applied
* The entered tag is created and added even if the tag did not
previously exist.
* Access tag cloud in a modal dialogue at the click of a button. Check-box
toggles are applied immediately (show cloud for just this web/all webs,
just my tags/all tags)
* Clicking a tag from the topic's tag list or tag cloud takes you to
the TagMeSearch topic, where the tag cloud will still be generated
from the originating web (avoids reliance on browser back button
when exploring a web via tag cloud)
* Removing a tag may optionally clear the tag from the current topic
regardless of vote count (default for members of Main.AdminGroup).
* =Set TAGMEPLUGIN_JQUIREMOVEALL &#61; everybody= <br/>
will allow any logged-in user to remove a tag, or
* =Set TAGMEPLUGIN_JQUIREMOVEALL &#61; topicchange= <br/>to only give this
ability to those users who have CHANGE permission on the current
topic (everbody else will still be able to vote down tags as
usual)<br/>
* %ICON{"warning"}%
jqui uses an undocumented feature of TagMePlugin to access the
removeall feature, which does not appear to follow any access
controls internally.

Include it into your WebTopBar (See WebTopBarExample) or any part of your skin that has horizontal space to spare, as follows:
<verbatim class="tml">%INCLUDE{"%SYSTEMWEB%.TagMeAjaxHelper" section="jqui"}%</verbatim>

<div class="foswikiImage"><img src="%ATTACHURLPATH%/jquery.tagmeui.png" alt="Screenshot of experimental jQuery UI" width="522" height="156" /></div>
<div class="foswikiImage"><img src="%ATTACHURLPATH%/jquery.tagmeui.png" alt="Screenshot of experimental jQuery UI" width="493" height="205" /></div>

Dependencies:
* JQueryPlugin
Expand Down Expand Up @@ -198,7 +210,7 @@ The Plugin handles a =%<nop>TAGME{}%= variable that performs different actions.
| =tag="..."= | Name of tag | (required) |
| =nostatus="on"= | Turn off status text shown when a tag is added or voted on | (show status text) |

* =%<nop>TAGME{ tpaction="newtagandadd" ... }%= - create new tag and add tag to topic
* =%<nop>TAGME{ tpaction="newtagsandadd" ... }%= - create new tag and add tag to topic
| *Parameter* | *Comment* | *Default* |
| =tag="..."= | Name of tag. Accepts alphanumeric and underscore characters only (unless =NORMALIZE_TAG_INPUT= is set to 0 to allow any user input) | (required) |

Expand Down Expand Up @@ -373,7 +385,7 @@ topic. Use the standard preference setting topics, such as
| Version: | %$VERSION% |
| Release: | %$RELEASE% |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 31 Jan 2010: | Foswiki:Main.PaulHarvey: Added an interactive user interface implemented with JQuery |
| 31 Jan 2010: | Foswiki:Main.PaulHarvey: Added an interactive user interface implemented with JQuery; ship missing blog style tmpl files; fix docs/implementation of newtagsandadd |
| 11 Jun 2009: | Foswiki port, and moved settings out of this topic |
| 30 Aug 2008: | Foswiki:Main.ColasNahaboo: enhancements to the "blog" style: Bundles, count of known tags, option to delete tags |
| 28 Aug 2008: | Foswiki:Main.ColasNahaboo: prefix & suffix options renamed as header & footer. New parameter style to TAGME to be able to define different UI style for the default "show" action of TAGME. Implemented a first one, "blog" for the simpler case of authors managing the same tags |
Expand Down Expand Up @@ -413,7 +425,7 @@ topic. Use the standard preference setting topics, such as

__Related Topics:__ %SYSTEMWEB%.TagMeViewAllTags, %SYSTEMWEB%.TagMeViewMyTags, %SYSTEMWEB%.TagMeSearch, %SYSTEMWEB%.TagMeDebugViewTags, %SYSTEMWEB%.TagMeDebugSearch, %SYSTEMWEB%.TagMeAjaxHelper, [[%SYSTEMWEB%.Plugins][Plugins]], %SYSTEMWEB%.DeveloperDocumentationCategory, %SYSTEMWEB%.AdminDocumentationCategory, %SYSTEMWEB%.DefaultPreferences, %USERSWEB%.SitePreferences

%META:FILEATTACHMENT{name="jquery.tagmeui.png" attr="h" comment="Screenshot of experimental jQuery UI" date="1264982400" path="jquery.tagmeui.png" size="16289" user="ProjectContributor" version="1.1"}%
%META:FILEATTACHMENT{name="jquery.tagmeui.png" attr="h" comment="Screenshot of experimental jQuery UI" date="1264982400" path="jquery.tagmeui.png" size="27644" user="ProjectContributor" version="1.1"}%
%META:FILEATTACHMENT{name="tag_add.gif" attr="h" comment="Button: add tag" date="1141691885" path="tag_add.gif" size="857" user="ProjectContributor" version="1.1"}%
%META:FILEATTACHMENT{name="tag_remove.gif" attr="h" comment="Button: remove tag" date="1141697484" path="tag_remove.gif" size="862" user="ProjectContributor" version="1.1"}%
%META:FILEATTACHMENT{name="alltagcloud.gif" attr="h" comment="Screenshot of view all tags tag cloud" date="1141693726" path="alltagcloud.gif" size="8087" user="ProjectContributor" version="1.1"}%
Expand Down
4 changes: 2 additions & 2 deletions lib/Foswiki/Plugins/TagMePlugin.pm
Expand Up @@ -35,7 +35,7 @@ use vars qw(
);

our $VERSION = '$Rev$';
our $RELEASE = '01 Feb 2010';
our $RELEASE = '28 Feb 2010';
our $NO_PREFS_IN_TOPIC = 1;
our $SHORTDESCRIPTION =
'Tag wiki content collectively to find content by keywords';
Expand Down Expand Up @@ -1183,7 +1183,7 @@ sub _newTagsAndAdd {
foreach my $tag ( split( ' ', $tags ) ) {
$tag = _makeSafeTag($tag);
if ($tag) {
$args = 'tag="' . $tag . '"';
$args = {tag => $tag};
$text = _newTag($args);
$text = _addTag($args) unless $text =~ /foswikiAlert/;
}
Expand Down
2 changes: 2 additions & 0 deletions lib/Foswiki/Plugins/TagMePlugin/DEPENDENCIES
@@ -0,0 +1,2 @@
Foswiki::Plugins::JQueryPlugin,>=6308,perl,optional
Foswiki::Plugins::FilterPlugin,>=3491,perl,optional
35 changes: 21 additions & 14 deletions lib/Foswiki/Plugins/TagMePlugin/MANIFEST
@@ -1,28 +1,35 @@
data/System/TagMeAjaxHelper.txt 0644
data/System/TagMeChangeRequests.txt 0644
data/System/TagMeCreateNewTag.txt 0644
data/System/TagMeDebugSearch.txt 0644
data/System/TagMeDebugViewTags.txt 0644
data/System/TagMePlugin.txt 0644
data/System/TagMeDeleteTag.txt 0644
data/System/TagMeRenameTag.txt 0644
data/System/TagMeSearch.txt 0644
data/System/TagMeViewAllTags.txt 0644
data/System/TagMeViewMyTags.txt 0644
data/System/TagMeCreateNewTag.txt 0644
data/System/TagMeRenameTag.txt 0644
data/System/TagMeDeleteTag.txt 0644
data/System/TagMeChangeRequests.txt 0644
lib/Foswiki/Plugins/TagMePlugin.pm 0444
lib/Foswiki/Plugins/TagMePlugin.pm 0644
pub/System/TagMeAjaxHelper/Makefile 0644
pub/System/TagMeAjaxHelper/cloudspinner.gif 0644 From http://www.ajaxload.info
pub/System/TagMeAjaxHelper/jquery.tagmeui.uncompressed.css 0644
pub/System/TagMeAjaxHelper/jquery.tagmeui.css 0644
pub/System/TagMeAjaxHelper/jquery.tagmeui.css.gz 0644
pub/System/TagMeAjaxHelper/jquery.tagmeui.uncompressed.js 0644
pub/System/TagMeAjaxHelper/jquery.tagmeui.js 0644
pub/System/TagMeAjaxHelper/jquery.tagmeui.js.gz 0644
pub/System/TagMeAjaxHelper/spinner.gif 0644 From http://www.ajaxload.info
pub/System/TagMeAjaxHelper/tag.png 0644 From FamFamFamSilkIcons
pub/System/TagMePlugin/alltagcloud.gif 0644
#pub/System/TagMePlugin/buttons_gradient.psd 0644
pub/System/TagMePlugin/jquery.tagmeui.png 0644
pub/System/TagMePlugin/tag_add.gif 0644
pub/System/TagMePlugin/tag_addnew.gif 0644
pub/System/TagMePlugin/tag_remove.gif 0644
pub/System/TagMePlugin/tagme.css 0644
pub/System/TagMePlugin/topictags.gif 0644
pub/System/TagMePlugin/jqui.png 0644
pub/System/TagMePlugin/topictags_styleblog.gif 0644
pub/System/TagMePlugin/topictags_styleblog_open.gif 0644
templates/view.tagme.tmpl 0644
templates/view.tagme_styleblogbutton.tmpl 0644
templates/view.tagme_styleblog.tmpl 0644
templates/view.tagme_styleblogbutton.tmpl 0644
templates/view.tagmejquiajax.tmpl 0644
pub/System/TagMeAjaxHelper/jqui.js 0644
pub/System/TagMeAjaxHelper/jqui.css 0644
pub/System/TagMeAjaxHelper/tag.png 0644 From FamFamFamSilkIcons
pub/System/TagMeAjaxHelper/spinner.gif 0644 From http://www.ajaxload.info
pub/System/TagMeAjaxHelper/cloudspinner.gif 0644 From http://www.ajaxload.info
data/System/TagMeAjaxHelper.txt 0644
1 change: 0 additions & 1 deletion pub/System/TagMeAjaxHelper/jquery.tagmeui.css

This file was deleted.

Binary file removed pub/System/TagMeAjaxHelper/jquery.tagmeui.css.gz
Binary file not shown.
17 changes: 0 additions & 17 deletions pub/System/TagMeAjaxHelper/jquery.tagmeui.js

This file was deleted.

Binary file removed pub/System/TagMeAjaxHelper/jquery.tagmeui.js.gz
Binary file not shown.
12 changes: 6 additions & 6 deletions pub/System/TagMeAjaxHelper/jquery.tagmeui.uncompressed.css
@@ -1,13 +1,13 @@
#tagmeTagCloud {
#tagmejqTagCloud {
padding-top: 1em;
}
#tagmejqtagstatus, #tagmejqtag {
float: left;
.jqTextboxListContainer {
display: inline;
}
#tagmejqtag {
#tagmejqtagbutton {
text-decoration: underline;
}
#tagmejqtag:hover {
#tagmejqtagbutton:hover {
color: #C0FFC0;
background-color: #778899;
cursor: pointer;
Expand All @@ -22,7 +22,7 @@
#tagmejqtag.spinning {
background-image: url('cloudspinner.gif');
}
#tagmejqtag {
#tagmejqtagbutton {
background-image: url('tag.png');
background-position: right;
background-repeat: no-repeat;
Expand Down

0 comments on commit 7b475ee

Please sign in to comment.