mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-30 05:58:46 +02:00
N°8834 - Add compatibility with PHP 8.4 (#819)
* N°8834 - Add compatibility with PHP 8.4 * Rollback of scssphp/scssphp version upgrade due to compilation error
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="{{ _charset }}">
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta charset="{{ _charset }}" />
|
||||
<meta name="robots" content="noindex,nofollow" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
<title>{% block title %}Symfony Profiler{% endblock %}</title>
|
||||
|
||||
{% set request_collector = profile is defined ? profile.collectors.request|default(null) : null %}
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
}
|
||||
|
||||
tab.addEventListener('click', function(e) {
|
||||
const activeTab = e.target || e.srcElement;
|
||||
let activeTab = e.target || e.srcElement;
|
||||
|
||||
/* needed because when the tab contains HTML contents, user can click */
|
||||
/* on any of those elements instead of their parent '<button>' element */
|
||||
@@ -122,6 +122,12 @@
|
||||
}
|
||||
|
||||
toggle.addEventListener('click', (e) => {
|
||||
const toggle = e.currentTarget;
|
||||
|
||||
if (e.target.closest('a, .sf-toggle') !== toggle) {
|
||||
return;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
if ('' !== window.getSelection().toString()) {
|
||||
@@ -129,9 +135,6 @@
|
||||
return;
|
||||
}
|
||||
|
||||
/* needed because when the toggle contains HTML contents, user can click */
|
||||
/* on any of those elements instead of their parent '.sf-toggle' element */
|
||||
const toggle = e.target.closest('.sf-toggle');
|
||||
const element = document.querySelector(toggle.getAttribute('data-toggle-selector'));
|
||||
|
||||
toggle.classList.toggle('sf-toggle-on');
|
||||
@@ -154,14 +157,6 @@
|
||||
toggle.innerHTML = currentContent !== altContent ? altContent : originalContent;
|
||||
});
|
||||
|
||||
/* Prevents from disallowing clicks on links inside toggles */
|
||||
const toggleLinks = toggle.querySelectorAll('a');
|
||||
toggleLinks.forEach((toggleLink) => {
|
||||
toggleLink.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
});
|
||||
});
|
||||
|
||||
toggle.setAttribute('data-processed', 'true');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#source .source-content ol li {
|
||||
margin: 0 0 2px 0;
|
||||
padding-left: 5px;
|
||||
white-space: preserve nowrap;
|
||||
}
|
||||
#source .source-content ol li::marker {
|
||||
color: var(--color-muted);
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar_search_css_class %}{% endblock %}
|
||||
{% block sidebar_shortcuts_links %}{% endblock %}
|
||||
{% block sidebar_shortcuts_links %}
|
||||
{{ parent() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block panel %}
|
||||
<div class="sf-tabs" data-processed="true">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</div>
|
||||
<div id="sfToolbarClearer-{{ token }}" class="sf-toolbar-clearer"></div>
|
||||
|
||||
<div id="sfToolbarMainContent-{{ token }}" class="sf-toolbarreset notranslate clear-fix" data-no-turbolink>
|
||||
<div id="sfToolbarMainContent-{{ token }}" class="sf-toolbarreset notranslate clear-fix" data-no-turbolink data-turbo="false">
|
||||
{% for name, template in templates %}
|
||||
{% if block('toolbar', template) is defined %}
|
||||
{% with {
|
||||
|
||||
@@ -413,11 +413,7 @@
|
||||
renderAjaxRequests: renderAjaxRequests,
|
||||
|
||||
getSfwdt: function(token) {
|
||||
if (!this.sfwdt) {
|
||||
this.sfwdt = document.getElementById('sfwdt' + token);
|
||||
}
|
||||
|
||||
return this.sfwdt;
|
||||
return document.getElementById('sfwdt' + token);
|
||||
},
|
||||
|
||||
load: function(selector, url, onSuccess, onError, options) {
|
||||
@@ -433,7 +429,7 @@
|
||||
var pending = pendingRequests;
|
||||
for (var i = 0; i < requestStack.length; i++) {
|
||||
startAjaxRequest(i);
|
||||
if (requestStack[i].duration) {
|
||||
if (requestStack[i].duration || requestStack[i].error) {
|
||||
finishAjaxRequest(i);
|
||||
}
|
||||
}
|
||||
@@ -542,11 +538,16 @@
|
||||
'sfwdt' + token,
|
||||
'{{ url("_wdt", { "token": "xxxxxx" })|escape('js') }}'.replace(/xxxxxx/, newToken),
|
||||
function(xhr, el) {
|
||||
var toolbarContent = document.getElementById('sfToolbarMainContent-' + newToken);
|
||||
|
||||
/* Do nothing in the edge case where the toolbar has already been replaced with a new one */
|
||||
if (!document.getElementById('sfToolbarMainContent-' + newToken)) {
|
||||
if (!toolbarContent) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Replace the ID, it has to match the new token */
|
||||
toolbarContent.parentElement.id = 'sfwdt' + newToken;
|
||||
|
||||
/* Evaluate in global scope scripts embedded inside the toolbar */
|
||||
var i, scripts = [].slice.call(el.querySelectorAll('script'));
|
||||
for (i = 0; i < scripts.length; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user