diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/public/images/toggler.png b/src/Symfony/Bundle/FrameworkBundle/Resources/public/images/toggler.png new file mode 100644 index 0000000000000..afcbb115d1919 Binary files /dev/null and b/src/Symfony/Bundle/FrameworkBundle/Resources/public/images/toggler.png differ diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/public/images/toggler_empty.png b/src/Symfony/Bundle/FrameworkBundle/Resources/public/images/toggler_empty.png new file mode 100644 index 0000000000000..b5b27c79fc355 Binary files /dev/null and b/src/Symfony/Bundle/FrameworkBundle/Resources/public/images/toggler_empty.png differ diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/public/images/toggler_hover.png b/src/Symfony/Bundle/FrameworkBundle/Resources/public/images/toggler_hover.png new file mode 100644 index 0000000000000..dad1b3fce39ac Binary files /dev/null and b/src/Symfony/Bundle/FrameworkBundle/Resources/public/images/toggler_hover.png differ diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/public/images/toggler_hover_empty.png b/src/Symfony/Bundle/FrameworkBundle/Resources/public/images/toggler_hover_empty.png new file mode 100644 index 0000000000000..d5c873c1b8413 Binary files /dev/null and b/src/Symfony/Bundle/FrameworkBundle/Resources/public/images/toggler_hover_empty.png differ diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig index eb5eeb75c1522..789086ad214a8 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig @@ -29,6 +29,16 @@ /*background: #F6F6F6;*/ margin: -30px -40px -40px; } + .toggle-icon { + display: inline-block; + background: url("{{ asset('/bundles/framework/images/toggler.png') }}") no-repeat top left #5eb5e0; + } + .closed .toggle-icon, .closed.toggle-icon { + background-position: bottom left; + } + .toggle-icon.empty { + background-image: url("{{ asset('/bundles/framework/images/toggler_empty.png') }}"); + } .tree { width: 230px; padding: 10px; @@ -47,10 +57,11 @@ } .tree .tree-inner { width: 100%; - padding: 5px 7px; + padding: 5px 7px 5px 22px; border-radius: 6px; color: #313131; cursor: pointer; + position: relative; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; @@ -60,22 +71,44 @@ text-decoration: none; } .tree .toggle-button { + /* provide a bigger clickable area than just 10x10px */ + width: 16px; + height: 16px; + /* vertically center the button */ + position: absolute; + top: 50%; + margin-top: -8px; + margin-left: -18px; + } + .tree .toggle-icon { width: 10px; height: 10px; - background: none; - border: none; + /* position the icon in the center of the clickable area */ + margin-left: 3px; + margin-top: 3px; + background-size: 10px 20px; + background-color: #ccc; + } + .tree .toggle-icon.empty { + width: 10px; + height: 10px; + position: absolute; + top: 50%; + margin-top: -5px; + margin-left: -15px; + background-size: 10px 10px; } .tree ul ul .tree-inner { - padding-left: 22px; + padding-left: 37px; } .tree ul ul ul .tree-inner { - padding-left: 37px; + padding-left: 52px; } .tree ul ul ul ul .tree-inner { - padding-left: 52px; + padding-left: 67px; } .tree ul ul ul ul ul .tree-inner { - padding-left: 67px; + padding-left: 82px; } .tree .tree-inner:hover { background: #dfdfdf; @@ -85,34 +118,64 @@ font-weight: bold; color: #313131; } + .tree .tree-inner.active .toggle-icon, .tree .tree-inner:hover .toggle-icon, .tree .tree-inner.active:hover .toggle-icon { + background-image: url("{{ asset('/bundles/framework/images/toggler_hover.png') }}"); + background-color: #aaa; + } + .tree .tree-inner.active .toggle-icon.empty, .tree .tree-inner:hover .toggle-icon.empty, .tree .tree-inner.active:hover .toggle-icon.empty { + background-image: url("{{ asset('/bundles/framework/images/toggler_hover_empty.png') }}"); + } .tree-details { border-left: 1px solid #dfdfdf; background: white; margin-left: 250px; padding: 30px 40px 40px; } + .tree-details h3 { + position: relative; + } + .tree-details .toggle-icon { + width: 16px; + height: 16px; + /* vertically center the button */ + position: absolute; + top: 50%; + margin-top: -9px; + margin-left: 6px; + } .form-type { color: #999999; } .hidden { display: none; } - .btn-toggle { - cursor: pointer; - } .badge-error { float: right; background: #a33; color: #fff; padding: 1px 4px; font-size: 10px; + font-weight: bold; vertical-align: middle; border-radius: 6px; } - .table-error th { + .errors h3 { + color: #800; + } + .errors th, .errors td { + border-color: #800; + } + .errors th { background: #a33; color: #fff; } + .errors .toggle-icon { + background-color: #a33; + } + h3 a, h3 a:hover, h3 a:focus { + color: inherit; + text-decoration: inherit; + } {% if collector.data.forms|length %} @@ -122,7 +185,7 @@ @@ -136,134 +199,156 @@ {% endif %} {% endblock %} -{% macro form_tree_entry(name, data) %} +{% macro form_tree_entry(name, data, expanded) %}
  • -
    +
    {% if data.children is not empty %} - - + {% else %} - +
    {% endif %} {{ name }} {% if data.errors is defined and data.errors|length > 0 %} @@ -272,9 +357,9 @@
    {% if data.children is not empty %} -