@@ -135,6 +135,7 @@ cls.ResourceManagerService = function(view, network_logger)
135135 )
136136 this . _listDocuments ( ) ;
137137
138+ ctx . selectedResourceID = this . _selectedResourceID ;
138139 ctx . collapsed = this . _collapsedHash ;
139140 this . _context = ctx ;
140141 }
@@ -148,7 +149,6 @@ cls.ResourceManagerService = function(view, network_logger)
148149
149150 this . _update_bound = this . _update . bind ( this ) ;
150151
151-
152152 this . _on_debug_context_selected_bound = function ( )
153153 {
154154 this . _documentList = [ ] ;
@@ -187,33 +187,26 @@ cls.ResourceManagerService = function(view, network_logger)
187187
188188 this . _handle_resource_detail_bound = function ( event , target )
189189 {
190- var resource ;
191190 if ( ! this . _context )
192191 return ;
193192
194193 var parent = target . get_ancestor ( '[data-resource-id]' ) ;
195194 if ( ! parent )
196195 return ;
197196
198-
199- if ( this . _selectedResourceId )
200- {
201- resource = this . get_resource ( this . _selectedResourceId ) ;
202- if ( resource )
203- resource . selected = false ;
204- }
205-
206197 var id = parent . getAttribute ( 'data-resource-id' ) ;
207- resource = this . get_resource ( id ) ;
198+ this . highlight_resource ( id ) ;
199+ cls . ResourceDetailView . instance . show_resource ( id ) ;
200+ } . bind ( this ) ;
208201
209- if ( ! resource )
210- return ;
202+ this . highlight_resource = function ( id )
203+ {
204+ this . _selectedResourceID = id ;
211205
212- this . _selectedResourceId = id ;
213- resource . selected = true ;
214- this . _view . update ( ) ;
215- cls . ResourceDetailView . instance . show_resource ( resource ) ;
206+ if ( this . _context )
207+ this . _context . selectedResourceID = id ;
216208
209+ this . _view . update ( ) ;
217210 } . bind ( this ) ;
218211
219212 // WIP: soon there will be some triggers to display a whole group of resource, e.g. gallery of images, videos, fonts, audios, ...
0 commit comments