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: https://develop.svn.wordpress.org/trunk@15738 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b6c2c3003c
commit
6c9318e763
@ -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