Skip to content

Commit

Permalink
Merge pull request #509 from pborreli/fix-link-toggle
Browse files Browse the repository at this point in the history
Fixed incorrect link text after clicking on it
  • Loading branch information
kimhemsoe committed Jan 10, 2016
2 parents da0ac5e + 98c0c1b commit e9c2ccf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Resources/views/Collector/db.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -376,14 +376,16 @@
{% if profiler_markup_version == 1 %}
function toggleRunnableQuery(target) {
var targetSelector = target.getAttribute('data-toggle-selector');
var targetDataAltContent = target.getAttribute('data-toggle-alt-content');
var targetElement = document.querySelector(targetSelector);
target.setAttribute('data-toggle-alt-content', target.innerHTML);
if (targetElement.style.display != 'block') {
targetElement.style.display = 'block';
target.innerHTML = 'Hide runnable query';
target.innerHTML = targetDataAltContent;
} else {
targetElement.style.display = 'none';
target.innerHTML = 'View runnable query';
target.innerHTML = targetDataAltContent;
}
return false;
Expand Down

0 comments on commit e9c2ccf

Please sign in to comment.