2291 |
14 Mar 14 |
nicklas |
var CaseSummary = function() |
2291 |
14 Mar 14 |
nicklas |
2 |
{ |
2291 |
14 Mar 14 |
nicklas |
var cs = {}; |
2291 |
14 Mar 14 |
nicklas |
4 |
|
2291 |
14 Mar 14 |
nicklas |
cs.initElement = function(element, autoInit) |
2291 |
14 Mar 14 |
nicklas |
6 |
{ |
2291 |
14 Mar 14 |
nicklas |
if (autoInit == 'reggie-case-summary-link') |
2291 |
14 Mar 14 |
nicklas |
8 |
{ |
2291 |
14 Mar 14 |
nicklas |
Events.addEventHandler(element, 'click', cs.showCaseSummary); |
2291 |
14 Mar 14 |
nicklas |
10 |
} |
2291 |
14 Mar 14 |
nicklas |
11 |
} |
2291 |
14 Mar 14 |
nicklas |
12 |
|
2291 |
14 Mar 14 |
nicklas |
cs.showCaseSummary = function(event) |
2291 |
14 Mar 14 |
nicklas |
14 |
{ |
2291 |
14 Mar 14 |
nicklas |
var homeUrl = Data.get(event.currentTarget, 'home'); |
5019 |
10 Oct 18 |
nicklas |
var name = Data.get(event.currentTarget, 'name'); |
5019 |
10 Oct 18 |
nicklas |
var caseName = name.substring(0, 7); |
2291 |
14 Mar 14 |
nicklas |
var url = homeUrl+'/reports/case_summary.jsp?ID='+App.getSessionId(); |
5019 |
10 Oct 18 |
nicklas |
url += '&caseName='+encodeURIComponent(caseName); |
5019 |
10 Oct 18 |
nicklas |
url += '&highlight='+encodeURIComponent(name); |
2291 |
14 Mar 14 |
nicklas |
location.href = url; |
2291 |
14 Mar 14 |
nicklas |
22 |
} |
2291 |
14 Mar 14 |
nicklas |
23 |
|
2291 |
14 Mar 14 |
nicklas |
return cs; |
2291 |
14 Mar 14 |
nicklas |
25 |
}(); |
2291 |
14 Mar 14 |
nicklas |
26 |
|
2291 |
14 Mar 14 |
nicklas |
Doc.addElementInitializer(CaseSummary.initElement); |