comparison OrthancExplorer/query-retrieve.js @ 1501:aaf368280f5a

C-Echo testing can be triggered from Orthanc Explorer (in the query/retrieve page)
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 07 Aug 2015 17:23:28 +0200
parents 21a2929e541d
children e0517f25919e
comparison
equal deleted inserted replaced
1500:a11281698db9 1501:aaf368280f5a
40 target.append($('<option>').attr('value', GenerateDicomDate(-7) + '-').text('Last 7 days')); 40 target.append($('<option>').attr('value', GenerateDicomDate(-7) + '-').text('Last 7 days'));
41 target.append($('<option>').attr('value', GenerateDicomDate(-31) + '-').text('Last 31 days')); 41 target.append($('<option>').attr('value', GenerateDicomDate(-31) + '-').text('Last 31 days'));
42 target.append($('<option>').attr('value', GenerateDicomDate(-31 * 3) + '-').text('Last 3 months')); 42 target.append($('<option>').attr('value', GenerateDicomDate(-31 * 3) + '-').text('Last 3 months'));
43 target.append($('<option>').attr('value', GenerateDicomDate(-365) + '-').text('Last year')); 43 target.append($('<option>').attr('value', GenerateDicomDate(-365) + '-').text('Last year'));
44 target.selectmenu('refresh'); 44 target.selectmenu('refresh');
45 });
46
47
48 $('#qr-echo').live('click', function() {
49 var server = $('#qr-server').val();
50 var message = 'Error: The C-Echo has failed!';
51
52 $.ajax({
53 url: '../modalities/' + server + '/echo',
54 type: 'POST',
55 cache: false,
56 async: false,
57 success: function() {
58 message = 'The C-Echo has succeeded!';
59 }
60 });
61
62 $('<div>').simpledialog2({
63 mode: 'button',
64 headerText: 'Echo result',
65 headerClose: true,
66 buttonPrompt: message,
67 animate: false,
68 buttons : {
69 'OK': { click: function () { } }
70 }
71 });
72
73 return false;
45 }); 74 });
46 75
47 76
48 $('#qr-submit').live('click', function() { 77 $('#qr-submit').live('click', function() {
49 var query = { 78 var query = {