Show
Ignore:
Timestamp:
30.04.2013 20:15:30 (7 years ago)
Author:
ak19
Message:

Preliminary working version of display of existing user comments. Tested and works. Need to optimise it so that we don't repeatedly ask for each username, comment and timestamp from the archives (by calling the new getArchivesMeta function in gsajaxapi), but instead need to be able to ask for all such meta to be returned in an array of triples format.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/web/script/gsajaxapi.js

    r27277 r27281  
    254254    } 
    255255 
     256    // New 
     257    this.getArchivesMetadata = function(docoid,metaname,metapos) 
     258    { 
     259        var mdserver = this.metadataserverURL(); 
     260     
     261        var url = mdserver + "?a=get-archives-metadata"; 
     262        url += "&c="+collect_; 
     263        url += "&d="+docoid; 
     264        url += "&metaname=" + metaname; 
     265        if (metapos!=null) { 
     266            url += "&metapos=" + metapos; 
     267        } 
     268 
     269    //alert("In getArchivesMeta. URL: " + url) 
     270        return this.urlGetSync(url); //Once this works, make it POST 
     271    } 
     272 
    256273    this._setMetadata = function(mode,docid,metaname,metapos,metavalue,metamode) 
    257274    {