File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 70397039
70407040 var kind = node [ "_kind" ] ;
70417041 if ( kind == null ) kind = "" ;
7042-
7042+
70437043 if ( kind . indexOf ( "ROOT." ) == 0 ) cando . typename = kind . slice ( 5 ) ;
70447044
70457045 cando . expand = ( '_more' in node ) ;
70467046
7047- if ( node == this . h ) {
7048- cando . ctxt = true ;
7049- } else if ( kind == "ROOT.Session" ) {
7047+ // enable context menu for top item
7048+ if ( node === this . h ) cando . ctxt = true ;
7049+
7050+ if ( kind == "ROOT.Session" ) {
70507051 cando . img1 = "img_globe" ;
70517052 } else if ( kind . match ( / ^ R O O T .T H 1 / ) ) {
70527053 cando . img1 = "img_histo1d" ;
70927093 cando . scan = false ;
70937094 cando . display = true ;
70947095 }
7096+
7097+ if ( '_player' in node ) cando . display = true ;
70957098
70967099 return cando ;
70977100 }
72767279 if ( cando . expand && ( hitem [ '_childs' ] == null ) )
72777280 return this . expand ( itemname , hitem , node . parent ( ) ) ;
72787281
7279- if ( cando . display )
7282+ if ( cando . display ) {
72807283 return this . display ( itemname ) ;
7284+ }
72817285
72827286 if ( ! ( '_childs' in hitem ) || ( hitem === this . h ) ) return ;
72837287 }
74287432
74297433 if ( item != null ) {
74307434 var cando = this . CheckCanDo ( item ) ;
7431- if ( ! cando . display ) return this . player ( itemname , drawopt , call_back ) ;
7435+ if ( ! cando . display || ( '_player' in item ) ) return this . player ( itemname , drawopt , call_back ) ;
74327436 }
74337437
74347438 if ( updating ) {
78007804
78017805 var itemname = node . parent ( ) . attr ( 'item' ) ;
78027806
7807+ console . log ( "tree_contextmenu " + itemname ) ;
7808+
78037809 var hitem = this . Find ( itemname ) ;
78047810 if ( hitem == null ) return ;
78057811
You can’t perform that action at this time.
0 commit comments