Commits

athomas  committed e5fd088

Minor fixups.

  • Participants
  • Parent commits 2294c19

Comments (0)

Files changed (2)

File 0.11/tracvote/__init__.py

         vote = self.get_vote(req, resource)
         up = tag.img(src=req.href.chrome('vote/' + self.image_map[vote][0]))
         down = tag.img(src=req.href.chrome('vote/' + self.image_map[vote][1]))
-        if 'VOTE_MODIFY' in req.perm:
+        if 'VOTE_MODIFY' in req.perm and get_reporter_id(req) != 'anonymous':
             down = tag.a(down, id='downvote', href=req.href.vote('down', resource),
                          title='Down-vote')
             up = tag.a(up, id='upvote', href=req.href.vote('up', resource),
                             'in the context navigation bar.')
                 req.session['shown_vote_message'] = True
         body, title = self.format_votes(resource)
-        votes = tag.span(body, id='votes', title=title)
+        votes = tag.span(body, id='votes')
         add_stylesheet(req, 'vote/css/tracvote.css')
-        add_ctxtnav(req, tag.span(up, votes, down, id='vote'))
+        add_ctxtnav(req, tag.span(up, votes, down, id='vote', title=title))
 
     def normalise_resource(self, resource):
         if isinstance(resource, basestring):

File 0.11/tracvote/htdocs/js/tracvote.js

 
       $('#upvote img').attr('src', result[0]);
       $('#downvote img').attr('src', result[1]);
-      $('#votes').attr('title', result[3]).empty().prepend(result[2]);
+      $('#vote').attr('title', result[3])
+      $('#votes').empty().prepend(result[2]);
       $(button).blur();
     });
     return false;