7115 |
17 Apr 23 |
nicklas |
var ViewTabular = function() |
7115 |
17 Apr 23 |
nicklas |
2 |
{ |
7115 |
17 Apr 23 |
nicklas |
var vt = {}; |
7115 |
17 Apr 23 |
nicklas |
4 |
|
7115 |
17 Apr 23 |
nicklas |
vt.initElement = function(element, autoInit) |
7115 |
17 Apr 23 |
nicklas |
6 |
{ |
7115 |
17 Apr 23 |
nicklas |
if (autoInit == 'view-tabular') |
7115 |
17 Apr 23 |
nicklas |
8 |
{ |
7115 |
17 Apr 23 |
nicklas |
Events.addEventHandler(element, 'click', vt.viewTabular); |
7115 |
17 Apr 23 |
nicklas |
10 |
} |
7115 |
17 Apr 23 |
nicklas |
11 |
} |
7115 |
17 Apr 23 |
nicklas |
12 |
|
7115 |
17 Apr 23 |
nicklas |
vt.viewTabular = function(event) |
7115 |
17 Apr 23 |
nicklas |
14 |
{ |
7115 |
17 Apr 23 |
nicklas |
var fileId = Data.int(event.currentTarget, 'file-id'); |
7115 |
17 Apr 23 |
nicklas |
var homeUrl = Data.get(event.currentTarget, 'home'); |
7115 |
17 Apr 23 |
nicklas |
17 |
|
7115 |
17 Apr 23 |
nicklas |
var url = homeUrl+'/Session.servlet?ID=' + App.getSessionId(); |
7115 |
17 Apr 23 |
nicklas |
url += '&cmd=ViewTabular'; |
7115 |
17 Apr 23 |
nicklas |
url += '&fileId='+fileId; |
7115 |
17 Apr 23 |
nicklas |
Dialogs.openPopup(url, 'ViewTabular'+fileId, 1200, 800); |
7115 |
17 Apr 23 |
nicklas |
22 |
} |
7115 |
17 Apr 23 |
nicklas |
23 |
|
7115 |
17 Apr 23 |
nicklas |
return vt; |
7115 |
17 Apr 23 |
nicklas |
25 |
}(); |
7115 |
17 Apr 23 |
nicklas |
26 |
|
7115 |
17 Apr 23 |
nicklas |
Doc.addElementInitializer(ViewTabular.initElement); |