Finish task#3255 禅道中所有列表页面都增加自定义显示字段的功能,cost:12 left:0
This commit is contained in:
@@ -62,7 +62,8 @@
|
||||
<div class='clearfix col<?php echo ($required ? ' require' : '') . (' fixed-' . $fixed) ?>' data-key='<?php echo $key?>' data-fixed='<?php echo $fixed?>' data-width='<?php echo $col['width']?>'>
|
||||
<i class='icon-ok'></i> <span class='title'><span class='title-bar'><strong><?php echo $col['title']?></strong><i class='icon-move'></i></span></span> <?php if($required) echo "<span class='text-muted'>({$lang->datatable->required})</span>"?>
|
||||
<div class='actions pull-right'>
|
||||
<span><span class='text-muted'><?php echo $lang->datatable->width?></span> <input type='text' class='form-control' value='<?php echo $col['width']?>'><?php echo $autoWidth ? ' ' : 'px' ?></span>
|
||||
<?php if(isset($col['name'])) echo html::hidden('name', $col['name'])?>
|
||||
<span><span class='text-muted'><?php echo $lang->datatable->width?></span> <input type='text' id='width' class='form-control' value='<?php echo $col['width']?>'><?php echo $autoWidth ? ' ' : 'px' ?></span>
|
||||
<button type='button' class='btn btn-link show-hide<?php echo $required ? ' disabled' : '' ?>'><span class='label-show'><?php echo $lang->datatable->show?></span><span class='text-muted'>/</span><span class='label-hide'><?php echo $lang->datatable->hide?></span></button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -179,8 +180,9 @@ $(function()
|
||||
var setting = $('.col').map(function(index)
|
||||
{
|
||||
var $col = $(this);
|
||||
var sets = {id: $col.data('key'), order: index + 1, show: !$col.hasClass('disabled'), width: $col.find('input').val(), fixed: $col.data('fixed')};
|
||||
var sets = {id: $col.data('key'), order: index + 1, show: !$col.hasClass('disabled'), width: $col.find('input#width').val(), fixed: $col.data('fixed')};
|
||||
if(sets.width !== 'auto') sets.width += 'px';
|
||||
if($col.find('#name').size() > 0) sets.name = $col.find('#name').val();
|
||||
return sets;
|
||||
}).get();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user