2933 |
14 Nov 14 |
olle |
var CaseSummary = function() |
2933 |
14 Nov 14 |
olle |
2 |
{ |
2933 |
14 Nov 14 |
olle |
var cs = {}; |
2933 |
14 Nov 14 |
olle |
4 |
|
2933 |
14 Nov 14 |
olle |
cs.initElement = function(element, autoInit) |
2933 |
14 Nov 14 |
olle |
6 |
{ |
2938 |
17 Nov 14 |
olle |
if (autoInit == 'meludi-case-summary-link') |
2933 |
14 Nov 14 |
olle |
8 |
{ |
2933 |
14 Nov 14 |
olle |
Events.addEventHandler(element, 'click', cs.showCaseSummary); |
2933 |
14 Nov 14 |
olle |
10 |
} |
2933 |
14 Nov 14 |
olle |
11 |
} |
2933 |
14 Nov 14 |
olle |
12 |
|
2933 |
14 Nov 14 |
olle |
cs.showCaseSummary = function(event) |
2933 |
14 Nov 14 |
olle |
14 |
{ |
2933 |
14 Nov 14 |
olle |
var homeUrl = Data.get(event.currentTarget, 'home'); |
4828 |
31 May 18 |
olle |
var projectName = Data.get(event.currentTarget, 'project-name') |
2933 |
14 Nov 14 |
olle |
var caseName = Data.get(event.currentTarget, 'case-name') |
4828 |
31 May 18 |
olle |
if (projectName == 'SCAN-B-rec') |
4828 |
31 May 18 |
olle |
19 |
{ |
4828 |
31 May 18 |
olle |
var url = homeUrl+'/reports/case_summary_alt_rec.jsp?ID='+App.getSessionId(); |
4828 |
31 May 18 |
olle |
21 |
} |
4828 |
31 May 18 |
olle |
else |
4828 |
31 May 18 |
olle |
23 |
{ |
4828 |
31 May 18 |
olle |
var url = homeUrl+'/reports/case_summary.jsp?ID='+App.getSessionId(); |
4828 |
31 May 18 |
olle |
25 |
} |
2933 |
14 Nov 14 |
olle |
url += '&caseName=' + caseName; |
2933 |
14 Nov 14 |
olle |
location.href = url; |
2933 |
14 Nov 14 |
olle |
28 |
} |
2933 |
14 Nov 14 |
olle |
29 |
|
2933 |
14 Nov 14 |
olle |
return cs; |
2933 |
14 Nov 14 |
olle |
31 |
}(); |
2933 |
14 Nov 14 |
olle |
32 |
|
2933 |
14 Nov 14 |
olle |
Doc.addElementInitializer(CaseSummary.initElement); |