Changeset 3418
- Timestamp:
- 08/19/13 14:53:47 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DASISH/t5.6/client/trunk/chrome/markingcollection/content/markingcollection/annotator-service/test/mockjax/mockjax-xml.js
r3402 r3418 41 41 }); 42 42 43 // Mock for Responding GET api/annotations/AID20130809151651 (annot-0003-GET.xml) 44 $.mockjax({ 45 url: '/api/annotations/AID20130809151651', 46 type: 'GET', 47 dataType: 'xml', 48 responseTime: 750, 49 proxy: 'mocks/annot-0003-GET.xml', 50 }); 51 52 // Mock for Responding GET api/annotations/AID20130816145322 (annot-0004-GET.xml) 53 $.mockjax({ 54 url: '/api/annotations/AID20130816145322', 55 type: 'GET', 56 dataType: 'xml', 57 responseTime: 750, 58 proxy: 'mocks/annot-0004-GET.xml', 59 }); 60 61 // Mock for Responding GET api/annotations/AID20130816170015 (annot-0005-GET.xml) 62 $.mockjax({ 63 url: '/api/annotations/AID20130816170015', 64 type: 'GET', 65 dataType: 'xml', 66 responseTime: 750, 67 proxy: 'mocks/annot-0005-GET.xml', 68 }); 69 43 70 var XMLData = function() { 44 71 return { … … 62 89 var aidArr = []; 63 90 var aid_string = ""; 91 64 92 $xml.find('annotations annotation').each(function() { 65 aidArr.push($(this).attr('ref').substr(29)); // http://dasish.eu/annotations/ is erased 93 $aid_uri = $(this).attr('ref'); 94 aidArr.push($aid_uri.substr($aid_uri.lastIndexOf('/')+1)); // http://dasish.eu/annotations/ is erased 66 95 }); 67 96 … … 83 112 84 113 var body = ""; 114 var aid = ""; 115 85 116 $xml.find('annotation').each(function() { 86 117 body = $(this).find('body').text(); 118 aid = $(this).attr('URI').substr($(this).attr('URI').lastIndexOf('/')+1); 87 119 88 $('#xmlContents').append("<br /><br /><strong>Body content of " + aid Arr[i]+ ":</strong><br /><em>" + body + "</em>");120 $('#xmlContents').append("<br /><br /><strong>Body content of " + aid + ":</strong><br /><em>" + body + "</em>"); 89 121 90 122 var om_object = annotation2om_object(this);
Note: See TracChangeset
for help on using the changeset viewer.