[wp-trac] [WordPress Trac] #30885: Move new alert boxes with class notice

WordPress Trac noreply at wordpress.org
Fri Jan 2 08:57:18 UTC 2015


#30885: Move new alert boxes with class notice
----------------------------+-----------------------------
 Reporter:  sippis          |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  4.1
 Severity:  normal          |   Keywords:
  Focuses:  ui, javascript  |
----------------------------+-----------------------------
 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') );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30885>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list