- Timestamp:
- 05/23/14 13:40:46 (10 years ago)
- Location:
- DASISH/t5.6/client/trunk/chrome/markingcollection/content/markingcollection
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
DASISH/t5.6/client/trunk/chrome/markingcollection/content/markingcollection/annotator-service/annotation-service.js
r4888 r5274 163 163 // Database insert request is true if successful 164 164 // Firebug.Console.log(rtn); 165 annotationProxy.log('called cache stuff'); 165 166 callback.call(undefined, aid); 166 annotationProxy.log('called cache stuff');167 167 168 } 168 169 }); … … 227 228 var xhr = new XMLHttpRequest(); 228 229 xhr.onload = function() { 229 annotationProxy.log("Cache POST status: "+xhr.status); 230 annotationProxy.log("Cache POST status for "+targetURL+": "+xhr.status); 231 annotationProxy.log(xhr.statusText); 230 232 }; 231 233 xhr.open("POST", targetURL, true); … … 242 244 cache+'\n\n' + 243 245 '--'+boundary+'--'; 246 annotationProxy.log(postBody); 244 247 xhr.send(postBody); 245 248 }, … … 264 267 }); 265 268 }, 269 getCacheURL: function (targetURL, callback){ 270 $.ajax({ 271 type: "GET", 272 url: targetURL, 273 dataType: "xml", 274 success: function(xml, textStatus, jqXHR) { 275 $xml = $.parseXML(jqXHR.responseText); 276 277 jQuery($xml).find('cached').each(function() { 278 var cacheURL = this.getAttribute('ref'); 279 callback.call(undefined, cacheURL); 280 }); 281 282 283 } 284 }); 285 }, 266 286 setBackend: function(url) { 267 287 this.backend = url; -
DASISH/t5.6/client/trunk/chrome/markingcollection/content/markingcollection/annotator-service/annotations.wired.marker.js
r4929 r5274 118 118 }); 119 119 }, 120 getCacheURL: function(om_object){ 120 openRemoteCache: function(event){ 121 this.log(event); 122 var oid = bitsAutocacheService.bitsItemView.object.oid; 123 var cacheUrl = this.getCacheURL(oid); 124 125 126 }, 127 getCacheURL: function(oid, tabbed){ 128 var aid = this.getAidFromOid(oid); 129 annotationFramework.getTargets(aid, function(targets){ 130 var targetURL = targets[0]; 131 annotationProxy.log('targets'); 132 annotationProxy.log(targets[0]); 133 annotationFramework.getCacheURL(targetURL, function(cacheURL){ 134 cacheURL += '/stream'; 135 annotationProxy.log('cacheURL'); 136 annotationProxy.log(cacheURL); 137 138 bitsAutocacheService.Common.loadURL(cacheURL,tabbed); 139 }); 140 }); 121 141 122 142 }, -
DASISH/t5.6/client/trunk/chrome/markingcollection/content/markingcollection/autocacheSidebarOverlay.xul
r4927 r5274 122 122 id="bitsItemTreePopupCacheOpenRemote" 123 123 label="&markingcollection.autocache.open.remote;" 124 oncommand=" alert('TODO remote cache')"/>124 oncommand="window.top.annotationProxy.openRemoteCache(event, false);"/> 125 125 <menuitem 126 126 id="bitsItemTreePopupCacheOpenRemoteNewTab" 127 127 label="&markingcollection.autocache.open.remotenewtab;" 128 oncommand=" alert('TODO remote cache in new tab')"/>128 oncommand="window.top.annotationProxy.openRemoteCache(event, true);"/> 129 129 <menuitem 130 130 id="bitsItemTreePopupCacheOpen"
Note: See TracChangeset
for help on using the changeset viewer.