This commit is contained in:
hufangzhou
2020-12-24 13:16:38 +08:00
2 changed files with 15 additions and 5 deletions
+13 -1
View File
@@ -1,7 +1,19 @@
$("#" + browseType + "Tab").addClass('btn-active-text');
$(function()
{
$('#productTableList').on('sort.sortable', function(e, data)
var $list = $('#programTableList');
$('#productTableList').addClass('sortable').sortable(
{
selector: 'tr',
dragCssClass: 'drag-row',
trigger: $list.find('.sort-handler').length ? '.sort-handler' : null,
canMoveHere: function($ele, $target)
{
return $ele.data('parent') === $target.data('parent');
}
});
$('#productTableList').on('sortable', function(e, data)
{
var list = '';
for(i = 0; i < data.list.length; i++) list += $(data.list[i].item).attr('data-id') + ',';
+2 -4
View File
@@ -10,7 +10,6 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/sortable.html.php';?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php foreach($lang->product->featureBar['all'] as $key => $label):?>
@@ -49,12 +48,11 @@
<th class='c-actions w-60px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody class="sortable" id="productTableList">
<tbody id="productTableList">
<?php foreach($programs as $programID => $program):?>
<?php
$trClass = '';
$trAttrs = "data-id='program.$programID' data-parent='0' data-nested='true'";
$trClass = ' is-top-level table-nest-child-hide';
$trClass = 'is-top-level table-nest-child-hide';
$trAttrs .= " class='$trClass'";
?>
<?php if($program->name):?>