Changeset 2836


Ignore:
Timestamp:
04/26/13 11:31:22 (11 years ago)
Author:
olof
Message:

creating annotations and includes css

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/annotations.wired.marker.js

    r2812 r2836  
    66               this.log('annotations from backend: '+JSON.stringify(annotations));
    77           });
    8            
    98        },
    10         putAnnotation: function(annotation) {
    11             var a = om_object2annotation(annotation);
    12             this.log('putAnnotation : '+a);
     9        putAnnotation: function(om_object) {
     10            var annotation = om_object2annotation(om_object);
     11            this.log('putAnnotation : '+annotation);
    1312        },
    1413        updateAnnotation: function(annotation) {
  • DASISH/t5.6/client/trunk/chrome/markingcollection/content/markingcollection/annotator-service/conversion.utils.js

    r2812 r2836  
    4646function om_object2annotation(om_object){
    4747    var note = om_object.oid_property.match(/<NOTE>(.+?)<\/NOTE>/)[1];
     48    var hyperanchor = om_object.oid_property.match(/<HYPER_ANCHOR>(.+?)<\/HYPER_ANCHOR>/)[1];
     49    var style='';
    4850    var timestamp = new Date(om_object.oid_date);
     51   
     52    hyperanchor = unescape(hyperanchor);
     53   
     54    annotationProxy.log('hyperanchor : '+hyperanchor);
     55    hyperanchor.match(/^(.+\([0-9]+\)\([0-9]+\)\([\s\S]*\))&(.+\([0-9]+\)\([0-9]+\)\([\s\S]*\))&(.+)$/);
     56   
     57    style = RegExp.$3;
    4958   
    5059    var path = {};
     
    6675   
    6776    var annotation = '<?xml version="1.0"?>\n\
    68                       <annotation xmlns="http://dasish.eu/ns/addit" timeStamp="'+timestamp.toISOString()+'">\n\
     77                      <annotation \n\
     78                            xmlns="http://dasish.eu/ns/addit" \n\
     79                            xmlns:xhtml="http://www.w3.org/1999/xhtml"\n\
     80                            URI="tempAIDgfgf" \n\
     81                            timeStamp="'+timestamp.toISOString()+'">\n\
     82                        <owner ref="http://dasish.eu/users/how_will_this_be_sent_from_the_client"/>\n\
     83                        <headline>'+om_object.doc_title+'</headline>\n\
     84                        <body type="Note">\n\
     85                            <xhtml:span style="'+style+'">'+note+'</xhtml:span>\n\
     86                        </body>\n\
    6987                        <targetSources>\n\
    70                             <targetSource xml:id="" source="'+om_object.doc_url+xpointer+'"/>\n\
     88                            <action>CREATE_CACHED_REPRESENTATION</action>\n\
     89                            <link>'+om_object.doc_url+xpointer+'</link>\n\
     90                            <version>'+timestamp.toISOString()+'</version>\n\
    7191                        </targetSources>\n\
    72                         <body type="Note">'+note+'</body>\n\
    7392                      </annotation>';
    7493    return annotation;
  • DASISH/t5.6/client/trunk/chrome/markingcollection/content/markingcollection/annotator-service/test

    • Property svn:ignore set to
      log.txt
Note: See TracChangeset for help on using the changeset viewer.