- model == 'scrum' or $project->model == 'kanban'):?>
+ model, array('scrum', 'kanban', 'agileplus'))):?>
block->storyCount;?>
diff --git a/module/build/js/view.js b/module/build/js/view.js
index 6ed6c1032d..b5fad596d4 100644
--- a/module/build/js/view.js
+++ b/module/build/js/view.js
@@ -69,3 +69,36 @@ $(function()
}
});
})
+
+/**
+ * Delete item use ajax.
+ *
+ * @param string url
+ * @param string replaceID
+ * @param string notice
+ * @access public
+ * @return void
+ */
+function ajaxDelete(url, replaceID, notice)
+{
+ if(confirm(notice))
+ {
+ $.ajax(
+ {
+ type: 'GET',
+ url: url,
+ dataType: 'json',
+ success: function(data)
+ {
+ if(data.result == 'success')
+ {
+ location.reload();
+ }
+ else if(data.result == 'fail' && typeof(data.message) == 'string')
+ {
+ bootbox.alert(data.message);
+ }
+ }
+ });
+ }
+}
diff --git a/module/company/control.php b/module/company/control.php
index 16500a0984..6a84f863e0 100755
--- a/module/company/control.php
+++ b/module/company/control.php
@@ -224,7 +224,7 @@ class company extends control
/* Get executions' list.*/
$executions = $this->loadModel('execution')->getPairs(0, 'all', 'nocode|multiple');
$executionList = $this->execution->getByIdList(array_keys($executions));
- foreach($executionList as $executionID => $execution)
+ foreach($executionList as $id => $execution)
{
if(isset($projects[$execution->project])) $executions[$execution->id] = $projects[$execution->project] . $executions[$execution->id];
}
diff --git a/module/company/css/dynamic.en.css b/module/company/css/dynamic.en.css
new file mode 100644
index 0000000000..55276305b4
--- /dev/null
+++ b/module/company/css/dynamic.en.css
@@ -0,0 +1 @@
+.picker-drop-menu{max-width:300px !important;}
diff --git a/module/convert/view/importnotice.html.php b/module/convert/view/importnotice.html.php
index 7b27abe2cf..110a3d1679 100644
--- a/module/convert/view/importnotice.html.php
+++ b/module/convert/view/importnotice.html.php
@@ -41,8 +41,8 @@ li .form-control {margin-top: 10px}
-
diff --git a/module/doc/js/selectlibtype.js b/module/doc/js/selectlibtype.js
index 8f807dfeb3..4ca7d52cb6 100644
--- a/module/doc/js/selectlibtype.js
+++ b/module/doc/js/selectlibtype.js
@@ -39,6 +39,7 @@ function loadDocLibs(type)
$('#lib').replaceWith(data);
$('#lib_chosen').remove();
$('#lib').chosen();
+ $('#lib').siblings('div').css('width', 'calc(100% - 25px)');
if($('#lib').find('option').length == 0)
{
diff --git a/module/execution/control.php b/module/execution/control.php
index 9881cf4be7..9dcebbcacf 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -2607,15 +2607,10 @@ class execution extends control
public function kanban($executionID, $browseType = 'all', $orderBy = 'id_asc', $groupBy = 'default')
{
$this->app->loadLang('bug');
+ $this->app->loadLang('kanban');
if(empty($groupBy)) $groupBy = 'default';
- /* Set Session. */
- $this->session->set('execLaneType', $browseType);
- $this->session->set('execGroupBy', $groupBy);
- $this->session->set('storyList', $this->app->getURI(true), 'execution');
- $this->session->set('rdSearchValue', '');
-
$this->lang->execution->menu = new stdclass();
$execution = $this->commonAction($executionID);
if($execution->type != 'kanban') return print(js::locate(inlink('view', "executionID=$executionID")));
@@ -2626,6 +2621,12 @@ class execution extends control
unset($this->lang->kanban->group->task['story']);
}
+ /* Set Session. */
+ $this->session->set('execGroupBy', $groupBy);
+ $this->session->set('storyList', $this->app->getURI(true), 'execution');
+ $this->session->set('rdSearchValue', '');
+ $this->session->set('execLaneType', $browseType);
+
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $browseType, $orderBy, 0, $groupBy);
$executionActions = array();
foreach($this->config->execution->statusActions as $action)
diff --git a/module/execution/css/all.css b/module/execution/css/all.css
old mode 100644
new mode 100755
index b376d8fa05..81bb4a7bde
--- a/module/execution/css/all.css
+++ b/module/execution/css/all.css
@@ -15,3 +15,5 @@
.dtable-cell[data-sort='down'] .dtable-sort:after {color: #000; opacity: 1}
.dtable .toggle-icon {border-radius: 50%; border-style: solid;}
.dtable-nested-toggle.is-no-child {display: block; opacity: 0; pointer-events: none;}
+
+.dtable-row.is-normal .dtable-cell[data-col="name"] {padding-left: 20px;}
diff --git a/module/execution/js/edit.js b/module/execution/js/edit.js
index 05d613bebd..e650a2138f 100644
--- a/module/execution/js/edit.js
+++ b/module/execution/js/edit.js
@@ -123,7 +123,7 @@ $(function()
hidePlanBox(attribute);
})
- $('#attribute').change();
+ hidePlanBox(executionAttr);
}
})
var lastProjectID = $("#project").val();
diff --git a/module/execution/model.php b/module/execution/model.php
index 0c03e019a4..31307505c7 100755
--- a/module/execution/model.php
+++ b/module/execution/model.php
@@ -9,8 +9,6 @@
* @version $Id: model.php 5118 2013-07-12 07:41:41Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
-?>
-status != 'wait')
{
$siblingsAllWait = false;
- return $pointOutStages;
+ break;
}
}
@@ -1092,7 +1090,7 @@ class executionModel extends model
if(!dao::isError())
{
$changes = common::createChanges($parent, $newParent);
- $actionType = $parentStatus == 'doing' ? 'startbychildedit' : 'waitbychild';
+ $actionType = $parentStatus == 'doing' ? 'started' : 'waitbychild';
$actionID = $this->action->create('execution', $parentID, $actionType, '', $actionType);
$this->action->logHistory($actionID, $changes);
@@ -1121,7 +1119,7 @@ class executionModel extends model
if(!dao::isError())
{
$changes = common::createChanges($selfAndChildren[$executionID], $newExecution);
- $actionID = $this->action->create('execution', $executionID, 'Edited');
+ $actionID = $this->action->create('execution', $executionID, 'Started');
$this->action->logHistory($actionID, $changes);
if($type != 'stage') return '';
@@ -1182,7 +1180,7 @@ class executionModel extends model
if(!dao::isError())
{
$changes = common::createChanges($selfAndChildren[$executionID], $newExecution);
- $actionID = $this->action->create('execution', $executionID, 'Edited');
+ $actionID = $this->action->create('execution', $executionID, strtoupper($status));
$this->action->logHistory($actionID, $changes);
if($type != 'stage') return '';
diff --git a/module/execution/view/ajaxgetdropmenu.html.php b/module/execution/view/ajaxgetdropmenu.html.php
index e4abda23d4..82685f94e9 100644
--- a/module/execution/view/ajaxgetdropmenu.html.php
+++ b/module/execution/view/ajaxgetdropmenu.html.php
@@ -206,22 +206,22 @@ $(function()
}
});
- $('#swapper #dropMenu').on('onSearchComplete', function(event, value)
+ $('#swapper #dropMenu').on('onSearchComplete', function()
{
- if($('.list-group.executions').height() == 0)
- {
- $('#closed').attr("hidden", true);
- $('#gray-line').attr("hidden", true);
- }
-
var listItem = $(this).find('.has-list');
- listItem.each(function ()
+ listItem.each(function()
{
$(this).css('display','')
var $hidden = $(this).find('.hidden');
var $item = $(this).find('.search-list-item');
if($hidden.length == $item.length) $(this).css('display','none');
});
+
+ if($('.list-group.executions').height() == 0)
+ {
+ $('#closed').attr("hidden", true);
+ $('#gray-line').attr("hidden", true);
+ }
});
})
diff --git a/module/execution/view/edit.html.php b/module/execution/view/edit.html.php
index b9c2a16446..5c89e3a012 100644
--- a/module/execution/view/edit.html.php
+++ b/module/execution/view/edit.html.php
@@ -15,6 +15,7 @@
type == 'stage');?>
+attribute);?>
project->manageProducts);?>
project->manageProductPlan);?>
@@ -161,7 +162,7 @@
- | project->manageProductPlan;?> |
+ project->manageProductPlan;?> |
@@ -252,7 +253,7 @@
- | project->manageProductPlan;?> |
+ project->manageProductPlan;?> |
@@ -261,7 +262,7 @@
type != 'normal' and isset($branchGroups[$product->id]);?>
'>
product->common;?>
- type == 'stage' ? "disabled='disabled'" : '';?>
+ model == 'waterfall' or $project->model == 'waterfallplus') ? "disabled='disabled'" : '';?>
id, "class='form-control chosen' $disabled onchange='loadBranches(this)' data-last='" . $product->id . "' data-type='" . $product->type . "'");?>
type == 'stage' and !$project->division) echo html::hidden("products[$i]", $product->id);?>
diff --git a/module/execution/view/view.html.php b/module/execution/view/view.html.php
index 1e1232132c..3273c180a6 100644
--- a/module/execution/view/view.html.php
+++ b/module/execution/view/view.html.php
@@ -345,7 +345,7 @@
- projectInfo->hasProduct or $execution->projectInfo->model == 'scrum'):?>
+ projectInfo->model, 'waterfall') !== false and (empty($execution->projectInfo->hasProduct) or in_array($execution->attribute, array('request', 'review'))))):?>
execution->linkPlan;?>
diff --git a/module/my/model.php b/module/my/model.php
index 89e57f22ea..4a65a3fe4a 100644
--- a/module/my/model.php
+++ b/module/my/model.php
@@ -571,10 +571,15 @@ class myModel extends model
$query = preg_replace('/`(\w+)`/', 't1.`$1`', $query);
$query = str_replace('t1.`project`', 't2.`project`', $query);
+ $assignedToMatches = array();
+ $assignedToCondition = '';
+ $operatorAndAccount = '';
if(strpos($query, '`assignedTo`') !== false)
{
- preg_match("/`assignedTo`\s+(([^']*) ('([^']*)'))/", $query, $matches);
- $query = str_replace("t1.$matches[0]", "(t1.$matches[0] or (t1.mode = 'multi' and t5.`account` $matches[1] and t1.status != 'closed' and t5.status != 'done') )", $query);
+ preg_match("/`assignedTo`\s+(([^']*) ('([^']*)'))/", $query, $assignedToMatches);
+ $assignedToCondition = $assignedToMatches[0];
+ $operatorAndAccount = $assignedToMatches[1];
+ $query = str_replace("t1.$assignedToMatches[0]", "(t1.$assignedToCondition or (t1.mode = 'multi' and t5.`account` $operatorAndAccount and t1.status != 'closed' and t5.status != 'done') )", $query);
}
$orderBy = str_replace('pri_', 'priOrder_', $orderBy);
@@ -588,7 +593,10 @@ class myModel extends model
->andWhere('t1.deleted')->eq(0)
->andWhere('t2.deleted')->eq(0)
->andWhere('(t2.status')->ne('suspended')->orWhere('t4.status')->ne('suspended')->markRight(1)
- ->beginIF($moduleName == 'workTask')->andWhere("(t1.$matches[0] or (t1.mode = 'multi' and t5.`account` $matches[1] and t1.status != 'closed' and t5.status != 'done') )")->fi()
+ ->beginIF($moduleName == 'workTask')
+ ->beginIF(!empty($assignedToMatches))->andWhere("(t1.$assignedToCondition or (t1.mode = 'multi' and t5.`account` $operatorAndAccount and t1.status != 'closed' and t5.status != 'done') )")->fi()
+ ->beginIF(empty($assignedToMatches))->andWhere("t1.assignedTo")->eq($account)->fi()
+ ->fi()
->beginIF($moduleName == 'contributeTask')
->andWhere('t1.openedBy', 1)->eq($account)
->orWhere('t1.closedBy')->eq($account)
diff --git a/module/stage/lang/zh-cn.php b/module/stage/lang/zh-cn.php
index 74db4344db..a0de0df795 100644
--- a/module/stage/lang/zh-cn.php
+++ b/module/stage/lang/zh-cn.php
@@ -19,7 +19,7 @@ $lang->stage->view = '阶段详情';
$lang->stage->plusBrowse = '融合瀑布阶段列表';
/* Fields. */
-$lang->stage->id = '编号';
+$lang->stage->id = 'ID';
$lang->stage->name = '阶段名称';
$lang->stage->type = '阶段类型';
$lang->stage->percent = '工作量占比';
diff --git a/www/static/svg/admin-switch.svg b/www/static/svg/admin-switch.svg
index 88d99b7b0d..4689088c72 100644
--- a/www/static/svg/admin-switch.svg
+++ b/www/static/svg/admin-switch.svg
@@ -1,4 +1,4 @@
diff --git a/www/static/svg/admin-user.svg b/www/static/svg/admin-user.svg
index cb1ae851e4..7e57ae999c 100644
--- a/www/static/svg/admin-user.svg
+++ b/www/static/svg/admin-user.svg
@@ -1,4 +1,4 @@
| |