Line | |
---|
1 | var annotationProxy = (function() { |
---|
2 | return { |
---|
3 | getAnnotations: function(url) { |
---|
4 | this.log('getAnnotations for: '+url); |
---|
5 | annotationFramework.getAnnotations({url:url}, function(annotations){ |
---|
6 | this.log('annotations from backend: '+JSON.stringify(annotations)); |
---|
7 | }); |
---|
8 | |
---|
9 | }, |
---|
10 | putAnnotation: function(annotation) { |
---|
11 | var a = om_object2annotation(annotation); |
---|
12 | this.log('putAnnotation : '+a); |
---|
13 | }, |
---|
14 | updateAnnotation: function(annotation) { |
---|
15 | this.log('updateAnnotation : '+JSON.stringify(annotation)); |
---|
16 | }, |
---|
17 | log: function(message){ |
---|
18 | //log this to the local proxy |
---|
19 | $.ajax({ |
---|
20 | type: "POST", |
---|
21 | url: 'http://localhost/annotations/annotator-service/test/proxy.php', |
---|
22 | data: {log:'true',message:message} |
---|
23 | }); |
---|
24 | } |
---|
25 | } |
---|
26 | }()); |
---|
Note: See
TracBrowser
for help on using the repository browser.