Skip to content

Commit

Permalink
[WebProfilerBundle] Append new ajax request to the end of the list
Browse files Browse the repository at this point in the history
  • Loading branch information
BoShurik authored and fabpot committed Aug 2, 2018
1 parent 83232f8 commit 45d4559
Showing 1 changed file with 9 additions and 2 deletions.
Expand Up @@ -128,7 +128,7 @@
var nbOfAjaxRequest = tbody.rows.length;
if (nbOfAjaxRequest >= 100) {
tbody.deleteRow(nbOfAjaxRequest - 1);
tbody.deleteRow(0);
}
var request = requestStack[index];
Expand Down Expand Up @@ -177,7 +177,10 @@
}, 100);
row.className = 'sf-ajax-request sf-ajax-request-loading';
tbody.insertBefore(row, tbody.firstChild);
tbody.insertBefore(row, null);
var toolbarInfo = document.querySelector('.sf-toolbar-block-ajax .sf-toolbar-info');
toolbarInfo.scrollTop = toolbarInfo.scrollHeight;
renderAjaxRequests();
};
Expand Down Expand Up @@ -492,6 +495,10 @@
setPreference('toolbar/displayState', 'block');
});
renderAjaxRequests();
addEventListener(document.querySelector('.sf-toolbar-block-ajax'), 'mouseenter', function (event) {
var elem = document.querySelector('.sf-toolbar-block-ajax .sf-toolbar-info');
elem.scrollTop = elem.scrollHeight;
});
addEventListener(document.querySelector('.sf-toolbar-block-ajax > .sf-toolbar-icon'), 'click', function (event) {
event.preventDefault();
Expand Down

0 comments on commit 45d4559

Please sign in to comment.