diff --git a/db/update16.4.sql b/db/update16.4.sql
index 2f2265fb9c..dfd7d07147 100644
--- a/db/update16.4.sql
+++ b/db/update16.4.sql
@@ -23,4 +23,4 @@ ALTER TABLE `zt_story` ADD `activatedDate` datetime NOT NULL AFTER `closedReason
ALTER TABLE `zt_task` MODIFY `activatedDate` datetime NOT NULL AFTER `lastEditedDate`;
ALTER TABLE `zt_user` ADD `visions` varchar(20) NOT NULL AFTER `visits`;
-UPDATE `zt_user` SET `visions`='rnd,lite';
+UPDATE `zt_user` SET `visions`='rnd,lite';
\ No newline at end of file
diff --git a/extension/lite/action/ext/lang/zh-cn/lite.php b/extension/lite/action/ext/lang/zh-cn/lite.php
index 67162a4212..a2c6480f75 100644
--- a/extension/lite/action/ext/lang/zh-cn/lite.php
+++ b/extension/lite/action/ext/lang/zh-cn/lite.php
@@ -57,8 +57,6 @@ $lang->action->search->label['reviewed'] = $lang->action->label->re
$lang->action->search->label['moved'] = $lang->action->label->moved;
$lang->action->search->label['confirmed'] = $lang->action->label->confirmed;
$lang->action->search->label['totask'] = $lang->action->label->totask;
-$lang->action->search->label['linked2plan'] = $lang->action->label->linked2plan;
-$lang->action->search->label['unlinkedfromplan'] = $lang->action->label->unlinkedfromplan;
$lang->action->search->label['changestatus'] = $lang->action->label->changestatus;
$lang->action->search->label['marked'] = $lang->action->label->marked;
$lang->action->search->label['linked2project'] = $lang->action->label->linked2project;
@@ -88,4 +86,4 @@ $lang->action->desc->linkchildstory = '$date, 由 $actor
$lang->action->desc->unlinkchildrenstory = '$date, 由 $actor 移除子目录 $extra。' . "\n";
$lang->action->desc->linkparentstory = '$date, 由 $actor 关联到父目录 $extra。' . "\n";
$lang->action->desc->unlinkparentstory = '$date, 由 $actor 从父目录$extra取消关联。' . "\n";
-$lang->action->desc->deletechildrenstory = '$date, 由 $actor 删除子目录$extra。' . "\n";
\ No newline at end of file
+$lang->action->desc->deletechildrenstory = '$date, 由 $actor 删除子目录$extra。' . "\n";
diff --git a/module/bug/config.php b/module/bug/config.php
index 4d51c0c15b..3a561f048d 100644
--- a/module/bug/config.php
+++ b/module/bug/config.php
@@ -169,6 +169,7 @@ $config->bug->datatable->fieldList['pri']['title'] = 'P';
$config->bug->datatable->fieldList['pri']['fixed'] = 'left';
$config->bug->datatable->fieldList['pri']['width'] = '50';
$config->bug->datatable->fieldList['pri']['required'] = 'no';
+$config->bug->datatable->fieldList['pri']['name'] = $lang->bug->pri;
$config->bug->datatable->fieldList['confirmed']['title'] = 'confirmedAB';
$config->bug->datatable->fieldList['confirmed']['fixed'] = 'left';
diff --git a/module/bug/view/linkbugs.html.php b/module/bug/view/linkbugs.html.php
index b3ec18fa85..7ead53687b 100644
--- a/module/bug/view/linkbugs.html.php
+++ b/module/bug/view/linkbugs.html.php
@@ -32,7 +32,7 @@
idAB;?>
-
priAB;?> |
+ pri;?>>priAB;?> |
bug->product;?> |
bug->title;?> |
bug->statusAB;?> |
diff --git a/module/build/view/linkbug.html.php b/module/build/view/linkbug.html.php
index b4364e65d8..bdd39c2c5a 100644
--- a/module/build/view/linkbug.html.php
+++ b/module/build/view/linkbug.html.php
@@ -27,7 +27,7 @@
idAB;?>
- priAB;?> |
+ pri;?>> priAB;?> |
bug->title;?> |
openedByAB;?> |
bug->resolvedBy;?> |
diff --git a/module/build/view/linkstory.html.php b/module/build/view/linkstory.html.php
index 3ce47e1e51..d874361a28 100644
--- a/module/build/view/linkstory.html.php
+++ b/module/build/view/linkstory.html.php
@@ -27,7 +27,7 @@
idAB;?>
- priAB;?> |
+ pri;?>>priAB;?> |
story->title;?> |
openedByAB;?> |
assignedToAB;?> |
diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php
index d10b01c3e0..d23b4ea3ae 100644
--- a/module/build/view/view.html.php
+++ b/module/build/view/view.html.php
@@ -89,7 +89,7 @@ tbody tr td:first-child input {display: none;}
idAB);?>
- priAB);?> |
+ pri;?>>priAB);?> |
story->title);?> |
openedByAB);?> |
story->estimateAB);?> |
diff --git a/module/caselib/view/browse.html.php b/module/caselib/view/browse.html.php
index e4e94f5217..5fc8f8174d 100644
--- a/module/caselib/view/browse.html.php
+++ b/module/caselib/view/browse.html.php
@@ -124,7 +124,7 @@ js::set('flow', $config->global->flow);
idAB);?>
- priAB);?> |
+ pri;?>>priAB);?> |
testcase->title);?> |
typeAB);?> |
openedByAB);?> |
diff --git a/module/common/lang/en.php b/module/common/lang/en.php
index cca6821996..0cb5fe57dd 100644
--- a/module/common/lang/en.php
+++ b/module/common/lang/en.php
@@ -146,6 +146,8 @@ $lang->assignedToAB = 'AssignedTo';
$lang->typeAB = 'Type';
$lang->nameAB = 'Name';
+$lang->pri = 'Priority';
+
$lang->common->common = 'Common Module';
$lang->my->common = 'My';
$lang->program->common = 'Program';
diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php
index db0b35d8ca..bc0017d791 100644
--- a/module/common/lang/zh-cn.php
+++ b/module/common/lang/zh-cn.php
@@ -146,6 +146,8 @@ $lang->assignedToAB = '指派';
$lang->typeAB = '类型';
$lang->nameAB = '名称';
+$lang->pri = '优先级';
+
$lang->common->common = '公有模块';
$lang->my->common = '地盘';
$lang->program->common = '项目集';
diff --git a/module/execution/control.php b/module/execution/control.php
index 6318b0ecab..d212039839 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -2068,7 +2068,7 @@ class execution extends control
$this->view->groupBy = $groupBy;
$this->view->productID = $productID;
$this->view->branchID = $branchID;
- $this->view->projectID = $this->loadModel('task')->getProjectID($execution);
+ $this->view->projectID = $this->loadModel('task')->getProjectID($execution->id);
$this->view->allPlans = $allPlans;
$this->view->kanbanData = $kanbanData;
$this->view->executionActions = $executionActions;
diff --git a/module/execution/js/taskkanban.js b/module/execution/js/taskkanban.js
index d142e39081..7e7b45b102 100644
--- a/module/execution/js/taskkanban.js
+++ b/module/execution/js/taskkanban.js
@@ -271,6 +271,21 @@ function renderColumnCount($count, count, col)
{
var text = count + '/' + (col.limit < 0 ? '' : col.limit);
$count.html(text + '');
+
+ if(col.limit != -1 && col.limit < count)
+ {
+ $count.parents('.title').parent('.kanban-header-col').css('background-color', '#F6A1A1');
+ $count.parents('.title').find('.text').css('max-width', $count.parents('.title').width() - 200);
+ $count.css('color', '#E33030');
+ if(!$count.parent().find('.error').length) $count.parent().find('.include-last').after("");
+ }
+ else
+ {
+ $count.parents('.title').parent('.kanban-header-col').css('background-color', 'transparent');
+ $count.parents('.title').find('.text').css('max-width', $count.parents('.title').width() - 120);
+ $count.css('color', '#8B91A2');
+ $count.parent().find('.error').remove();
+ }
}
/**
diff --git a/module/execution/view/bug.html.php b/module/execution/view/bug.html.php
index f55bda92a8..8a600fa219 100644
--- a/module/execution/view/bug.html.php
+++ b/module/execution/view/bug.html.php
@@ -80,7 +80,7 @@
idAB);?>
bug->severityAB);?> |
- priAB);?> |
+ execution->pri;?>>priAB);?> |
bug->title);?> |
openedByAB);?> |
bug->deadlineAB);?> |
diff --git a/module/execution/view/grouptask.html.php b/module/execution/view/grouptask.html.php
index 1b02351e56..870f20d676 100644
--- a/module/execution/view/grouptask.html.php
+++ b/module/execution/view/grouptask.html.php
@@ -112,7 +112,7 @@
task->id;?> |
- priAB;?> |
+ execution->pri;?>>priAB;?> |
task->name;?> |
task->status;?> |
task->assignedTo;?> |
diff --git a/module/execution/view/importbug.html.php b/module/execution/view/importbug.html.php
index b2fc7eafb1..4eaf81a875 100755
--- a/module/execution/view/importbug.html.php
+++ b/module/execution/view/importbug.html.php
@@ -38,7 +38,7 @@ var browseType = '';
idAB;?>
bug->severityAB;?> |
- priAB;?> |
+ execution->pri;?>>priAB;?> |
bug->title;?> |
bug->statusAB;?> |
'>task->pri;?> |
diff --git a/module/execution/view/importtask.html.php b/module/execution/view/importtask.html.php
index 836c8f5f8d..5baf2ceadd 100644
--- a/module/execution/view/importtask.html.php
+++ b/module/execution/view/importtask.html.php
@@ -33,7 +33,7 @@
idAB;?>
execution->name ?> |
- priAB;?> |
+ execution->pri;?>>priAB;?> |
task->name;?> |
task->assignedTo;?> |
task->leftAB;?> |
diff --git a/module/execution/view/linkstory.html.php b/module/execution/view/linkstory.html.php
index 0a6d336e56..b19a0ad488 100644
--- a/module/execution/view/linkstory.html.php
+++ b/module/execution/view/linkstory.html.php
@@ -39,7 +39,7 @@
idAB;?>
- priAB;?> |
+ execution->pri;?>>priAB;?> |
story->title;?> |
story->product;?> |
story->module;?> |
diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php
index 313eab805f..c394332710 100644
--- a/module/execution/view/story.html.php
+++ b/module/execution/view/story.html.php
@@ -199,7 +199,7 @@
execution->orderAB);?> |
- priAB);?> |
+ execution->pri;?>>priAB);?> |
execution->storyTitle);?> |
story->category);?> |
openedByAB);?> |
diff --git a/module/execution/view/testcase.html.php b/module/execution/view/testcase.html.php
index 2de4640de5..6ae9d094b1 100644
--- a/module/execution/view/testcase.html.php
+++ b/module/execution/view/testcase.html.php
@@ -24,7 +24,7 @@
| idAB);?> |
- priAB);?> |
+ execution->pri;?>> priAB);?> |
testcase->title);?> |
typeAB);?> |
openedByAB);?> |
diff --git a/module/kanban/control.php b/module/kanban/control.php
index 2d38f69ff4..b5d71d7d0c 100644
--- a/module/kanban/control.php
+++ b/module/kanban/control.php
@@ -74,12 +74,12 @@ class kanban extends control
* @access public
* @return void
*/
- public function editSpace($spaceID)
+ public function editSpace($spaceID, $type = '')
{
$this->loadModel('action');
if(!empty($_POST))
{
- $changes = $this->kanban->updateSpace($spaceID);
+ $changes = $this->kanban->updateSpace($spaceID, $type);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
@@ -89,8 +89,27 @@ class kanban extends control
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
}
- $this->view->space = $this->kanban->getSpaceById($spaceID);
- $this->view->users = $this->loadModel('user')->getPairs('noclosed');
+ $space = $this->kanban->getSpaceById($spaceID);
+
+ $typeList = $this->lang->kanbanspace->typeList;
+ if($space->type == 'cooperation' or $space->type == 'public') unset($typeList['private']);
+
+ if($space->type == 'private' and ($type == 'cooperation' or $type == 'public'))
+ {
+ $team = $space->whitelist;
+ }
+ else
+ {
+ $team = $space->team;
+ }
+
+ $this->view->spaceID = $spaceID;
+ $this->view->space = $space;
+ $this->view->users = $this->loadModel('user')->getPairs('noclosed');
+ $this->view->typeList = $typeList;
+ $this->view->type = $type;
+ $this->view->team = $team;
+ $this->view->defaultType = $type == '' ? $space->type : $type;
$this->display();
}
diff --git a/module/kanban/js/editspace.js b/module/kanban/js/editspace.js
new file mode 100644
index 0000000000..4ae84ccaf6
--- /dev/null
+++ b/module/kanban/js/editspace.js
@@ -0,0 +1,12 @@
+/**
+ * When type change.
+ *
+ * @param int spaceID
+ * @param string type
+ * @access public
+ * @return void
+ */
+function changeType(spaceID, type)
+{
+ location.href = createLink('kanban', 'editSpace', 'spaceID=' + spaceID + '&type=' + type);
+}
diff --git a/module/kanban/lang/en.php b/module/kanban/lang/en.php
index 3a82c67fe1..3f78e41151 100644
--- a/module/kanban/lang/en.php
+++ b/module/kanban/lang/en.php
@@ -271,6 +271,10 @@ $lang->kanbanspace->featureBar['cooperation'] = 'Cooperation Space';
$lang->kanbanspace->featureBar['public'] = 'Public Space';
$lang->kanbanspace->featureBar['involved'] = 'Involved';
+$lang->kanbanspace->typeList['private'] = 'Private Space';
+$lang->kanbanspace->typeList['cooperation'] = 'Cooperation Space';
+$lang->kanbanspace->typeList['public'] = 'Public Space';
+
$lang->kanbancolumn = new stdclass();
$lang->kanbancolumn->name = $lang->kanban->columnName;
$lang->kanbancolumn->limit = $lang->kanban->WIPCount;
diff --git a/module/kanban/lang/zh-cn.php b/module/kanban/lang/zh-cn.php
index ca8580188c..7ce89896c9 100644
--- a/module/kanban/lang/zh-cn.php
+++ b/module/kanban/lang/zh-cn.php
@@ -271,6 +271,10 @@ $lang->kanbanspace->featureBar['cooperation'] = '协作空间';
$lang->kanbanspace->featureBar['public'] = '公共空间';
$lang->kanbanspace->featureBar['involved'] = '我参与的';
+$lang->kanbanspace->typeList['private'] = '私人空间';
+$lang->kanbanspace->typeList['cooperation'] = '协作空间';
+$lang->kanbanspace->typeList['public'] = '公共空间';
+
$lang->kanbancolumn = new stdclass();
$lang->kanbancolumn->name = $lang->kanban->columnName;
$lang->kanbancolumn->limit = $lang->kanban->WIPCount;
diff --git a/module/kanban/model.php b/module/kanban/model.php
index 32c0db56eb..07e5bbea9d 100644
--- a/module/kanban/model.php
+++ b/module/kanban/model.php
@@ -1754,7 +1754,7 @@ class kanbanModel extends model
* @access public
* @return array
*/
- public function updateSpace($spaceID)
+ public function updateSpace($spaceID, $type = '')
{
$spaceID = (int)$spaceID;
$oldSpace = $this->getSpaceById($spaceID);
@@ -1767,6 +1767,8 @@ class kanbanModel extends model
->remove('uid,contactListMenu')
->get();
+ if($type == 'cooperation' or $type == 'public') $space->whitelist = '';
+
$space = $this->loadModel('file')->processImgURL($space, $this->config->kanban->editor->editspace['id'], $this->post->uid);
$this->dao->update(TABLE_KANBANSPACE)->data($space)
@@ -1775,6 +1777,15 @@ class kanbanModel extends model
->where('id')->eq($spaceID)
->exec();
+ if($oldSpace->type == 'private' and ($type == 'cooperation' or $type == 'public'))
+ {
+ $kanbanList = $this->dao->select('id,team,whitelist')->from(TABLE_KANBAN)->where('space')->eq($spaceID)->andWhere('deleted')->eq('0')->fetchAll('id');
+ foreach($kanbanList as $id => $kanbanData)
+ {
+ $this->dao->update(TABLE_KANBAN)->set('team')->eq($kanbanData->whitelist)->set('whitelist')->eq('')->where('id')->eq($id)->andWhere('deleted')->eq('0')->exec();
+ }
+ }
+
if(!dao::isError())
{
$this->file->saveUpload('kanbanspace', $spaceID);
diff --git a/module/kanban/view/editspace.html.php b/module/kanban/view/editspace.html.php
index a354ae3447..59d7f58eec 100644
--- a/module/kanban/view/editspace.html.php
+++ b/module/kanban/view/editspace.html.php
@@ -18,12 +18,17 @@