* alert users to save work record which has not been saved when they want to edit or delete the record.
This commit is contained in:
@@ -628,11 +628,6 @@ class task extends control
|
||||
}
|
||||
}
|
||||
}
|
||||
if($this->cookie->reload2Parent)
|
||||
{
|
||||
setcookie('reload2Parent', false, 0, $this->config->webRoot);
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
|
||||
@@ -13,18 +13,18 @@ $(function()
|
||||
{
|
||||
$(this).click(function()
|
||||
{
|
||||
var saveRecord = false;
|
||||
$('#recordForm .form-date').each(function()
|
||||
var hasRecord = false;
|
||||
$('#recordForm').find('input[name^="dates"], input[name^="consumed"], input[name^="left"], textarea[name^="work"]').each(function()
|
||||
{
|
||||
if($(this).val() !== '')
|
||||
{
|
||||
saveRecord = confirm(confirmSaveRecord);
|
||||
hasRecord = true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
if(saveRecord)
|
||||
if(hasRecord)
|
||||
{
|
||||
$.cookie('reload2Parent', true, {path:config.webRoot});
|
||||
alert(noticeSaveRecord);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -144,7 +144,7 @@ $lang->task->remindBug = "This task from Bug, update the Bug:%s or n
|
||||
$lang->task->confirmChangeProject = "Change {$lang->projectCommon} will change module, story and assignedTo also, are you sure?";
|
||||
$lang->task->confirmFinish = '"Left" is zero, this task will be done. Are you sure?';
|
||||
$lang->task->confirmRecord = '"Left" is zero, this task will be done. Are you sure?';
|
||||
$lang->task->confirmSaveRecord = 'Please save the estimate record which has not been saved.';
|
||||
$lang->task->noticeSaveRecord = 'Please save the estimate record which has not been saved.';
|
||||
$lang->task->commentActions = '%s. %s, commented by<strong>%s</strong>.';
|
||||
|
||||
$lang->task->error = new stdclass();
|
||||
|
||||
@@ -144,7 +144,7 @@ $lang->task->remindBug = "该任务为Bug转化得到,是否更新
|
||||
$lang->task->confirmChangeProject = "修改{$lang->projectCommon}会导致相应的所属模块、相关需求和指派人发生变化,确定吗?";
|
||||
$lang->task->confirmFinish = '"预计剩余"为0,确认将任务状态改为"已完成"吗?';
|
||||
$lang->task->confirmRecord = '"剩余"为0,任务将标记为"已完成",您确定吗?';
|
||||
$lang->task->confirmSaveRecord = '您有尚未保存的工时记录,请先将其保存。';
|
||||
$lang->task->noticeSaveRecord = '您有尚未保存的工时记录,请先将其保存。';
|
||||
$lang->task->commentActions = '%s. %s, 由 <strong>%s</strong> 添加备注。';
|
||||
|
||||
$lang->task->error = new stdclass();
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<?php js::set('confirmRecord', $lang->task->confirmRecord);?>
|
||||
<?php js::set('confirmSaveRecord', $lang->task->confirmSaveRecord);?>
|
||||
<?php js::set('confirmRecord', $lang->task->confirmRecord);?>
|
||||
<?php js::set('noticeSaveRecord', $lang->task->noticeSaveRecord);?>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['task']);?> <strong><?php echo $task->id;?></strong></span>
|
||||
|
||||
Reference in New Issue
Block a user