Changeset 4890 for DASISH


Ignore:
Timestamp:
04/04/14 08:49:06 (10 years ago)
Author:
olof.olsson@snd.gu.se
Message:

full annotation update done

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DASISH/t5.6/client/trunk/chrome/markingcollection/content/markingcollection/annotator-service/annotations.wired.marker.js

    r4888 r4890  
    106106        updateFullAnnotation: function(om_object) {
    107107            var aid = this.getAidFromOid(om_object.oid);
    108             this.log('updateFullAnnotation : ' + JSON.stringify(om_object));
    109108            annotationFramework.getAnnotationXml(aid, function(annotation){
    110                 this.log('Got the annotation to update : ');
    111                 this.log(annotation);
    112109                //update the annotation
    113110                var note = om_object.oid_property.match(/<NOTE>(.+?)<\/NOTE>/)[1];
    114                 $(annotation).find('headline').text(om_object.doc_title);
     111                annotation = $.parseXML(annotation);
     112                $(annotation).find('headline').text(om_object.oid_title);
    115113                $(annotation).find('body').find('xhtml\\:span').text(note);
    116                 this.log('THE RAW annotation : ');
    117                 this.log(annotation);
    118                 annotationFramework.putFullAnnotation(aid, annotation);
     114               
     115                var xmlString = (new XMLSerializer()).serializeToString(annotation);
     116
     117                annotationFramework.putFullAnnotation(aid, xmlString);
    119118            });
    120119        },       
Note: See TracChangeset for help on using the changeset viewer.