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 ...@@ -68,7 +68,7 @@ class Annotator.Host extends Annotator
_setupXDM: -> _setupXDM: ->
# Set up the bridge plugin, which bridges the main annotation methods # Set up the bridge plugin, which bridges the main annotation methods
# between the host page and the panel widget. # 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', this.addPlugin 'Bridge',
origin: '*' origin: '*'
window: @frame[0].contentWindow window: @frame[0].contentWindow
...@@ -310,10 +310,10 @@ class Annotator.Host extends Annotator ...@@ -310,10 +310,10 @@ class Annotator.Host extends Annotator
width: "#{w}px" width: "#{w}px"
showViewer: (annotations) => 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) => 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 showEditor: (annotation) => @plugins.Bridge.showEditor annotation
......
...@@ -145,7 +145,7 @@ class Hypothesis extends Annotator ...@@ -145,7 +145,7 @@ class Hypothesis extends Annotator
# Set up the bridge plugin, which bridges the main annotation methods # Set up the bridge plugin, which bridges the main annotation methods
# between the host page and the panel widget. # 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', this.addPlugin 'Bridge',
origin: $location.search().xdm origin: $location.search().xdm
window: $window.parent window: $window.parent
...@@ -198,12 +198,12 @@ class Hypothesis extends Annotator ...@@ -198,12 +198,12 @@ class Hypothesis extends Annotator
# Pop out the sidebar # Pop out the sidebar
$rootScope.$apply => this.show()) $rootScope.$apply => this.show())
.bind('showViewer', (ctx, ids) => .bind('showViewer', (ctx, tags=[]) =>
this.showViewer ((@threading.getContainer id).message for id in ids) this.showViewer (@plugins.Bridge.cache[tag] for tag in tags)
) )
.bind('updateViewer', (ctx, ids) => .bind('updateViewer', (ctx, tags=[]) =>
this.updateViewer ((@threading.getContainer id).message for id in ids) this.updateViewer (@plugins.Bridge.cache[tag] for tag in tags)
) )
_setupWrapper: -> _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