* update zui.sortable.js.

This commit is contained in:
Catouse
2015-05-08 14:43:58 +08:00
parent 091ad90cd3
commit 0ed8b0b52e
4 changed files with 10 additions and 4 deletions
+6
View File
@@ -26,6 +26,12 @@ $(document).ready(function()
trigger: $tbody.find('.sort-handler').length ? '.sort-handler' : null,
finish: function(e)
{
var orders = {};
e.list.each(function(){
var $this = $(this);
orders[$this.data('id')] = parseInt($this.attr('data-order'));
});
e.orders = orders;
$tbody.trigger('sort.sortable', e);
var $thead = $tbody.closest('table').children('thead');
$thead.find('.headerSortDown, .headerSortUp').removeClass('headerSortDown headerSortUp').addClass('header');
+1 -1
View File
@@ -55,7 +55,7 @@
<?php $canBatchEdit = common::hasPriv('product', 'batchEdit'); ?>
<tbody class='sortable' id='productTableList'>
<?php foreach($productStats as $product):?>
<tr class='text-center'>
<tr class='text-center' data-id='<?php echo $product->id ?>' data-order='<?php echo $product->id ?>'>
<?php if(strpos($orderBy, 'order') !== false):?>
<td class='sort-handler'><i class="icon icon-ellipsis-v"></i></td>
<?php endif;?>
+1 -1
View File
@@ -49,7 +49,7 @@
<?php $canBatchEdit = common::hasPriv('project', 'batchEdit'); ?>
<tbody class='sortable' id='projectTableList'>
<?php foreach($projectStats as $project):?>
<tr class='text-center'>
<tr class='text-center' data-id='<?php echo $project->id ?>' data-order='<?php echo $project->id ?>'>
<?php if(strpos($orderBy, 'order') !== false):?>
<td class='sort-handler'><i class="icon icon-ellipsis-v"></i></td>
<?php endif;?>
File diff suppressed because one or more lines are too long