#30885 closed defect (bug) (fixed)
Move alert boxes with class notice
Reported by: | sippis | Owned by: | azaozz |
---|---|---|---|
Milestone: | 4.1.1 | Priority: | low |
Severity: | minor | Version: | 4.1 |
Component: | Administration | Keywords: | has-patch commit fixed-major |
Focuses: | ui, javascript | Cc: |
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
@
10 years ago
- Summary changed from Move new alert boxes with class notice to Move alert boxes with class notice
#2
@
10 years ago
- Milestone changed from Awaiting Review to 4.2
- Severity changed from normal to minor
#3
@
10 years ago
- Owner set to azaozz
- Resolution set to fixed
- Status changed from new to closed
In 31023:
This ticket was mentioned in Slack in #core by sippis. View the logs.
10 years ago
#5
@
10 years ago
- Keywords has-patch commit fixed-major added
- Milestone changed from 4.2 to 4.1.1
- Priority changed from normal to low
- Resolution fixed deleted
- Status changed from closed to reopened
Moving for 4.1.1 consideration.
#6
follow-up:
↓ 9
@
10 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.
10 years ago
#9
in reply to:
↑ 6
@
10 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
Thanks @sippis, looks good. Can also reuse one of the selectors and fix the syntax a bit.