Changeset 4547


Ignore:
Timestamp:
02/24/14 10:13:50 (10 years ago)
Author:
olof
Message:

adding dasish_aid for GET

Location:
DASISH/t5.6/client/trunk/chrome/markingcollection/content/markingcollection/annotator-service
Files:
3 edited

Legend:

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

    r4545 r4547  
    8080           
    8181            aid = rtn[0].dasish_aid;
    82             Firebug.Console.log('Resolved the AID for DELETE for aid: '+aid);
     82            Firebug.Console.log('Resolved the AID for oid: '+oid+' for aid: '+aid);
    8383            if (aid) { // ajax request only for annotations posted to and available in backend database
    8484                return $.ajax({
  • DASISH/t5.6/client/trunk/chrome/markingcollection/content/markingcollection/annotator-service/annotations.wired.marker.js

    r4545 r4547  
    1414                           annotationProxy.log('got Annotation ');
    1515                           annotationProxy.log(result);
     16                           bitsObjectMng.Database.addObject(result, 'dasish.remote', undefined);     
    1617                       });
    1718                    });
  • DASISH/t5.6/client/trunk/chrome/markingcollection/content/markingcollection/annotator-service/conversion.utils.js

    r4545 r4547  
    2929
    3030    var title = $(annotation).find('headline').text().trim();
    31     var body = $(annotation).find('body').text().trim();
     31    var body = $(annotation).find('body').find('xhtml\\:span').text().trim();
    3232    var style = $(annotation).find('body').find('xhtml\\:span').attr('style');
    3333    var type = $(annotation).find('mimeType').text();
    3434    var link = $(annotation).find('link').text();
    3535    var time = $(annotation).find('lastModified').text();
     36
     37    var URI = $(annotation).find('annotation').attr('URI');
     38    om_object.dasish_aid = URI.split('/annotations/')[1];
    3639
    3740    var urlParts = link.split("#xpointer");
     
    5861
    5962    om_object.doc_title = title;
     63    om_object.oid_title = title;
    6064
    6165    om_object.oid = hashCode($(annotation).attr('URI'));
     
    6771
    6872    if (type === 'application/xml+xhtml') { //TODO: better handeling of the body
    69         om_object.oid_txt = body;
     73        om_object.oid_txt = $(annotation).find('body').find('xhtml\\:span').attr('title');
    7074        om_object.oid_type = 'text';
    7175    }
     
    122126                            <xmlBody>\n\
    123127                                <mimeType>application/xml+xhtml</mimeType>\n\
    124                                 <xhtml:span style="' + style + '">' + note + '</xhtml:span>\n\
     128                                <xhtml:span title="'+om_object.oid_txt+'" style="' + style + '">' + note + '</xhtml:span>\n\
    125129                            </xmlBody>\n\
    126130                        </body>\n\
Note: See TracChangeset for help on using the changeset viewer.