File tree Expand file tree Collapse file tree
netbox_device_view/templates/netbox_device_view Expand file tree Collapse file tree Original file line number Diff line number Diff line change 111111 content : opts . content || ""
112112 } ) ;
113113 var hideTimer = null ;
114+ var showTimer = null ;
114115 function scheduleHide ( ) {
115- hideTimer = setTimeout ( function ( ) { pop . hide ( ) ; } , 300 ) ;
116+ clearTimeout ( showTimer ) ;
117+ hideTimer = setTimeout ( function ( ) { pop . hide ( ) ; } , 500 ) ;
116118 }
117119 function cancelHide ( ) {
118120 clearTimeout ( hideTimer ) ;
119121 }
120- el . addEventListener ( "mouseenter" , function ( ) { cancelHide ( ) ; pop . show ( ) ; } ) ;
122+ el . addEventListener ( "mouseenter" , function ( ) { cancelHide ( ) ; showTimer = setTimeout ( function ( ) { pop . show ( ) ; } , 500 ) ; } ) ;
121123 el . addEventListener ( "mouseleave" , scheduleHide ) ;
122124 el . addEventListener ( "shown.bs.popover" , function ( ) {
123125 var tip = Popover . getInstance ( el ) && Popover . getInstance ( el ) . _tip ;
Original file line number Diff line number Diff line change @@ -108,13 +108,15 @@ <h2 class="card-header">Deviceview {% if object.virtual_chassis %}{{ object.virt
108108 content : opts . content || ""
109109 } ) ;
110110 var hideTimer = null ;
111+ var showTimer = null ;
111112 function scheduleHide ( ) {
112- hideTimer = setTimeout ( function ( ) { pop . hide ( ) ; } , 300 ) ;
113+ clearTimeout ( showTimer ) ;
114+ hideTimer = setTimeout ( function ( ) { pop . hide ( ) ; } , 500 ) ;
113115 }
114116 function cancelHide ( ) {
115117 clearTimeout ( hideTimer ) ;
116118 }
117- el . addEventListener ( "mouseenter" , function ( ) { cancelHide ( ) ; pop . show ( ) ; } ) ;
119+ el . addEventListener ( "mouseenter" , function ( ) { cancelHide ( ) ; showTimer = setTimeout ( function ( ) { pop . show ( ) ; } , 500 ) ; } ) ;
118120 el . addEventListener ( "mouseleave" , scheduleHide ) ;
119121 el . addEventListener ( "shown.bs.popover" , function ( ) {
120122 var tip = Popover . getInstance ( el ) && Popover . getInstance ( el ) . _tip ;
You can’t perform that action at this time.
0 commit comments