From 98c0c1b74f5932f94cc376b768fb51f38ea4e017 Mon Sep 17 00:00:00 2001 From: Pascal Borreli Date: Sun, 10 Jan 2016 17:13:27 +0000 Subject: [PATCH] Fixed incorrect link text after clicking on it --- Resources/views/Collector/db.html.twig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Resources/views/Collector/db.html.twig b/Resources/views/Collector/db.html.twig index 7a48f7e85..a971d985c 100644 --- a/Resources/views/Collector/db.html.twig +++ b/Resources/views/Collector/db.html.twig @@ -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;