@@ -2,40 +2,32 @@ Ext4.define('SequenceAnalysis.window.VisualizeDataWindow', {
22 extend : 'Ext.window.Window' ,
33 statics : {
44 buttonHandler : function ( dataRegionName ) {
5- var dataRegion = LABKEY . DataRegions [ dataRegionName ] ;
6- dataRegion . getSelected ( {
7- scope : this ,
8- success : function ( results , response ) {
9- if ( ! results || ! results . selected || ! results . selected . length ) {
10- Ext4 . Msg . alert ( 'Error' , 'No rows selected' ) ;
11- return ;
12- }
13-
14- var checked = LABKEY . DataRegions [ dataRegionName ] . getChecked ( ) ;
15-
16- Ext4 . Msg . wait ( 'Loading...' ) ;
17- LABKEY . Ajax . request ( {
18- method : 'POST' ,
19- url : LABKEY . ActionURL . buildURL ( 'sequenceanalysis' , 'getAvailableHandlers' , null ) ,
20- params : {
21- handlerType : 'OutputFile' ,
22- outputFileIds : checked
23- } ,
24- scope : this ,
25- failure : LDK . Utils . getErrorCallback ( ) ,
26- success : LABKEY . Utils . getCallbackWrapper ( function ( results ) {
27- Ext4 . Msg . hide ( ) ;
28-
29- Ext4 . create ( 'SequenceAnalysis.window.VisualizeDataWindow' , {
30- dataRegionName : dataRegionName ,
31- handlers : results . handlers ,
32- partialHandlers : results . partialHandlers ,
33- outputFileIds : checked
34- } ) . show ( ) ;
35- } , this )
36- } ) ;
5+ var checked = LABKEY . DataRegions [ dataRegionName ] . getChecked ( ) ;
6+ if ( ! checked . length ) {
7+ Ext4 . Msg . alert ( 'Error' , 'No rows selected' ) ;
8+ return ;
9+ }
10+
11+ Ext4 . Msg . wait ( 'Loading...' ) ;
12+ LABKEY . Ajax . request ( {
13+ method : 'POST' ,
14+ url : LABKEY . ActionURL . buildURL ( 'sequenceanalysis' , 'getAvailableHandlers' , null ) ,
15+ params : {
16+ handlerType : 'OutputFile' ,
17+ outputFileIds : checked
3718 } ,
38- failure : LDK . Utils . getErrorCallback ( )
19+ scope : this ,
20+ failure : LDK . Utils . getErrorCallback ( ) ,
21+ success : LABKEY . Utils . getCallbackWrapper ( function ( results ) {
22+ Ext4 . Msg . hide ( ) ;
23+
24+ Ext4 . create ( 'SequenceAnalysis.window.VisualizeDataWindow' , {
25+ dataRegionName : dataRegionName ,
26+ handlers : results . handlers ,
27+ partialHandlers : results . partialHandlers ,
28+ outputFileIds : checked
29+ } ) . show ( ) ;
30+ } , this )
3931 } ) ;
4032 }
4133 } ,
0 commit comments