Skip to content

Commit f216211

Browse files
author
p01
committed
Added image/webp, show the full URL in the tooltip of the resource, fixed a snafu in the token filtering of the resources
1 parent d672813 commit f216211

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/resource-manager/resource_templates.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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"],

src/resource-manager/resource_util.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ cls.ResourceUtil.mime_type_map = {
100100
"image/vnd.microsoft.icon": "image",
101101
"image/svg+xml": "image",
102102
"image/vnd.wap.wbmp": "image",
103+
"image/webp": "image",
103104

104105
"application/vnd.ms-fontobject": "font",
105106
"application/x-font-ttf": "font",

0 commit comments

Comments
 (0)