2727 public void addClientDependencies(ClientDependencies dependencies)
2828 {
2929 dependencies. add(" laboratory.context" );
30+ dependencies. add(" /laboratory/panel/DataBrowserPanel.js" );
31+ dependencies. add(" LDK/panel/AbstractFilterType.js" );
32+ dependencies. add(" LDK/panel/SingleSubjectFilterType.js" );
33+ dependencies. add(" LDK/panel/MultiSubjectFilterType.js" );
34+ dependencies. add(" LDK/panel/NoFiltersFilterType.js" );
3035 }
3136
3237 private String getFilterConfig()
5964<div id =" <%= h(wpId) % >" ></div >
6065
6166<script type =" text/javascript" nonce =" <%= getScriptNonce() % >" >
62- Ext4 .onReady (function (){
63- var webpartId = < %= q (wpId)% > ;
64-
65- Ext4 .define (' Laboratory.panel.TabbedReportPanel' , {
66- extend: ' LDK.panel.TabbedReportPanel' ,
67-
68- initComponent : function (){
69- Ext4 .ns (' Laboratory.tabbedReports' );
70-
71- Ext4 .apply (this , {
72- // defaultReport: 'abstract',
73- reportNamespace: Laboratory .tabbedReports
74- });
75-
76- Ext4 .Msg .wait (' Loading...' );
77- Laboratory .Utils .getDataItems ({
78- types: [' tabbedReports' ],
79- scope: this ,
80- success: this .onDataLoad ,
81- failure: LDK .Utils .getErrorCallback ()
82- });
83-
84- this .callParent ();
85- },
86-
87- onDataLoad : function (results ){
88- Ext4 .Msg .hide ();
89- this .reports = [];
90- Ext4 .each (results .tabbedReports , function (report ){
91- LDK .Assert .assertNotEmpty (' Tabbed Report is null' , report);
92- if (report && report .key ){
93- report .id = report .key .replace (/ :/ g , ' _' );
94- report .category = report .reportCategory ;
95-
96- if (report .targetContainer ){
97- report .containerPath = report .targetContainer ;
98- }
99- this .reports .push (report);
100- }
101- }, this );
102-
103- this .reports = LDK .Utils .sortByProperty (this .reports , ' name' , false );
104- this .reports = LDK .Utils .sortByProperty (this .reports , ' reportCategory' , false );
105-
106- this .createTabPanel ();
107- },
67+ var subjectId = LABKEY .ActionURL .getParameter (' subjectId' );
10868
69+ Ext4 .onReady (function (){
70+ Ext4 .create (' Laboratory.panel.DataBrowserPanel' , {
71+ initialContext: subjectId ? {
72+ subjects: subjectId
73+ } : null ,
10974 filterTypes: [{
11075 xtype: ' ldk-singlesubjectfiltertype' ,
11176 inputValue: LDK .panel .SingleSubjectFilterType .filterName ,
11984 inputValue: LDK .panel .NoFiltersFilterType .filterName ,
12085 label: LDK .panel .NoFiltersFilterType .label
12186 }]
122- });
123-
124- Ext4 .create (' Laboratory.panel.TabbedReportPanel' ).render (webpartId);
87+ }).render (< %= q (wpId)% > );
12588 });
12689 </script >
0 commit comments