git-svn-id: http://svn.automattic.com/wordpress/trunk@6571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
62d4757979
commit
7c8824653d
|
@ -102,11 +102,20 @@ jQuery(function($) {
|
|||
|
||||
$('a.widget-control-add').click( addClick );
|
||||
|
||||
// initialize sortable
|
||||
var widgetSortable = $('#current-sidebar .widget-control-list').Sortable( {
|
||||
var widgetSortable;
|
||||
var widgetSortableInit = function() {
|
||||
try { // a hack to make sortables work in jQuery 1.2+ and IE7
|
||||
$('#current-sidebar .widget-control-list').SortableDestroy();
|
||||
} catch(e) {}
|
||||
widgetSortable = $('#current-sidebar .widget-control-list').Sortable( {
|
||||
accept: 'widget-sortable',
|
||||
helperclass: 'sorthelper',
|
||||
handle: 'h4.widget-title'
|
||||
handle: 'h4.widget-title',
|
||||
onStop: widgetSortableInit
|
||||
} );
|
||||
}
|
||||
|
||||
// initialize sortable
|
||||
widgetSortableInit();
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue