diff --git a/api/v1/entries/taskrecordestimate.php b/api/v1/entries/taskrecordestimate.php index 9b0dae7740..b6e87b068d 100644 --- a/api/v1/entries/taskrecordestimate.php +++ b/api/v1/entries/taskrecordestimate.php @@ -20,7 +20,8 @@ class taskRecordEstimateEntry extends Entry */ public function get($taskID) { - if($this->config->edition != 'open') + $issetEffort = $this->loadModel('effort') ? true : false; + if($issetEffort) { $control = $this->loadController('effort', 'createForObject'); $control->createForObject('task', $taskID); @@ -36,8 +37,8 @@ class taskRecordEstimateEntry extends Entry if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message); $effort = array(); - if($this->config->edition != 'open' and $data->data->efforts) $effort = $data->data->efforts; - if($this->config->edition == 'open' and $data->data->estimates) $effort = $data->data->estimates; + if($issetEffort and $data->data->efforts) $effort = $data->data->efforts; + if(!$issetEffort and $data->data->estimates) $effort = $data->data->estimates; $this->send(200, array('effort' => $effort)); } @@ -51,7 +52,7 @@ class taskRecordEstimateEntry extends Entry */ public function post($taskID) { - if($this->config->edition != 'open') + if($this->loadModel('effort')) { $fields = 'id,dates,consumed,left,objectType,objectID,work'; $this->batchSetPost($fields); diff --git a/module/block/control.php b/module/block/control.php index e8237a4b99..23bb4ac43e 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -896,7 +896,8 @@ class block extends control $count = isset($this->params->count) ? (int)$this->params->count : 15; /* Get projects. */ - $projects = $this->loadModel('project')->getOverviewList('byStatus', $status, 'id_desc', $count); + $excludedModel = $this->config->edition == 'max' ? '' : 'waterfall'; + $projects = $this->loadModel('project')->getOverviewList('byStatus', $status, 'id_desc', $count, $excludedModel); if(empty($projects)) { $this->view->projects = $projects; diff --git a/module/company/config.php b/module/company/config.php index 475e57d824..3b1ab78b81 100644 --- a/module/company/config.php +++ b/module/company/config.php @@ -11,7 +11,7 @@ $config->company->dynamic->search['module'] = 'action'; if($config->vision == 'rnd') $config->company->dynamic->search['fields']['product'] = $lang->action->product; -$config->company->dynamic->search['fields']['project'] = '项目'; +if($config->systemMode == 'new') $config->company->dynamic->search['fields']['project'] = '项目'; $config->company->dynamic->search['fields']['execution'] = $lang->action->execution; $config->company->dynamic->search['fields']['actor'] = $lang->action->actor; $config->company->dynamic->search['fields']['objectID'] = $lang->action->objectID; diff --git a/module/execution/control.php b/module/execution/control.php index c2201ad0f1..e89d613e03 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -126,7 +126,7 @@ class execution extends control $execution = $this->commonAction($executionID, $status); $executionID = $execution->id; - if($execution->type == 'kanban' and $this->config->vision != 'lite' and defined('RUN_MODE') and RUN_MODE != 'api') $this->locate($this->createLink('execution', 'kanban', "executionID=$executionID")); + if($execution->type == 'kanban' and $this->config->vision != 'lite' and $this->app->getViewType() != 'json') $this->locate($this->createLink('execution', 'kanban', "executionID=$executionID")); /* Get products by execution. */ $products = $this->product->getProductPairsByProject($executionID); diff --git a/module/execution/css/managemembers.css b/module/execution/css/managemembers.css index 9c4c327dc6..5e0732d35a 100644 --- a/module/execution/css/managemembers.css +++ b/module/execution/css/managemembers.css @@ -17,6 +17,9 @@ #execution_chosen .chosen-single {width: 230px;} #execution_chosen .chosen-drop ul li .label {margin-top: 2px; background: #fff; color: #838a9d; border: 1px solid #d8d8d8;} .radio-inline {line-height: normal;} +#dept + .picker {width: 220px;} +#execution + .picker {width: 230px;} +#mainMenu .picker-has-value {float: left;} #teamForm .table tr > td:first-child {padding-left: 10px;} #teamForm .table tr > td:last-child {padding-right: 10px;} diff --git a/module/execution/js/managemembers.js b/module/execution/js/managemembers.js index 8bc575a878..2bf74db218 100644 --- a/module/execution/js/managemembers.js +++ b/module/execution/js/managemembers.js @@ -1,10 +1,10 @@ $(function() { - $('#execution_chosen').click(function() + $('#execution_chosen, #execution + .picker').click(function() { if(systemMode == 'new') { - $('#execution_chosen ul li').each(function(index) + $('#execution_chosen ul li, #pickerDropMenu-pk_execution div a').each(function(index) { if(index == 0) { diff --git a/module/product/view/project.html.php b/module/product/view/project.html.php index ff9bed560a..200bffb3c7 100644 --- a/module/product/view/project.html.php +++ b/module/product/view/project.html.php @@ -30,7 +30,11 @@
+ systemMode == 'new'):?> project->empty;?> + + execution->noExecution;?> +