diff --git a/module/task/control.php b/module/task/control.php index 03e9237dda..64eb1c5159 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -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')); diff --git a/module/task/js/recordestimate.js b/module/task/js/recordestimate.js index bce3f5786f..276426a493 100644 --- a/module/task/js/recordestimate.js +++ b/module/task/js/recordestimate.js @@ -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; } }); diff --git a/module/task/lang/en.php b/module/task/lang/en.php index c1b0d8ebf7..cd0ba62daa 100644 --- a/module/task/lang/en.php +++ b/module/task/lang/en.php @@ -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%s.'; $lang->task->error = new stdclass(); diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php index abdb765e79..4e8ed61531 100644 --- a/module/task/lang/zh-cn.php +++ b/module/task/lang/zh-cn.php @@ -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, 由 %s 添加备注。'; $lang->task->error = new stdclass(); diff --git a/module/task/view/recordestimate.html.php b/module/task/view/recordestimate.html.php index fa8c8a2fed..7d26842210 100644 --- a/module/task/view/recordestimate.html.php +++ b/module/task/view/recordestimate.html.php @@ -12,8 +12,8 @@ ?> -task->confirmRecord);?> -task->confirmSaveRecord);?> +task->confirmRecord);?> +task->noticeSaveRecord);?>
icons['task']);?> id;?>