File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -122,19 +122,31 @@ cls.ResourceManagerService = function(view)
122122
123123 this . _handle_resource_detail_bound = function ( event , target )
124124 {
125+ var resource ;
125126 if ( ! this . _context )
126127 return ;
127128
128129 var parent = target . get_ancestor ( '[data-resource-id]' ) ;
129130 if ( ! parent )
130131 return ;
131-
132+
133+
134+ if ( this . _selectedResourceId )
135+ {
136+ resource = this . get_resource ( this . _selectedResourceId ) ;
137+ if ( resource )
138+ resource . selected = false ;
139+ }
140+
132141 var id = Number ( parent . getAttribute ( 'data-resource-id' ) ) ;
133- var resource = this . get_resource ( id ) ;
142+ resource = this . get_resource ( id ) ;
134143
135144 if ( ! resource )
136145 return ;
137146
147+ this . _selectedResourceId = id ;
148+ resource . selected = true ;
149+ this . _view . update ( ) ;
138150 cls . ResourceDetailView . instance . show_resource ( resource ) ;
139151
140152 } . bind ( this ) ;
Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ templates.resource_tree =
144144 'data-tooltip' , ( r && 'js-script-select' ) ,
145145 'data-tooltip-text' , ( r && groupName + ': ' + r . human_url )
146146 ] ,
147+ 'id' , ( r . selected == true ?'target-element' :'' ) ,
147148 'class' , 'header' + className ,
148149 'handler' , 'resource-detail' ,
149150 'data-resource-id' , ( '' + r . id )
You can’t perform that action at this time.
0 commit comments