Changeset 1486


Ignore:
Timestamp:
08/18/11 22:02:35 (13 years ago)
Author:
gaba
Message:
 
Location:
MDService2/trunk/MDService2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • MDService2/trunk/MDService2/WebContent/scripts/mdservice_model.js

    r1483 r1486  
    241241       
    242242       
    243         var res = $(this.queryobject.container).find('.result').html("");
     243        var res = $(this.queryobject.container).find('.result').append(data);//html("");
    244244        //res.append('<ul></ul>');
     245        /*
    245246        $.each(data.hits,function(){
    246247                //$(res.children('ul')[res.length]).append('<li>'+this+'</li>');
    247248                res.append(this);
    248249        });
    249        
    250         if (data.activeclients == 0){
     250        */     
     251       
     252        var result_header = $(res).children('.result-header');
     253       
     254        var q_header;
     255        q_header = $(res).parent().find('.query_header');
     256        q_header.children('.result-header').remove();
     257       
     258        q_header.append(result_header);                         
     259        addDetailFunctionality(q_header, this);
     260       
     261       
     262        if (Number( $(data).find(".activeclients").text() ) == 0) {
     263        //if (data.activeclients == 0){
     264                // update link-hrefs
     265                var qid = $(res).closest('.query_wrapper').attr("id");
     266                //notifyUser("result-loaded ID:" + qid,'debug');
     267               
     268                var q = queryset.getQuery(qid);
     269                $('#' + qid ).find(".cmd_link").attr("href", q.link("fullpage"));
    251270                notifyUser("result-loaded",'debug');
    252271               
     
    810829               
    811830                var reptype = workspace.getRepositoryType(this.repository);
    812                 /*
     831               
    813832                if (reptype=="pazpar"){
    814833                        //pazpar handling this
     
    816835                        return;
    817836                }
    818                 */
     837               
    819838                if (reptype=="md" ){
    820839                        uri = link('recordset',this.format, this.query_uri());
     
    824843                        } else {
    825844                               
    826                                 if (reptype=="pazpar"){
    827                                         uri = link('pazpar', this.format, this.query_uri());
    828                                 } else {
     845                                //if (reptype=="pazpar"){
     846                                //      uri = link('pazpar', this.format, this.query_uri());
     847                                //} else {
    829848                               
    830849                                        return;
    831                                 }
     850                                //}
    832851                        }
    833852                }
  • MDService2/trunk/MDService2/WebContent/scripts/mdservice_pz2.js

    r1478 r1486  
    311311        $.get("/MDService2/pazpar2/" + this.format + "/" + params,
    312312            function(data) {
    313                 if (  $(data).find("status")[0].textContent == "OK"  ) {
     313                if (  $(data).find(".status").text() == "OK"  ) {
    314314                    // first parse the status data send along with records
    315315                    // this is strictly bound to the format
    316                     var activeClients = Number( $(data).find("activeclients")[0].textContent );
     316                    var activeClients = Number( $(data).find(".activeclients").text() );
    317317                    context.activeClients = activeClients;
     318                    /*
    318319                    var show = {
    319320                        "activeclients": activeClients,
     
    326327                        "num":
    327328                            Number( $(data).find("num")[0].textContent ),
    328                         "hits": $(data).find("hit")//[]
     329                        "hits": $(data)//.find("hit")//[]
    329330                    };
     331                    */
    330332                    // parse all the first-level nodes for all <hit> tags
    331333                    //var hits = $(data).find("hit");
     
    344346                            delay);
    345347                    }
    346                     global_show = show;
    347                     context.showCallback(show);
     348                    global_show = $(data);//show;
     349                    context.showCallback($(data));
    348350                }
    349351                else
  • MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice/action/Pz2ProxyAction.java

    r1483 r1486  
    204204                setBlock("1");
    205205                while (Integer.parseInt(activeclients) > 0){
    206                         activeclients = getDocumentData(this.getSourceStream(), "//show/activeclients");
     206                        //activeclients = getDocumentData(this.getSourceStream(), "//show/activeclients");
    207207                        is = this.getSourceStream();
     208                        activeclients = getDocumentData(is, "//show/activeclients");
    208209                       
    209210                }
     211                is = this.getSourceStream();
    210212                return is;
    211213        }
Note: See TracChangeset for help on using the changeset viewer.