* adjust for story field for custom.
This commit is contained in:
@@ -217,7 +217,6 @@ tfoot tr td .table-actions .btn{display:none;}
|
||||
<th class='w-date {sorter:false}'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
|
||||
<th class='w-user {sorter:false}'> <?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedByAB);?></th>
|
||||
<th class='w-100px {sorter:false}'> <?php common::printOrderLink('resolvedDate', $orderBy, $vars, $lang->bug->resolvedDateAB);?></th>
|
||||
<th class='w-50px {sorter:false}'> <?php echo $lang->actions?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php foreach($generatedBugs as $bug):?>
|
||||
|
||||
@@ -126,7 +126,7 @@ $(function()
|
||||
var $col = $cols.filter('[data-key=' + col.id + ']');
|
||||
$col.toggleClass('disabled', !col.show);
|
||||
$col.attr('data-order', col.order);
|
||||
if(col.width) $col.find('input').val(col.width.replace('px', ''));
|
||||
if(col.width) $col.find('input#width').val(col.width.replace('px', ''));
|
||||
}
|
||||
|
||||
$('.cols-list').on('click', '.col:not(.require) .show-hide, .col:not(.require) .title', function()
|
||||
@@ -149,14 +149,14 @@ $(function()
|
||||
|
||||
$list.sortable({trigger: '.title', selector: '.col'});
|
||||
}
|
||||
}).on('keyup change', 'input', function()
|
||||
}).on('keyup change', 'input#width', function()
|
||||
{
|
||||
renderColWidth($(this).closest('.col'));
|
||||
});
|
||||
|
||||
function renderColWidth($col)
|
||||
{
|
||||
var width = $col.find('input').val();
|
||||
var width = $col.find('input#width').val();
|
||||
if(width == 'auto')
|
||||
{
|
||||
width = '500';
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
<tr>
|
||||
<th class='w-id'><?php echo $lang->group->id;?></th>
|
||||
<th class='w-100px'><?php echo $lang->group->name;?></th>
|
||||
<th><?php echo $lang->group->desc;?></th>
|
||||
<th class='w-p60'><?php echo $lang->group->users;?></th>
|
||||
<th class='w-250px'><?php echo $lang->group->desc;?></th>
|
||||
<th><?php echo $lang->group->users;?></th>
|
||||
<th class='w-150px {sorter:false}'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -38,7 +38,7 @@
|
||||
<tr class='text-center'>
|
||||
<td class='strong'><?php echo $group->id;?></td>
|
||||
<td class='text-left'><?php echo $group->name;?></td>
|
||||
<td class='text-left'><?php echo $group->desc;?></td>
|
||||
<td class='text-left' title='<?php echo $group->desc?>'><?php echo $group->desc;?></td>
|
||||
<td class='text-left' title='<?php echo $users;?>'><?php echo $users;?></td>
|
||||
<td class='text-center'>
|
||||
<?php $lang->group->managepriv = $lang->group->managePrivByGroup;?>
|
||||
|
||||
@@ -174,9 +174,9 @@ $config->task->datatable->fieldList['closedReason']['width'] = '80';
|
||||
$config->task->datatable->fieldList['closedReason']['required'] = 'no';
|
||||
|
||||
global $lang;
|
||||
$config->task->datatable->fieldList['story']['title'] = "S";
|
||||
$config->task->datatable->fieldList['story']['title'] = "storyAB";
|
||||
$config->task->datatable->fieldList['story']['fixed'] = 'no';
|
||||
$config->task->datatable->fieldList['story']['width'] = '30';
|
||||
$config->task->datatable->fieldList['story']['width'] = '40';
|
||||
$config->task->datatable->fieldList['story']['required'] = 'no';
|
||||
$config->task->datatable->fieldList['story']['name'] = $lang->task->story;
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ $lang->task->project = $lang->projectCommon;
|
||||
$lang->task->module = 'Module';
|
||||
$lang->task->moduleAB = 'Module';
|
||||
$lang->task->story = 'Story';
|
||||
$lang->task->storyAB = 'Story';
|
||||
$lang->task->storySpec = 'Story Description';
|
||||
$lang->task->storyVerify = 'Acceptance';
|
||||
$lang->task->name = 'Name';
|
||||
|
||||
@@ -45,6 +45,7 @@ $lang->task->project = '所属' . $lang->projectCommon;
|
||||
$lang->task->module = '所属模块';
|
||||
$lang->task->moduleAB = '模块';
|
||||
$lang->task->story = '相关需求';
|
||||
$lang->task->storyAB = '需求';
|
||||
$lang->task->storySpec = '需求描述';
|
||||
$lang->task->storyVerify = '验收标准';
|
||||
$lang->task->name = '任务名称';
|
||||
|
||||
@@ -2034,7 +2034,7 @@ class taskModel extends model
|
||||
$class = '';
|
||||
if($id == 'status') $class .= ' task-' . $task->status;
|
||||
if($id == 'id') $class .= ' cell-id';
|
||||
if($id == 'name' or $id == 'story') $class .= ' text-left';
|
||||
if($id == 'name') $class .= ' text-left';
|
||||
if($id == 'deadline' and isset($task->delay)) $class .= ' delayed';
|
||||
if($id == 'assignedTo' && $task->assignedTo == $account) $class .= ' red';
|
||||
|
||||
|
||||
@@ -1938,4 +1938,25 @@ class upgradeModel extends model
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change story field width.
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function changeStoryWidth()
|
||||
{
|
||||
$projectCustom = $this->dao->select('*')->from(TABLE_CONFIG)->where('section')->eq('projectTask')->andWhere('`key`')->in('cols,tablecols')->fetchAll('id');
|
||||
foreach($projectCustom as $configID => $projectTask)
|
||||
{
|
||||
$fields = json_decode($projectTask->value);
|
||||
foreach($fields as $i => $field)
|
||||
{
|
||||
if($field->id == 'story') $field->width = '40px';
|
||||
}
|
||||
$this->dao->update(TABLE_CONFIG)->set('value')->eq(json_encode($fields))->where('id')->eq($configID)->exec();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user