Closed (fixed)
Project:
Annotator
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
18 Jun 2013 at 00:51 UTC
Updated:
7 Jul 2014 at 14:20 UTC
Jump to comment: Most recent
I've tried Zen and Pixture_reload themes, the annotation bar on the page top disappeared. But when I switch back to Bartik(or Responsive Bartik), the bar comes back.
Comments
Comment #1
drupalok commentedsame here. fully functional only in BARTIK
i can add annotations in ZEN but they are not stored... which annotation bar are you talking about?
Comment #2
BrockBoland commentedIt's not the theme, but the selector. annotator.js enables annotator with this line:
Drupal.Annotator = $('.node .content').annotator();The problem is that not all themes have divs (or other elements) with the
nodeandcontentclasses.nodeseems to be pretty standard, butcontentis often omitted (this is true in Zen).There might be a couple issues in play here, though. For example, @drupalok: if this selector were the culprit, you wouldn't even be able to make annotations, let alone store them. And like you, I'm not sure what bar @fishfree is referring to.
If it's just plain not doing anything, though, this jQuery selector could be the problem. Here's one thing you can try: open
js/annotator.jsin the annotator module directory, and change that selector to only look for.node:Drupal.Annotator = $('.node').annotator();Clear your caches (to account for aggregated JS, if enabled), and check if you now get the annotation pop-up when you select text. Keep in mind that leaving this selector in place might not be a great idea: annotations will be available anywhere on your site that the
nodeclass is used, whether it's on the node page, in a teaser, or inside a View (and because of the way annotations are stored, adding them from the teaser or a View will not work correctly).In order to more permanently solve this, I wonder if it would make sense to add an option in the config form to change the selector that's used.
Comment #3
shenzhuxi commentedI made it configurable now and set '.node' as the default value.