Commit 4655615b authored by csillag's avatar csillag

Don't pass ID to host frame. Use 16329tag for everything. Fixes #689.

parent 49515e57
......@@ -68,7 +68,7 @@ class Annotator.Host extends Annotator
_setupXDM: ->
# Set up the bridge plugin, which bridges the main annotation methods
# between the host page and the panel widget.
whitelist = ['diffHTML', 'diffCaseOnly', 'quote', 'ranges', 'target', 'id', 'references']
whitelist = ['diffHTML', 'diffCaseOnly', 'quote', 'ranges', 'target', 'references']
this.addPlugin 'Bridge',
origin: '*'
window: @frame[0].contentWindow
......@@ -310,10 +310,10 @@ class Annotator.Host extends Annotator
width: "#{w}px"
showViewer: (annotations) =>
@panel?.notify method: "showViewer", params: (a.id for a in annotations)
@panel?.notify method: "showViewer", params: (a.$$tag for a in annotations)
updateViewer: (annotations) =>
@panel?.notify method: "updateViewer", params: (a.id for a in annotations)
@panel?.notify method: "updateViewer", params: (a.$$tag for a in annotations)
showEditor: (annotation) => @plugins.Bridge.showEditor annotation
......
......@@ -145,7 +145,7 @@ class Hypothesis extends Annotator
# Set up the bridge plugin, which bridges the main annotation methods
# between the host page and the panel widget.
whitelist = ['diffHTML', 'diffCaseOnly', 'quote', 'ranges', 'target', 'id', 'references']
whitelist = ['diffHTML', 'diffCaseOnly', 'quote', 'ranges', 'target', 'references']
this.addPlugin 'Bridge',
origin: $location.search().xdm
window: $window.parent
......@@ -198,12 +198,12 @@ class Hypothesis extends Annotator
# Pop out the sidebar
$rootScope.$apply => this.show())
.bind('showViewer', (ctx, ids) =>
this.showViewer ((@threading.getContainer id).message for id in ids)
.bind('showViewer', (ctx, tags=[]) =>
this.showViewer (@plugins.Bridge.cache[tag] for tag in tags)
)
.bind('updateViewer', (ctx, ids) =>
this.updateViewer ((@threading.getContainer id).message for id in ids)
.bind('updateViewer', (ctx, tags=[]) =>
this.updateViewer (@plugins.Bridge.cache[tag] for tag in tags)
)
_setupWrapper: ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment