@@ -59,6 +59,7 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
5959 }
6060 else
6161 {
62+ this . _overlay . hide ( ) ;
6263 this . _render_click_to_fetch_view ( this . _container ) ;
6364 }
6465
@@ -289,7 +290,7 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
289290 }
290291 } ;
291292
292- var _make_selection_func = function ( accessor )
293+ var selection_func = function ( accessor )
293294 {
294295 if ( this . selected )
295296 {
@@ -447,6 +448,17 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
447448 this . update ( ) ;
448449 } . bind ( this ) ;
449450
451+ this . _close_detail_overlay_bound = function ( evt , target )
452+ {
453+ if ( this . selected )
454+ {
455+ this . selected = null ;
456+ this . needs_instant_update = true ;
457+ this . update ( ) ;
458+ return false ;
459+ }
460+ } . bind ( this ) ;
461+
450462 this . _on_setting_changed_bound = function ( message )
451463 {
452464 switch ( message . id )
@@ -598,8 +610,9 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
598610
599611 ActionHandlerInterface . apply ( this ) ;
600612 this . _handlers = {
601- "select-next-entry" : _make_selection_func . bind ( this , "nextElementSibling" ) ,
602- "select-previous-entry" : _make_selection_func . bind ( this , "previousElementSibling" )
613+ "select-next-entry" : selection_func . bind ( this , "nextElementSibling" ) ,
614+ "select-previous-entry" : selection_func . bind ( this , "previousElementSibling" ) ,
615+ "close-details" : this . _close_detail_overlay_bound
603616 } ;
604617 this . id = id ;
605618 ActionBroker . get_instance ( ) . register_handler ( this ) ;
@@ -616,6 +629,7 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
616629 "network-details-view scroll" ,
617630 null ,
618631 "network-detail-overlay" ) ) ;
632+ this . _overlay . shared_shortcuts = this . id ;
619633 cls . NetworkDetailOverlayView . create_ui_widgets ( ) ;
620634
621635 this . _type_filters = [ "all" ] . map ( this . _map_filter_bound ) ;
@@ -829,11 +843,7 @@ cls.NetworkDetailOverlayViewPrototype = function()
829843
830844 this . _render_details_view = function ( entry )
831845 {
832- var do_raw = settings [ "network-detail-overlay" ] . get ( "view-raw" ) ;
833- var do_wrap = settings [ "network-detail-overlay" ] . get ( "wrap-detail-view" ) ;
834- // todo: not consistent to read some settings from within the template,
835- // but annoying to pass them over 8 trillion functions.
836- return templates . network . details ( entry , do_raw , do_wrap ) ;
846+ return templates . network . details ( entry ) ;
837847 } ;
838848
839849 this . _on_toggle_expand_request_response = function ( event )
@@ -872,6 +882,17 @@ cls.NetworkDetailOverlayViewPrototype = function()
872882 eh . scroll [ "network-detail-overlay" ] = this . _on_scroll . bind ( this ) ;
873883 eh . click [ "toggle-expand-request-response" ] = this . _on_toggle_expand_request_response . bind ( this ) ;
874884
885+ ActionHandlerInterface . apply ( this ) ;
886+ this . handle = function ( action_id , event , target )
887+ {
888+ var parent_view = window . views [ this . parent_view_id ] ;
889+ if ( parent_view )
890+ parent_view . handle . apply ( parent_view , arguments ) ;
891+
892+ }
893+ this . id = id ;
894+ ActionBroker . get_instance ( ) . register_handler ( this ) ;
895+
875896 this . init ( id , container_class , html , default_handler ) ;
876897 }
877898}
0 commit comments