2008年
6月 05
WordPress の管理画面でダイナミックウィジットを編集する機能で、ウィジットをドラッグ&ドロップして順番を入れ替えることができます。しかし、ドロップする場所によっては下記画像のようになってしまいます。

WordPress 2.5.1 を使用していますが、WordPress のバグだと思われますが取り急ぎ修正する方法です。
wp-admin/js/widgets.js の 125行目からの
widgetSortable = $('#current-sidebar .widget-control-list').Sortable( {
accept: 'widget-sortable',
helperclass: 'sorthelper',
handle: 'h4.widget-title',
onStop: widgetSortableInit
} );
となっているところを
widgetSortable = $('#current-sidebar .widget-control-list').Sortable( {
accept: 'widget-sortable',
helperclass: 'sorthelper',
handle: 'h4.widget-title',
onStop: widgetSortableInit,
revert: true
} );
とすることに修正できます。
jQuery の sortable に revert: true を指定してやるだけです。
revert を追加する上の行の最後にカンマを入れるのをお忘れなく。
関連する投稿
One Response to “WordPress 管理画面でウィジットをドラッグ&ドロップするとおかしくなるのを修正”
Leave a Reply
Additional comments powered by BackType




6月 25th, 2008 at 11:28 pm
[...] そしたら偶然 Sun Limited Mt. [...]