jQuery UI可排序连接具有不可排序行的可排序行

时间:2013-02-26 14:52:14

标签: jquery-ui jquery-ui-sortable

我一直在为cms系统开发一个小页面排序系统。目前我在一个表中显示我的数据(所有页面),由于jQuery UI,我已经将其排序。唯一的问题是没有子页面行被分配给任何父行,如列表对象内的未排序列表等。我已经做了一个小例子来向你们展示我的意思。

http://www.lautenbagreclame.nl/stackover_example.jpg

$('table#pages-overview tbody').sortable({

    handle : 'i.icon-resize-vertical',
    opacity : 0.3,
    placeholder : 'drag-drop-table-row',
    axis : 'y',
    helper: fixHelper,
    forceHelperSize: true,
    cursor: 'n-resize',
    zIndex: 9999,
    start: function(event, ui) {

        elementObjPagesOverview.children('tr').each(function() {
            if($(this).data('group') != ui.helper.data('group')) {
                // row isnt in the same group... so not allowed to connect !
            } else {
                // row is in the same group... so allowed to connect !
            }
        });

    }

});

整个表格是动态构建的。希望有人可以帮我解决这个问题。

谢谢!

0 个答案:

没有答案
相关问题