@@ -49,10 +49,9 @@ window.templates.resource_tree || (window.templates.resource_tree = new function
4949 // filter the list of resources, set their is_hidden flag and push the ones matching
5050 context . resources = [ ] ;
5151 context . resource_list . forEach ( function ( r ) {
52- r . is_hidden = context . collapsed [ r . pivot_id ] == true &&
53- context . search_term != "" && ! r . url . contains ( context . search_term ) ;
52+ r . is_hidden = context . collapsed [ r . pivot_id ] == true ;
5453
55- if ( ! r . is_hidden )
54+ if ( ! r . is_hidden && context . search_term == "" || r . url . contains ( context . search_term ) )
5655 context . resources . push ( r ) ;
5756 } ) ;
5857
@@ -67,7 +66,8 @@ window.templates.resource_tree || (window.templates.resource_tree = new function
6766 /*
6867 * The following template methods push their result to the private variable
6968 * `flat_list` in order to create a lightweight flat list of windows, documents,
70- * groups, resources, ...
69+ * groups, resources, ... This approach is also much easier than flattening a
70+ * big nested template.
7171 *
7272 */
7373 this . windows = function ( context )
@@ -214,7 +214,7 @@ window.templates.resource_tree || (window.templates.resource_tree = new function
214214 "class" , "resource-tree-resource-label" ,
215215 "style" , "margin-left:" + ( 1 + depth ) * DEPTH_IDENTATION + "px;" ,
216216 "data-tooltip" , "js-script-select" ,
217- "data-tooltip-text" , r . short_distinguisher
217+ "data-tooltip-text" , r . url
218218 ] ,
219219 " " ,
220220 r . same_origin ? [ ] : [ "span" , r . host , "class" , "resource-domain" ] ,
0 commit comments