More jQuery based scripts optimizations, props Denis-de-Bernardy, see #10021

git-svn-id: http://svn.automattic.com/wordpress/trunk@11858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-08-21 01:03:26 +00:00
parent 390a75658b
commit 7a5b2339d9
5 changed files with 7 additions and 8 deletions

View File

@ -175,8 +175,8 @@ jQuery(document).ready( function($) {
.animate( { opacity: 1 }, 400);
// Move .updated and .error alert boxes
$('div.wrap').children('h2:first').nextAll('div.updated, div.error').addClass('below-h2');
$('div.updated, div.error').not('.below-h2').insertAfter( $('div.wrap').children('h2:first') );
$('div.wrap h2:first').nextAll('div.updated, div.error').addClass('below-h2');
$('div.updated, div.error').not('.below-h2').insertAfter( $('div.wrap h2:first') );
// screen settings tab
$('#show-settings-link').click(function () {

File diff suppressed because one or more lines are too long

View File

@ -91,7 +91,6 @@ wpWidgets = {
placeholder: 'widget-placeholder',
items: '> .widget',
handle: '> .widget-top > .widget-title',
connectWith: 'div.widgets-sortables',
cursor: 'move',
distance: 2,
containment: 'document',
@ -138,7 +137,7 @@ wpWidgets = {
if ( !$(this).is(':visible') )
$(this).sortable('cancel');
}
}).parent().filter('.closed').children('.widgets-sortables').sortable('disable');
})..sortable('option', 'connectWith', 'div.widgets-sortables').parent().filter('.closed').children('.widgets-sortables').sortable('disable');
$('#available-widgets').droppable({
tolerance: 'pointer',

File diff suppressed because one or more lines are too long

View File

@ -60,7 +60,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20090102' );
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20090817' );
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20090820' );
$scripts->add_data( 'common', 'group', 1 );
$scripts->localize( 'common', 'commonL10n', array(
'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete."),
@ -340,7 +340,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox' ), '20090114' );
$scripts->add_data( 'media-upload', 'group', 1 );
$scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), '20090817' );
$scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), '20090820' );
$scripts->add_data( 'admin-widgets', 'group', 1 );
$scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array( 'jquery' ), '20090422' );