git-svn-id: https://develop.svn.wordpress.org/trunk@6571 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5daadf8ce7
commit
e90247fe6d
|
@ -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