Skip to content

Commit aca6f30

Browse files
author
p01
committed
First phase of DFL-3645, Improved same_origin indication in the ResourceTree
1 parent 490a722 commit aca6f30

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

src/resource-manager/resource_style.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,8 @@ a.external:hover
328328
background-color:rgba(55, 115, 211, 0.702);
329329
}
330330

331-
span.resource-tree-count
331+
span.resource-tree-count,
332+
span.resource-domain
332333
{
333334
color:#999;
334335
}

src/resource-manager/resource_templates.js

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,18 +214,31 @@ templates.resource_tree =
214214

215215
resource:function(context, depth, r)
216216
{
217+
var resourceName =
218+
[
219+
'span',
220+
(r.filename || r.short_distinguisher || r.url || 'NO URL'),
221+
'class','resource-tree-resource-label',
222+
'style', 'margin-left:'+ (1+depth)*this.DEPTH_IDENTATION +'px;'
223+
];
217224
var tpl =
218225
['li',
219226
['h2',
220-
['span',
221-
(r.filename || r.short_distinguisher || r.url || 'NO URL'),
222-
'class','resource-tree-resource-label',
223-
'style', 'margin-left:'+ (1+depth)*this.DEPTH_IDENTATION +'px;'
224-
],
227+
(
228+
r.sameOrigin
229+
?
230+
resourceName
231+
:
232+
[resourceName,' ',
233+
['span',
234+
'('+r.host+')',
235+
'class','resource-domain'
236+
]]),
237+
225238
'handler','resource-detail',
226239
'data-resource-uid',String(r.uid),
227240
'class','resource-tree-resource'
228-
+(r.sameOrigin?'':' resource-different-origin')
241+
// +(r.sameOrigin?'':' resource-different-origin')
229242
+(context.selectedResourceUID==r.uid?' resource-highlight':'')
230243
]
231244
];

0 commit comments

Comments
 (0)