mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
git-svn-id: https://develop.svn.wordpress.org/trunk@6571 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -102,11 +102,20 @@ jQuery(function($) {
|
||||
|
||||
$('a.widget-control-add').click( addClick );
|
||||
|
||||
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',
|
||||
onStop: widgetSortableInit
|
||||
} );
|
||||
}
|
||||
|
||||
// initialize sortable
|
||||
var widgetSortable = $('#current-sidebar .widget-control-list').Sortable( {
|
||||
accept: 'widget-sortable',
|
||||
helperclass: 'sorthelper',
|
||||
handle: 'h4.widget-title'
|
||||
} );
|
||||
widgetSortableInit();
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user