Changeset 1493
- Timestamp:
- 08/22/11 20:19:26 (13 years ago)
- Location:
- MDService2/trunk/MDService2/WebContent/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
MDService2/trunk/MDService2/WebContent/scripts/mdservice_model.js
r1487 r1493 117 117 return reptype; 118 118 }; 119 120 Workspace.prototype.getOption = function(opt_key){ 121 var value = ""; 122 123 value = workspace.server_json["WorkspaceProfile"]["Options"][opt_key]; 124 125 return value; 126 } 119 127 120 128 Workspace.prototype.removeelement = function(type, id1, id2){ … … 237 245 } ); 238 246 }; 239 Query.prototype.pazpar2show = function(data ){247 Query.prototype.pazpar2show = function(data, activeClients){ 240 248 //this.container.find('.result').html(data); 241 249 … … 261 269 262 270 263 if (Number( $(data).find(".activeclients").text() ) == 0) {264 //if (data.activeclients == 0){271 //if (Number( $(data).find(".activeclients").text() ) == 0) { 272 if (activeClients == 0){ 265 273 // update link-hrefs 266 274 var qid = $(res).closest('.query_wrapper').attr("id"); … … 831 839 var reptype = workspace.getRepositoryType(this.repository); 832 840 841 // USE CLIENT PAZPAR 833 842 if (reptype=="pazpar"){ 834 843 //pazpar handling this … … 843 852 uri = link('sru', this.format, this.sruquery_uri()); 844 853 } else { 845 854 // USE SERVER PAZPAR 846 855 //if (reptype=="pazpar"){ 847 856 // uri = link('pazpar', this.format, this.query_uri()); -
MDService2/trunk/MDService2/WebContent/scripts/mdservice_pz2.js
r1486 r1493 95 95 this.recordCounter = 0; 96 96 97 this.showStartTime = 0; 98 this.showTimeout = workspace.getOption("pazpartimeout"); 97 99 // active clients, updated by stat and show 98 100 // might be an issue since bytarget will poll accordingly … … 237 239 context.searchStatusOK = true; 238 240 //piggyback search 241 var d = new Date(); 242 context.showStartTime = d.getTime(); 239 243 context.show(start, num, sort); 240 244 if ( context.statCallback ) … … 336 340 337 341 context.showCounter++; 338 var delay = context.showTime; 339 if (context.showCounter > context.showFastCount) 342 var delay = context.showTime; 343 var d = new Date(); 344 var currentTime = d.getTime(); 345 if (context.showCounter > context.showFastCount) 340 346 delay += context.showCounter * context.dumpFactor; 341 if ( activeClients > 0 ){ 342 context.showTimer = setTimeout( 343 function () { 344 context.show(); 345 }, 346 delay); 347 } 347 348 if ((currentTime - context.showStartTime)/1000 > context.showTimeout){ 349 //$(tempdata).find(".activeclients").html('0'); 350 //$(tempdata).find(".activeclients")[0].textContent = '0'; 351 activeClients = 0; 352 } 353 if ( activeClients > 0 ){ 354 context.showTimer = setTimeout( 355 function () { 356 context.show(); 357 }, 358 delay); 359 } 348 360 global_show = $(data);//show; 349 context.showCallback($(data) );361 context.showCallback($(data), activeClients); 350 362 } 351 363 else
Note: See TracChangeset
for help on using the changeset viewer.