#30885 closed defect (bug) (fixed)
Move alert boxes with class notice
| Reported by: | sippis | Owned by: | azaozz |
|---|---|---|---|
| Priority: | low | Milestone: | 4.1.1 |
| Component: | Administration | Version: | 4.1 |
| Severity: | minor | Keywords: | has-patch commit fixed-major |
| Cc: | Focuses: | ui, javascript |
Description
In #27418 there were added new main class for admin notices, but javascript wasn't updated to work with it.
Right now javascript moves divs "updated" and "error" to the wrap div. This should also be done for divs with class "notice".
Current wp-admin/js/common.js:371-373
// Move .updated and .error alert boxes. Don't move boxes designed to be inline.
$('div.wrap h2:first').nextAll('div.updated, div.error').addClass('below-h2');
$('div.updated, div.error').not('.below-h2, .inline').insertAfter( $('div.wrap h2:first') );
Updating those lines to following fixes this problem
// Move .updated, .error and .notice alert boxes. Don't move boxes designed to be inline.
$('div.wrap h2:first').nextAll('div.updated, div.error, div.notice').addClass('below-h2');
$('div.updated, div.error, div.notice').not('.below-h2, .inline').insertAfter( $('div.wrap h2:first') );
Attachments (1)
Change History (10)
#1
@
12 years ago
- Summary Move new alert boxes with class notice → Move alert boxes with class notice
This ticket was mentioned in Slack in #core by sippis. View the logs.
12 years ago
#5
@
12 years ago
- Keywords has-patch commit fixed-major added
- Milestone 4.2 → 4.1.1
- Priority normal → low
- Resolution fixed
- Status closed → reopened
Moving for 4.1.1 consideration.
#6
follow-up:
↓ 9
@
12 years ago
I think we should pull this JS out altogether and leave admin notices at the top of the page. It causes admin notices to jump around, especially if the browser or the page is slow to load.
Thoughts?
This ticket was mentioned in Slack in #core by dd32. View the logs.
12 years ago
#9
in reply to: ↑ 6
@
12 years ago
Replying to johnbillion:
I think we should pull this JS out altogether and leave admin notices at the top of the page. It causes admin notices to jump around, especially if the browser or the page is slow to load.
Thoughts?
I think we all hate it (slack), and the notices should be output in the correct place in the first place, sounds like something worth looking at in a new ticket
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thanks @sippis, looks good. Can also reuse one of the selectors and fix the syntax a bit.