* Finish task #43987.

This commit is contained in:
孙广明
2021-11-11 16:40:53 +08:00
parent b0d73a4e6c
commit a742b36ef7
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -2433,7 +2433,7 @@ EOT;
}
}
$treeMenu[$module->parent] .= '<li class="' . implode(' ', $class) . '" data-id=' . $module->id . '>' . $li . '</li>';
$treeMenu[$module->parent] .= '<li class=" can-sort ' . implode(' ', $class) . '" data-id=' . $module->id . '>' . $li . '</li>';
}
/**
+4 -3
View File
@@ -98,15 +98,16 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
if(!e.changed) return;
var orders = {};
$('#modules').find('li.has-list').each(function()
$('#modules').find('li.can-sort').each(function()
{
var $li = $(this);
var item = $li.data();
orders['orders[' + item.id + ']'] = $li.attr('data-order') || item.order;
'<?php echo $type;?>' == 'book' ? orders['sort[' + item.id + ']'] = $li.attr('data-order') || item.order : orders['orders[' + item.id + ']'] = $li.attr('data-order') || item.order;
});
$.post('<?php echo $this->createLink('tree', 'updateOrder');?>', orders, function(data){}).error(function()
var link = '<?php echo $type;?>' == 'book' ? createLink('doc', 'sortBookOrder') : createLink('tree', 'updateOrder');
$.post(link, orders, function(data){}).error(function()
{
bootbox.alert(lang.timeout);
});