8000 Inverted toggler images and improved button coloring · symfony/symfony@0936694 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0936694

Browse files
webmozartfabpot
authored andcommitted
Inverted toggler images and improved button coloring
1 parent 64a3442 commit 0936694

File tree

5 files changed

+44
-21
lines changed

5 files changed

+44
-21
lines changed
Loading
Loading
Loading
Loading

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig

Lines changed: 44 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,14 @@
3131
}
3232
.toggle-button {
3333
display: inline-block;
34-
background: url("/bundles/framework/images/toggler.png") no-repeat top left;
34+
background: url("/bundles/framework/images/toggler.png") no-repeat top left #ccc;
3535
}
3636
.toggle-button.closed {
3737
background-position: bottom left;
3838
}
39+
.toggle-button.empty {
40+
background-image: url("/bundles/framework/images/toggler_empty.png");
41+
}
3942
.tree {
4043
width: 230px;
4144
padding: 10px;
@@ -75,12 +78,10 @@
7578
top: 50%;
7679
margin-top: -5px;
7780
margin-left: -15px;
78-
}
79-
.tree a.toggle-button {
8081
background-size: 10px 20px;
8182
}
82-
.tree img.toggle-button {
83-
background: none;
83+
.tree .toggle-button.empty {
84+
background-size: 10px 10px;
8485
}
8586
.tree ul ul .tree-inner {
8687
padding-left: 37px;
@@ -102,6 +103,13 @@
102103
font-weight: bold;
103104
color: #313131;
104105
}
106+
.tree .tree-inner.active .toggle-button, .tree .tree-inner:hover .toggle-button, .tree .tree-inner.active:hover .toggle-button {
107+
background-image: url("/bundles/framework/images/toggler_hover.png");
108+
background-color: #aaa;
109+
}
110+
.tree .tree-inner.active .toggle-button.empty, .tree .tree-inner:hover .toggle-button.empty, .tree .tree-inner.active:hover .toggle-button.empty {
111+
background-image: url("/bundles/framework/images/toggler_hover_empty.png");
112+
}
105113
.tree-details {
106114
border-left: 1px solid #dfdfdf;
107115
background: white;
@@ -133,13 +141,23 @@
133141
color: #fff;
134142
padding: 1px 4px;
135143
font-size: 10px;
144+
font-weight: bold;
136145
vertical-align: middle;
137146
border-radius: 6px;
138147
}
139-
.table-error th {
148+
.errors h3 {
149+
color: #800;
150+
}
151+
.errors th, .errors td {
152+
border: 1px solid #800;
153+
}
154+
.errors th {
140155
background: #a33;
141156
color: #fff;
142157
}
158+
.errors .toggle-button {
159+
background-color: #a33;
160+
}
143161
</style>
144162

145163
{% if collector.data.forms|length %}
@@ -308,7 +326,7 @@
308326
{% if data.children is not empty %}
309327
<a class="toggle-button" data-toggle-target-id="{{ data.id }}-children" href="#"></a>
310328
{% else %}
311-
<img class="toggle-button" src="{{ asset('bundles/framework/images/toggler_empty.png') }}">
329+
<div class="toggle-button empty"></div>
312330
{% endif %}
313331
{{ name }}
314332
{% if data.errors is defined and data.errors|length > 0 %}
@@ -336,20 +354,25 @@
336354
</h2>
337355

338356
{% if data.errors is defined and data.errors|length > 0 %}
339-
<h3>Errors</h3>
340-
341-
<table class="table-error">
342-
<tr>
343-
<th width="50%">Message</th>
344-
<th>Cause</th>
345-
</tr>
346-
{% for error in data.errors %}
347-
<tr>
348-
<td>{{ error.message }}</td>
349-
<td><em>Unknown.</em></td>
350-
</tr>
351-
{% endfor %}
352-
</table>
357+
<div class="errors">
358+
<h3>
359+
<a class="toggle-button" data-toggle-target-id="{{ data.id }}-errors" href="#"></a>
360+
Errors
361+
</h3>
362+
363+
<table id="{{ data.id }}-errors">
364+
<tr>
365+
<th width="50%">Message</th>
366+
<th>Cause</th>
367+
</tr>
368+
{% for error in data.errors %}
369+
<tr>
370+
<td>{{ error.message }}</td>
371+
<td><em>Unknown.</em></td>
372+
</tr>
373+
{% endfor %}
374+
</table>
375+
</div>
353376
{% endif %}
354377

355378
{% if data.default_data is defined %}

0 commit comments

Comments
 (0)
0