Skip to content

Commit 8dd2e3b

Browse files
author
p01
committed
wrap the Resource tree in a DIV, fix the width issue with the full width zebra, tweak the color of the number of resources
1 parent 557e0a1 commit 8dd2e3b

File tree

3 files changed

+16
-37
lines changed

3 files changed

+16
-37
lines changed

src/build-application/build_resource_manager_1_0.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ window.app.builders.ResourceManager["1.0"] = function(service)
55
var network_logger = new cls.NetworkLogger();
66
new cls.ResourceTreeView("resource_tree_view",
77
"Tree View",
8-
"resource-tree",
8+
"",
99
"",
1010
"",
1111
network_logger);
1212
new cls.ResourceDetailView("resource_detail_view",
1313
"Detail",
1414
"",
15-
// "",
1615
"",
1716
network_logger);
1817
cls.ResourceDetailView.create_ui_widgets();

src/resource-manager/resource_style.css

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -273,37 +273,12 @@ a.external:hover
273273
{/* note: same color as the .string class */
274274
color:#a54;
275275
}
276-
/*
277-
.children-expand-collapse
278-
{
279-
display:block;
280-
margin-left:16px;
281-
}
282-
.collapsed .children-expand-collapse
283-
{
284-
display:none;
285-
}
286-
.item-expand-collapse
287-
{
288-
line-height:17px;
289-
}
290-
.header-expand-collapse:hover
291-
{
292-
background-color:#D4E3F4;
293-
}
294-
.children-expand-collapse, .header-expand-collapse
295-
{
296-
white-space:nowrap;
297-
}
298-
*/
299276

300277
/* ------------------ */
301278
.resource-tree
302279
{
303-
padding:8px;
304-
height:100%;
305-
box-sizing:border-box;
306-
overflow:auto;
280+
height:100%;
281+
overflow:auto;
307282
}
308283
.resource-tree li > h2
309284
{
@@ -328,9 +303,11 @@ a.external:hover
328303
/* zebra resources */
329304
.resource-tree-windows
330305
{
306+
width:100%;
331307
background-image: linear-gradient(0deg, rgba(0,0,0,.031) 50%, transparent 0%);
332308
background-size: 100% 36px;
333309
background-repeat:repeat;
310+
display:table;
334311
}
335312

336313
.resource-tree li > h2:hover
@@ -346,7 +323,7 @@ a.external:hover
346323

347324
span.resource-tree-count
348325
{
349-
color:#666;
326+
color:#999;
350327
}
351328
span.resource-tree-window-label,
352329
span.resource-tree-document-label,
@@ -361,7 +338,7 @@ span.resource-tree-group-label
361338
background-size:16px 16px;
362339
background-image:url(../ui-images/type_storage.png);
363340
}
364-
h2.resource-tree-group/* > span*/
341+
h2.resource-tree-group
365342
{
366343
text-transform:capitalize;
367344
}

src/resource-manager/resource_templates.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ templates.resource_tree =
2323
this._depth++;
2424

2525
var tpl = original.apply(this, arguments);
26-
if(tpl && tpl[1] && tpl[1][0] == 'h2')
27-
tpl[1].push( 'style', 'padding-left:'+ this._depth*18 +'px;' );
26+
if (tpl && tpl[1] && tpl[1][0] == 'h2')
27+
tpl[1][1].push( 'style', 'margin-left:'+ this._depth*18 +'px;' );
2828

2929
this._depth--;
3030

@@ -72,9 +72,12 @@ templates.resource_tree =
7272
{
7373
//if (context.windowList.length)
7474
return (
75-
['ul',
76-
context.windowList.map(this.window.bind(this, context)),
77-
'class','resource-tree-windows'
75+
['div','',
76+
['ul',
77+
context.windowList.map(this.window.bind(this, context)),
78+
'class','resource-tree-windows'
79+
],
80+
'class','resource-tree'
7881
]);
7982
},
8083

@@ -217,7 +220,7 @@ templates.resource_tree =
217220
'class','resource-tree-resource-label'
218221
],
219222
'handler','resource-detail',
220-
'data-resource-id',''+r.id,
223+
'data-resource-id',String(r.id),
221224
'class','resource-tree-resource'
222225
+(r.sameOrigin?'':' resource-different-origin')
223226
+(context.selectedResourceID==r.id?' resource-highlight':'')

0 commit comments

Comments
 (0)