- |
+ |
@@ -54,7 +66,7 @@ var browseType = '';
|
- |
+ |
@@ -122,7 +134,7 @@ var browseType = '';
$actionLink = $this->createLink('story', 'batchEdit', "productID=$productID&projectID=0");
echo "";
- echo html::commonButton($lang->edit, "onclick=\"changeAction('$actionLink')\" $disabled");
+ echo html::commonButton($lang->edit, "onclick=\"setFormAction('$actionLink')\" $disabled");
echo "";
echo " ";
}
@@ -143,7 +155,7 @@ var browseType = '';
$canBatchClose = common::hasPriv('story', 'batchClose') and strtolower($browseType) != 'closedbyme' and strtolower($browseType) != 'closedstory';
$actionLink = $this->createLink('story', 'batchClose', "productID=$productID&projectID=0");
- $misc = $canBatchClose ? "onclick=changeAction('$actionLink')" : $class;
+ $misc = $canBatchClose ? "onclick=setFormAction('$actionLink')" : $class;
echo "" . html::a('#', $lang->close, '', $misc) . "";
$misc = common::hasPriv('story', 'batchReview') ? "onmouseover='toggleSubMenu(this.id)' onmouseout='toggleSubMenu(this.id)' id='reviewItem'" : $class;
@@ -173,7 +185,7 @@ var browseType = '';
}
else
{
- echo html::a('#', $result, '', "onclick=\"changeAction('$actionLink',true)\"");
+ echo html::a('#', $result, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"");
}
echo "";
}
@@ -192,7 +204,7 @@ var browseType = '';
{
$actionLink = $this->createLink('story', 'batchReview', "result=reject&reason=$key");
echo "";
- echo html::a('#', $reason, '', "onclick=\"changeAction('$actionLink',true)\"");
+ echo html::a('#', $reason, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"");
echo "";
}
?>
@@ -207,7 +219,7 @@ var browseType = '';
foreach($plans as $planID => $plan)
{
$actionLink = $this->createLink('story', 'batchChangePlan', "planID=$planID");
- echo "" . html::a('#', $plan, '', "onclick=\"changeAction('$actionLink',true)\"") . "";
+ echo "" . html::a('#', $plan, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"") . "";
}
?>
@@ -220,7 +232,7 @@ var browseType = '';
foreach($lang->story->stageList as $key => $stage)
{
$actionLink = $this->createLink('story', 'batchChangeStage', "stage=$key");
- echo "" . html::a('#', $stage, '', "onclick=\"changeAction('$actionLink',true)\"") . "";
+ echo "" . html::a('#', $stage, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"") . "";
}
?>
diff --git a/module/productplan/control.php b/module/productplan/control.php
index 875cd55558..50f3eaaa5a 100644
--- a/module/productplan/control.php
+++ b/module/productplan/control.php
@@ -45,9 +45,18 @@ class productplan extends control
$this->commonAction($product);
$lastPlan = $this->productplan->getLast($product);
+ if($lastPlan)
+ {
+ $timestamp = strtotime($lastPlan->end);
+ $weekday = date('w', $timestamp);
+ $delta = 1;
+ if($weekday == '5' or $weekday == '6') $delta = 8 - $weekday;
+
+ $begin = date('Y-m-d', strtotime("+$delta days", $timestamp));
+ }
+ $this->view->begin = $lastPlan ? $begin : '';
$this->view->title = $this->view->product->name . $this->lang->colon . $this->lang->productplan->create;
- $this->view->begin = $lastPlan ? $lastPlan->end : '';
$this->display();
}
diff --git a/module/project/js/story.js b/module/project/js/story.js
index 3eee9acf9b..bf4d0687b5 100644
--- a/module/project/js/story.js
+++ b/module/project/js/story.js
@@ -2,17 +2,3 @@ $(document).ready(function()
{
$("a.iframe").colorbox({width:640, height:480, iframe:true, transition:'none'});
});
-
-/**
- * Change form action.
- *
- * @param formName $formName
- * @param actionName $actionName
- * @param actionLink $actionLink
- * @access public
- * @return void
- */
-function changeAction(formName, actionName, actionLink)
-{
- $('#' + formName).attr('action', actionLink).submit();
-}
diff --git a/module/project/js/task.js b/module/project/js/task.js
index f2cb074c39..b0367af308 100644
--- a/module/project/js/task.js
+++ b/module/project/js/task.js
@@ -4,10 +4,5 @@ $(function()
if(browseType == 'bysearch') ajaxGetSearchForm();
});
-function changeAction(formName, actionName, actionLink)
-{
- if(actionName == 'batchClose') $('#' + formName).attr('target', 'hiddenwin');
- $('#' + formName).attr('action', actionLink).submit();
-}
$('#module' + moduleID).addClass('active');
$('#product' + productID).addClass('active');
diff --git a/module/project/model.php b/module/project/model.php
index 4a6d2cbf9c..182b0f2677 100644
--- a/module/project/model.php
+++ b/module/project/model.php
@@ -940,7 +940,8 @@ class projectModel extends model
$BugToTasks = fixer::input('post')->get();
foreach($BugToTasks->import as $key => $value)
{
- $bug = $this->bug->getById($key);
+ $bug = $this->bug->getById($key);
+ $task = new stdClass();
$task->project = $projectID;
$task->story = $bug->story;
$task->storyVersion = $bug->story;
@@ -975,13 +976,14 @@ class projectModel extends model
$taskID = $this->dao->lastInsertID();
if($task->story != false) $this->story->setStage($task->story);
$actionID = $this->loadModel('action')->create('task', $taskID, 'Opened', '');
+ $mails[$key] = new stdClass();
$mails[$key]->taskID = $taskID;
$mails[$key]->actionID = $actionID;
$this->action->create('bug', $key, 'Totask', '', $taskID);
$this->dao->update(TABLE_BUG)->set('toTask')->eq($taskID)->where('id')->eq($key)->exec();
- if($task->assignedTo and $task->assignedTo != $bug->assignedTo)
+ if(isset($task->assignedTo) and $task->assignedTo and $task->assignedTo != $bug->assignedTo)
{
$newBug = new stdClass();
$newBug->lastEditedBy = $this->app->user->account;
@@ -1439,7 +1441,7 @@ class projectModel extends model
* @access public
* @return bool
*/
- public function isClickable($project, $action)
+ public static function isClickable($project, $action)
{
$action = strtolower($action);
diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php
index 01d8ba966f..8543bc77c5 100644
--- a/module/project/view/story.html.php
+++ b/module/project/view/story.html.php
@@ -106,12 +106,12 @@
if($canBatchEdit)
{
$actionLink = $this->createLink('story', 'batchEdit', "productID=0&projectID=$project->id");
- echo html::commonButton($lang->edit, "onclick=\"changeAction('projectStoryForm', 'batchEdit', '$actionLink')\"");
+ echo html::commonButton($lang->edit, "onclick=\"setFormAction('$actionLink')\"");
}
if($canBatchClose)
{
$actionLink = $this->createLink('story', 'batchClose', "productID=0&projectID=$project->id");
- echo html::commonButton($lang->close, "onclick=\"changeAction('projectStoryForm', 'batchClose', '$actionLink')\"");
+ echo html::commonButton($lang->close, "onclick=\"setFormAction('$actionLink')\"");
}
}
echo $summary;
diff --git a/module/project/view/task.html.php b/module/project/view/task.html.php
index 34465ac24f..545f4a3e2d 100644
--- a/module/project/view/task.html.php
+++ b/module/project/view/task.html.php
@@ -150,13 +150,13 @@ var browseType = '';
echo "";
$actionLink = $this->createLink('task', 'batchEdit', "projectID=$projectID");
- $misc = $canBatchEdit ? "onclick=changeAction('$actionLink')" : "disabled='disabled'";
+ $misc = $canBatchEdit ? "onclick=setFormAction('$actionLink')" : "disabled='disabled'";
echo "";
- echo html::commonButton($lang->edit, "onclick=\"changeAction('projectTaskForm', 'batchEdit', '$actionLink')\" $misc");
+ echo html::commonButton($lang->edit, $misc);
echo "";
echo " ";
}
- echo $summary;
+ echo "" . $summary . "";
?>
show();?>
@@ -173,7 +173,7 @@ var browseType = '';
createLink('task', 'batchClose');
- $misc = $canBatchClose ? "onclick=changeAction('projectTaskForm','batchClose','$actionLink')" : "class='disabled'";
+ $misc = $canBatchClose ? "onclick=setFormAction('$actionLink','hiddenwin')" : "class='disabled'";
echo "- " . html::a('#', $lang->close, '', $misc) . "
";
?>
diff --git a/module/project/view/taskheader.html.php b/module/project/view/taskheader.html.php
index 826209656c..b5190ad469 100644
--- a/module/project/view/taskheader.html.php
+++ b/module/project/view/taskheader.html.php
@@ -22,7 +22,11 @@
if(!isset($browseType)) $browseType = '';
if(!isset($orderBy)) $orderBy = '';
common::printIcon('task', 'report', "project=$projectID&browseType=$browseType");
- if($browseType != 'needconfirm') common::printIcon('task', 'export', "projectID=$projectID&orderBy=$orderBy");
+
+ echo '';
+ echo html::a("#", " ", '', "id='exportAction' class='icon-green-common-export' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->export}'");
+ echo html::a("#", $lang->export, '', "id='exportAction' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->export}'");
+ echo '';
echo '';
echo html::a("#", " ", '', "id='importAction' class='icon-green-task-import' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->import}'");
@@ -35,11 +39,26 @@
+
+
diff --git a/module/report/model.php b/module/report/model.php
index f7a5dba3cf..42dd2d83aa 100644
--- a/module/report/model.php
+++ b/module/report/model.php
@@ -121,7 +121,7 @@ $(function ()
series: {lines:{show: true, lineWidth: 2}, points: {show: true},hoverable: true},
legend: {noColumns: 1},
grid: { hoverable: true, clickable: true },
- xaxis: { ticks:ticks, tickFormatter: function(val) {tick = new Date(dateList[val]);;if(dateList[val] != undefined){return (tick.getMonth() + 1) + '-' + tick.getDate()}else{return ''}}},
+ xaxis: { ticks:ticks, tickFormatter: function(val) {tick = new Date(dateList[val]);;if(dateList[val] != undefined){return tick.getDate() + '/' + (tick.getMonth() + 1)}else{return ''}}},
yaxis: {mode: null, min: 0, minTickSize: [1, "day"]}};
var placeholder = $("#placeholder");
diff --git a/module/story/control.php b/module/story/control.php
index bc94d75b90..d35074d55a 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -805,7 +805,7 @@ class story extends control
$moduleID = $this->tree->getAllChildID($moduleID);
}
$stories = $this->story->getProductStoryPairs($productID, $moduleID);
- $select = html::select('story' . $index, $stories, $storyID, "class=''");
+ $select = html::select('story', $stories, $storyID, "class=''");
/* If only need options, remove select wrap. */
if($onlyOption == 'true') die(substr($select, strpos($select, '>') + 1, -10));
diff --git a/module/story/lang/en.php b/module/story/lang/en.php
index 7efd42928b..c8adc9fc71 100644
--- a/module/story/lang/en.php
+++ b/module/story/lang/en.php
@@ -28,7 +28,7 @@ $lang->story->tasks = "Tasks";
$lang->story->taskCount = 'Tasks count';
$lang->story->bugs = "Bug";
$lang->story->linkStory = 'Related story';
-$lang->story->export = "Export";
+$lang->story->export = "Export data";
$lang->story->reportChart = "Report";
$lang->story->batchChangePlan = "Batch change plan";
$lang->story->batchChangeStage = "Batch change stage";
diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php
index 0a0728d689..00df06d663 100644
--- a/module/story/lang/zh-cn.php
+++ b/module/story/lang/zh-cn.php
@@ -28,7 +28,7 @@ $lang->story->tasks = "相关任务";
$lang->story->taskCount = '任务数';
$lang->story->bugs = "Bug";
$lang->story->linkStory = '关联需求';
-$lang->story->export = "导出";
+$lang->story->export = "导出数据";
$lang->story->reportChart = "统计报表";
$lang->story->batchChangePlan = "批量修改计划";
$lang->story->batchChangeStage = "批量修改阶段";
diff --git a/module/task/lang/en.php b/module/task/lang/en.php
index 2c3885ae64..c605ae0175 100644
--- a/module/task/lang/en.php
+++ b/module/task/lang/en.php
@@ -25,7 +25,7 @@ $lang->task->close = "Close";
$lang->task->batchClose = "Batch close";
$lang->task->cancel = "Cancel";
$lang->task->activate = "Activate";
-$lang->task->export = "Export";
+$lang->task->export = "Export data";
$lang->task->reportChart = "Report chart";
$lang->task->fromBug = 'From Bug';
$lang->task->confirmStoryChange = "Confirm story change";
diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php
index 3f33fb0d34..07f4ba8d20 100644
--- a/module/task/lang/zh-cn.php
+++ b/module/task/lang/zh-cn.php
@@ -25,7 +25,7 @@ $lang->task->close = "关闭";
$lang->task->batchClose = "批量关闭";
$lang->task->cancel = "取消";
$lang->task->activate = "激活";
-$lang->task->export = "导出";
+$lang->task->export = "导出数据";
$lang->task->reportChart = "报表统计";
$lang->task->fromBug = '来源Bug';
$lang->task->confirmStoryChange = "确认需求变动";
diff --git a/module/task/view/batchedit.html.php b/module/task/view/batchedit.html.php
index 3d3b8eb054..beaf4af3f5 100755
--- a/module/task/view/batchedit.html.php
+++ b/module/task/view/batchedit.html.php
@@ -72,7 +72,8 @@
- |
+ type != 'sprint')) ? $this->config->task->batchEdit->columns + 1 : $this->config->task->batchEdit->columns;?>
+ | |
|
diff --git a/module/testcase/control.php b/module/testcase/control.php
index c472c3d706..b9cddebc7b 100644
--- a/module/testcase/control.php
+++ b/module/testcase/control.php
@@ -52,7 +52,7 @@ class testcase extends control
* @access public
* @return void
*/
- public function browse($productID = 0, $browseType = 'byModule', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
+ public function browse($productID = 0, $browseType = 'all', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Set browseType, productID, moduleID and queryID. */
$browseType = strtolower($browseType);
@@ -154,7 +154,6 @@ class testcase extends control
$this->view->orderBy = $orderBy;
$this->view->browseType = $browseType;
$this->view->param = $param;
- $this->view->treeClass = $browseType == 'bymodule' ? '' : 'hidden';
$this->display();
}
diff --git a/module/testcase/css/batchedit.css b/module/testcase/css/batchedit.css
index 10b4561986..b78baac20e 100755
--- a/module/testcase/css/batchedit.css
+++ b/module/testcase/css/batchedit.css
@@ -1 +1,2 @@
.w-340px {width:340px}
+.chosen {z-index:99}
diff --git a/module/testcase/js/batchedit.js b/module/testcase/js/batchedit.js
new file mode 100644
index 0000000000..8bf7fc4fff
--- /dev/null
+++ b/module/testcase/js/batchedit.js
@@ -0,0 +1,4 @@
+$(function()
+{
+ $(".chosen").chosen({no_results_text:noResultsMatch});
+})
diff --git a/module/testcase/js/browse.js b/module/testcase/js/browse.js
index 4501bab2e9..747583cee2 100644
--- a/module/testcase/js/browse.js
+++ b/module/testcase/js/browse.js
@@ -1,14 +1,3 @@
-/* Switch to module browse. */
-function browseByModule(active)
-{
- $('.side').removeClass('hidden');
- $('.divider').removeClass('hidden');
- $('#bymoduleTab').addClass('active');
- $('#' + active + 'Tab').removeClass('active');
- $('#bysearchTab').removeClass('active');
- $('#querybox').addClass('hidden');
-}
-
/* Swtich to search module. */
function browseBySearch(active)
{
@@ -20,11 +9,6 @@ function browseBySearch(active)
$('#bymoduleTab').removeClass('active');
}
-function changeAction(url)
-{
- $('#batchForm').attr('action', url);
-}
-
$(document).ready(function()
{
setModal4List('runCase', 'caseList', function(){$(".results").colorbox({width:900, height:550, iframe:true, transition:'none'});});
diff --git a/module/testcase/lang/en.php b/module/testcase/lang/en.php
index 5b2a8a9d42..3c943d2679 100644
--- a/module/testcase/lang/en.php
+++ b/module/testcase/lang/en.php
@@ -65,7 +65,7 @@ $lang->testcase->import = "Import";
$lang->testcase->importID = "Linenum";
$lang->testcase->showImport = "Show import";
$lang->testcase->exportTemplet = "Export templet";
-$lang->testcase->export = "Export";
+$lang->testcase->export = "Export data";
$lang->testcase->confirmChange = 'Confirm case change';
$lang->testcase->confirmStoryChange = 'Confirm story change';
@@ -135,13 +135,6 @@ $lang->testcase->stageList['system'] = 'System testing';
$lang->testcase->stageList['smoke'] = 'Smoking testing';
$lang->testcase->stageList['bvt'] = 'BVT testing';
-$lang->testcase->stageListAB['unittest'] = 'Unit';
-$lang->testcase->stageListAB['feature'] = 'Feature';
-$lang->testcase->stageListAB['intergrate'] = 'Integrate';
-$lang->testcase->stageListAB['system'] = 'System';
-$lang->testcase->stageListAB['smoke'] = 'Smoking';
-$lang->testcase->stageListAB['bvt'] = 'BVT';
-
$lang->testcase->statusList[''] = '';
$lang->testcase->statusList['normal'] = 'Normal';
$lang->testcase->statusList['blocked'] = 'Blocked';
diff --git a/module/testcase/lang/zh-cn.php b/module/testcase/lang/zh-cn.php
index a99ed5e829..39c17a6ae9 100644
--- a/module/testcase/lang/zh-cn.php
+++ b/module/testcase/lang/zh-cn.php
@@ -65,7 +65,7 @@ $lang->testcase->import = "导入";
$lang->testcase->importID = "行号";
$lang->testcase->showImport = "显示导入内容";
$lang->testcase->exportTemplet = "导出模板";
-$lang->testcase->export = "导出";
+$lang->testcase->export = "导出数据";
$lang->testcase->confirmChange = '确认用例变动';
$lang->testcase->confirmStoryChange = '确认需求变动';
@@ -135,13 +135,6 @@ $lang->testcase->stageList['system'] = '系统测试阶段';
$lang->testcase->stageList['smoke'] = '冒烟测试阶段';
$lang->testcase->stageList['bvt'] = '版本验证阶段';
-$lang->testcase->stageListAB['unittest'] = '单元';
-$lang->testcase->stageListAB['feature'] = '功能';
-$lang->testcase->stageListAB['intergrate'] = '集成';
-$lang->testcase->stageListAB['system'] = '系统';
-$lang->testcase->stageListAB['smoke'] = '冒烟';
-$lang->testcase->stageListAB['bvt'] = '版本';
-
$lang->testcase->statusList[''] = '';
$lang->testcase->statusList['normal'] = '正常';
$lang->testcase->statusList['blocked'] = '被阻塞';
diff --git a/module/testcase/model.php b/module/testcase/model.php
index 9ffa244a84..6c50a5abe5 100644
--- a/module/testcase/model.php
+++ b/module/testcase/model.php
@@ -381,7 +381,7 @@ class testcaseModel extends model
* @access public
* @return void
*/
- public function isClickable($case, $action)
+ public static function isClickable($case, $action)
{
$action = strtolower($action);
diff --git a/module/testcase/view/batchedit.html.php b/module/testcase/view/batchedit.html.php
index bc69532211..d26bef31bd 100644
--- a/module/testcase/view/batchedit.html.php
+++ b/module/testcase/view/batchedit.html.php
@@ -32,21 +32,7 @@
| module, "class='select-1'");?> |
title, 'class=text-1'); echo "*";?> |
testcase->typeList, $cases[$caseID]->type, 'class=select-1');?> |
-
- testcase->stageListAB as $key => $stage)
- {
- if(in_array($key, explode(',', $cases[$caseID]->stage)))
- {
- echo "$stage ";
- }
- else
- {
- echo "$stage ";
- }
- }
- ?>
- |
+ testcase->stageList, $cases[$caseID]->stage, "class='select-1 chosen' multiple data-placeholder='{$lang->testcase->stage}'");?> |
diff --git a/module/testcase/view/browse.html.php b/module/testcase/view/browse.html.php
index 6f380c7568..27ea34a6a3 100644
--- a/module/testcase/view/browse.html.php
+++ b/module/testcase/view/browse.html.php
@@ -15,6 +15,7 @@ include '../../common/view/header.html.php';
include '../../common/view/datepicker.html.php';
include '../../common/view/treeview.html.php';
include '../../common/view/colorize.html.php';
+include '../../common/view/dropmenu.html.php';
js::set('browseType', $browseType);
js::set('moduleID' , $moduleID);
js::set('confirmDelete', $lang->testcase->confirmDelete);
@@ -23,26 +24,45 @@ js::set('confirmDelete', $lang->testcase->confirmDelete);