Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 74c24a5

Browse files
committed
minor #15814 [WebProfilerBundle] fixed cursor as pointer when hovering over link. (aitboudad)
This PR was merged into the 2.8 branch. Discussion ---------- [WebProfilerBundle] fixed cursor as pointer when hovering over link. | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Fixed tickets | ~ | Tests pass? | yes | License | MIT Commits ------- ac7591f [WebProfilerBundle] added btn-link.
2 parents 2e718c1 + ac7591f commit 74c24a5

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
{% endif %}
163163

164164
{% if stack %}
165-
<a class="text-small sf-toggle" data-toggle-selector="#{{ id }}" data-toggle-alt-content="Hide stack trace">Show strack trace</a>
165+
<button class="btn-link text-small sf-toggle" data-toggle-selector="#{{ id }}" data-toggle-alt-content="Hide stack trace">Show strack trace</button>
166166
{% endif %}
167167

168168
{% for index, call in stack if index > 1 %}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
{% endif %}
180180

181181
{% if message.parameters|length > 0 %}
182-
<a class="newline text-small sf-toggle" data-toggle-selector="#parameters-{{ loop.index }}" data-toggle-alt-content="Hide parameters">Show parameters</a>
182+
<button class="btn-link newline text-small sf-toggle" data-toggle-selector="#parameters-{{ loop.index }}" data-toggle-alt-content="Hide parameters">Show parameters</button>
183183

184184
<div id="parameters-{{ loop.index }}" class="hidden">
185185
{% for parameters in message.parameters %}

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,8 @@
387387
}
388388
389389
Sfjs.addEventListener(toggles[i], 'click', function(e) {
390+
e.preventDefault();
391+
390392
var toggle = e.target || e.srcElement;
391393
var element = document.querySelector(toggle.getAttribute('data-toggle-selector'));
392394
@@ -406,8 +408,6 @@
406408
var originalContent = toggle.getAttribute('data-toggle-original-content');
407409
var altContent = toggle.getAttribute('data-toggle-alt-content');
408410
toggle.innerHTML = currentContent !== altContent ? altContent : originalContent;
409-
410-
e.preventDefault();
411411
});
412412
}
413413
}

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,18 @@ button {
115115
height: 16px;
116116
vertical-align: middle;
117117
}
118-
118+
.btn-link {
119+
border-color: transparent;
120+
color: #218BC3;
121+
text-decoration: none;
122+
background-color: transparent;
123+
outline: none;
124+
border: 0;
125+
padding: 0;
126+
}
127+
.btn-link:hover {
128+
text-decoration: underline;
129+
}
119130
{# Tables
120131
------------------------------------------------------------------------- #}
121132
table, tr, th, td {

0 commit comments

Comments
 (0)