diff --git a/module/task/control.php b/module/task/control.php index aeea86d919..3a9ce174a0 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -514,12 +514,18 @@ class task extends control * @access public * @return void */ - public function deleteWorkhour($estimateID) + public function deleteWorkhour($estimateID, $confirm = 'no') { $estimate = $this->task->getEffortByID($estimateID); $taskID = $estimate->objectID; $task = $this->task->getById($taskID); + if($confirm == 'no' and $task->consumed - $estimate->consumed == 0) + { + $formUrl = $this->createLink('task', 'deleteWorkhour', "estimateID=$estimateID&confirm=yes"); + return $this->send(array('result' => 'fail', 'callback' => "zui.Modal.confirm({$this->lang->task->confirmDeleteLastEstimate}).then((res) => {if(res) $.ajaxSubmit({url: $formUrl})});")); + } + $changes = $this->task->deleteWorkhour($estimateID); if(dao::isError()) return print(js::error(dao::getError())); diff --git a/module/task/css/create.ui.css b/module/task/css/create.ui.css index 8e4cc67166..722aa4b3d0 100644 --- a/module/task/css/create.ui.css +++ b/module/task/css/create.ui.css @@ -20,3 +20,9 @@ .assignedToList .label, .assignedToList .icon{margin-right: 5px; margin-bottom: 5px} :root {--modal-base: 45rem;} + +.line-arrow {display: inline-block; transform: scaleY(6); font-size: 20px; position: relative; right: 20px; color:#2e7fff;} +.team-index {overflow: hidden} +#teamTable tr:nth-last-child(-n+2) .team-index{overflow:visible; } +#teamTable tr:nth-child(2) .line-arrow{transform: scaleY(4); top: 20px} +#teamTable tr:nth-last-child(-n+2) .line-arrow{bottom:12px; transform: scaleY(2)} diff --git a/module/task/ui/create.html.php b/module/task/ui/create.html.php index 2d9f1c1653..353cd0f0af 100644 --- a/module/task/ui/create.html.php +++ b/module/task/ui/create.html.php @@ -133,6 +133,11 @@ for($i = 1; $i <= 3; $i ++) ( setClass('team-index'), span + ( + setClass("line-arrow"), + '↓' + ) , + span ( setClass("team-number"), $i