Permalink
Browse files

Fixed the links on the 'delete tag' icons on the plugin pages - they …

…were hard-coded to use Prototype, but now I use a <g:remoteLink> tag.
  • Loading branch information...
1 parent 6ecdb35 commit 698f8664340aba427e2ec179bc57db98b256d3bf @pledbrook pledbrook committed Feb 3, 2011
Showing with 13 additions and 4 deletions.
  1. +5 −4 grails.org/grails-app/views/plugin/_tags.gsp
  2. +8 −0 grails.org/web-app/css/new/pluginInfo.css
@@ -2,15 +2,16 @@
<g:each var='tag' in="${plugin.tags.sort()}">
<span class="tag"><g:link action="browseByTag" params="[tagName: tag]">${tag}</g:link>
<g:if test="${!disabled}">
+ <g:set var="imgTag"><img id="remove_${tag}_tag_from_${plugin.id}" src="${resource(dir: 'images/famfamfam', file: 'delete.png')}"/></g:set>
+
%{-- If logged in, we're going to attach the normal ajax click listener --}%
<shiro:isLoggedIn>
- <g:set var='clickHandler'>
- onclick="new Ajax.Updater('pluginTags','${createLink(controller:'plugin',action:'removeTag',id:plugin.id,params:[tagName:tag])}',{asynchronous:true,evalScripts:true,method:'POST'});"
- </g:set>
+ <g:remoteLink class="iconLink" update="pluginTags" controller="plugin" action="removeTag" id="${plugin.id}" params="[tagName: tag]">
+ ${imgTag}</g:remoteLink>
</shiro:isLoggedIn>
- <img ${clickHandler} id="remove_${tag}_tag_from_${plugin.id}" src="${createLinkTo(dir: 'images/famfamfam', file: 'delete.png')}"/>
%{-- If not logged in, we'll add a custom listener that will defer to login form --}%
<shiro:isNotLoggedIn>
+ ${imgTag}
<script>
YAHOO.util.Event.onDOMReady(function() {
// on show, put the dialog in the right place
@@ -248,6 +248,14 @@ ul.actionBar li {
background-color:#E8E8E8;
padding:3px;
}
+#pluginTags span a.iconLink {
+ border: none;
+ background-color: transparent;
+ padding: 0.2em;
+}
+#pluginTags span a.iconLink img {
+ margin-bottom: -0.3em;
+}
#ratingDisplay {
z-index:999;
}

0 comments on commit 698f866

Please sign in to comment.