mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 16:21:26 +01:00
Verify that a widget is draggable before stripping its draggability. props filosofo, see #12863. Fixes widget creation for jQUI 1.8.5; should be fixed in jQUI 1.8.6.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6c0eb6bf79
commit
38e017024d
@ -100,7 +100,7 @@ wpWidgets = {
|
||||
ui.item.css({'marginLeft':'','width':''});
|
||||
},
|
||||
stop: function(e,ui) {
|
||||
if ( ui.item.hasClass('ui-draggable') )
|
||||
if ( ui.item.hasClass('ui-draggable') && ui.item.data('draggable') )
|
||||
ui.item.draggable('destroy');
|
||||
|
||||
if ( ui.item.hasClass('deleting') ) {
|
||||
|
File diff suppressed because one or more lines are too long
@ -337,7 +337,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox' ), '20091023' );
|
||||
$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' ), '20090824' );
|
||||
$scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), '20101007' );
|
||||
$scripts->add_data( 'admin-widgets', 'group', 1 );
|
||||
|
||||
$scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array( 'jquery' ), '20090422' );
|
||||
|
Loading…
Reference in New Issue
Block a user