8000 [WebProfilerBundle] Append new ajax request to the end of the list by BoShurik · Pull Request #27763 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[WebProfilerBundle] Append new ajax request to the end of the list #27763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[WebProfilerBundle] Append new ajax request to the end of the list
  • Loading branch information
BoShurik authored and fabpot committed Aug 2, 2018
commit 45d4559ab256924633aa2da7e0f0237ebcc7c852
8000
Original file line number Diff line number Diff line change
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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't that tbody.appendChild(row) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stof oh, missed that one. Is it worth a new PR?


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