source: DASISH/t5.6/client/trunk/chrome/markingcollection/content/markingcollection/annotator-service/annotations.wired.marker.js @ 2812

Last change on this file since 2812 was 2812, checked in by olof, 11 years ago
File size: 925 bytes
Line 
1var 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.