diff --git a/db/update4.0.beta2.sql b/db/update4.0.beta2.sql index 785d26ae67..50bed16b2d 100644 --- a/db/update4.0.beta2.sql +++ b/db/update4.0.beta2.sql @@ -14,3 +14,4 @@ UPDATE `zt_config` SET `section` = 'global' WHERE `key` = 'flow'; UPDATE `zt_project` SET `status` = 'doing' WHERE `status` = ''; ALTER TABLE `zt_testtask` ADD `report` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `desc`; ALTER TABLE `zt_project` CHANGE `type` `type` VARCHAR( 20 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'sprint'; +ALTER TABLE `zt_taskEstimate` CHANGE `date` `date` DATE NOT NULL; diff --git a/framework/helper.class.php b/framework/helper.class.php index 62602f2311..918e239990 100644 --- a/framework/helper.class.php +++ b/framework/helper.class.php @@ -108,7 +108,7 @@ class helper } /* if page has onlybody param then add this param in all link. the param hide header and footer. */ - if($onlybody or (isset($_GET['onlybody']) and $_GET['onlybody'] == 'yes')) + if($onlybody or isonlybody()) { $onlybody = $config->requestType == 'PATH_INFO' ? "?onlybody=yes" : "&onlybody=yes"; $link .= $onlybody; @@ -543,3 +543,14 @@ function getWebRoot() { return substr($_SERVER['SCRIPT_NAME'], 0, (strrpos($_SERVER['SCRIPT_NAME'], '/') + 1)); } + +/** + * Check exist onlybody param. + * + * @access public + * @return void + */ +function isonlybody() +{ + return (isset($_GET['onlybody']) and $_GET['onlybody'] == 'yes'); +} diff --git a/lib/front/front.class.php b/lib/front/front.class.php index 98e712cbf9..c34d1c2ba6 100644 --- a/lib/front/front.class.php +++ b/lib/front/front.class.php @@ -87,7 +87,7 @@ class html $newline = $newline ? "\n" : ''; /* if page has onlybody param then add this param in all link. the param hide header and footer. */ - if(strpos($href, 'onlybody=yes') === false and isset($_GET['onlybody']) and $_GET['onlybody'] == 'yes') + if(strpos($href, 'onlybody=yes') === false and isonlybody()) { $onlybody = $config->requestType == 'PATH_INFO' ? "?onlybody=yes" : "&onlybody=yes"; $href .= $onlybody; @@ -462,7 +462,7 @@ EOT; global $config; /* if page has onlybody param then add this param in all link. the param hide header and footer. */ - if(strpos($link, 'onlybody=') === false and isset($_GET['onlybody']) and $_GET['onlybody'] == 'yes') + if(strpos($link, 'onlybody=') === false and isonlybody()) { $onlybody = $config->requestType == 'PATH_INFO' ? "?onlybody=yes" : "&onlybody=yes"; $link .= $onlybody; diff --git a/module/project/js/task.js b/module/project/js/task.js index 3ae35f9f8b..dfce145cc4 100644 --- a/module/project/js/task.js +++ b/module/project/js/task.js @@ -10,6 +10,7 @@ $(function() { $('#' + browseType + 'Tab').addClass('active'); if(browseType == 'bysearch') ajaxGetSearchForm(); + $('.iframe').colorbox({width:900, height:400, iframe:true}); }); /* Browse by project. */ diff --git a/module/project/view/task.html.php b/module/project/view/task.html.php index f453062c5e..277a99ef75 100644 --- a/module/project/view/task.html.php +++ b/module/project/view/task.html.php @@ -120,7 +120,7 @@ var browseType = ''; id", $task, 'list'); + common::printIcon('task', 'record', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); if($browseType == 'needconfirm') { $lang->task->confirmStoryChange = $lang->confirm; diff --git a/module/task/control.php b/module/task/control.php index 97e7ef57be..7a4edf2dac 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -430,7 +430,7 @@ class task extends control * @access public * @return void */ - public function record($taskID, $confirm = 'no') + public function record($taskID) { $this->commonAction($taskID); @@ -439,6 +439,7 @@ class task extends control $changes = $this->task->record($taskID); $actionID = $this->action->create('task', $taskID, 'Recorded', $this->post->comment, (float)$this->post->consumed); $this->action->logHistory($actionID, $changes); + if(isonlybody()) die(js::reload('parent.parent')); die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent')); } diff --git a/module/task/js/view.js b/module/task/js/view.js index 27a9d91402..5c753cf023 100644 --- a/module/task/js/view.js +++ b/module/task/js/view.js @@ -4,3 +4,4 @@ function assign(taskID, assignedTo) $('.assign').height(40); $('.assign').load(createLink('user', 'ajaxGetUser', 'taskID=' + taskID + '&assignedTo=' + assignedTo)); } +$(function(){$('.iframe').colorbox({width:900, height:400, iframe:true});}) diff --git a/module/task/view/record.html.php b/module/task/view/record.html.php index aa5e5f6888..b2fbb7e756 100644 --- a/module/task/view/record.html.php +++ b/module/task/view/record.html.php @@ -15,6 +15,10 @@
+ + + + diff --git a/module/task/view/view.html.php b/module/task/view/view.html.php index 54916eec57..bff432eb5b 100644 --- a/module/task/view/view.html.php +++ b/module/task/view/view.html.php @@ -26,7 +26,7 @@ ob_start(); common::printIcon('task', 'assignTo', "projectID=$task->project&taskID=$task->id", $task); common::printIcon('task', 'start', "taskID=$task->id", $task); - common::printIcon('task', 'record', "taskID=$task->id", $task); + common::printIcon('task', 'record', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); common::printIcon('task', 'finish', "taskID=$task->id", $task); common::printIcon('task', 'close', "taskID=$task->id", $task); common::printIcon('task', 'activate', "taskID=$task->id", $task);
name;?>
task->estimate;?>estimate . ' ' . $lang->task->hour;?>
task->beforeConsumed;?> task->hour;?>