Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
+28
-15
@@ -111,29 +111,40 @@ $lang->block->default['project']['4']['params']['num'] = 15;
|
||||
$lang->block->default['project']['4']['params']['orderBy'] = 'id_desc';
|
||||
$lang->block->default['project']['4']['params']['type'] = 'assignedTo';
|
||||
|
||||
$lang->block->default['qa']['1']['title'] = '指派給我的Bug';
|
||||
$lang->block->default['qa']['1']['block'] = 'bug';
|
||||
$lang->block->default['qa']['1']['grid'] = 4;
|
||||
$lang->block->default['qa']['1']['title'] = '測試統計';
|
||||
$lang->block->default['qa']['1']['block'] = 'statistic';
|
||||
$lang->block->default['qa']['1']['grid'] = 8;
|
||||
|
||||
$lang->block->default['qa']['1']['params']['num'] = 15;
|
||||
$lang->block->default['qa']['1']['params']['orderBy'] = 'id_desc';
|
||||
$lang->block->default['qa']['1']['params']['type'] = 'assignedTo';
|
||||
$lang->block->default['qa']['1']['params']['type'] = 'noclosed';
|
||||
|
||||
$lang->block->default['qa']['2']['title'] = '指派給我的用例';
|
||||
$lang->block->default['qa']['2']['block'] = 'case';
|
||||
//$lang->block->default['qa']['2']['title'] = '測試用例總覽';
|
||||
//$lang->block->default['qa']['2']['block'] = 'overview';
|
||||
//$lang->block->default['qa']['2']['grid'] = 4;
|
||||
|
||||
$lang->block->default['qa']['2']['title'] = '指派給我的Bug';
|
||||
$lang->block->default['qa']['2']['block'] = 'bug';
|
||||
$lang->block->default['qa']['2']['grid'] = 4;
|
||||
|
||||
$lang->block->default['qa']['2']['params']['num'] = 15;
|
||||
$lang->block->default['qa']['2']['params']['orderBy'] = 'id_desc';
|
||||
$lang->block->default['qa']['2']['params']['type'] = 'assigntome';
|
||||
$lang->block->default['qa']['2']['params']['type'] = 'assignedTo';
|
||||
|
||||
$lang->block->default['qa']['3']['title'] = '待測版本列表';
|
||||
$lang->block->default['qa']['3']['block'] = 'testtask';
|
||||
$lang->block->default['qa']['3']['title'] = '指派給我的用例';
|
||||
$lang->block->default['qa']['3']['block'] = 'case';
|
||||
$lang->block->default['qa']['3']['grid'] = 4;
|
||||
|
||||
$lang->block->default['qa']['3']['params']['num'] = 15;
|
||||
$lang->block->default['qa']['3']['params']['orderBy'] = 'id_desc';
|
||||
$lang->block->default['qa']['3']['params']['type'] = 'wait';
|
||||
$lang->block->default['qa']['3']['params']['type'] = 'assigntome';
|
||||
|
||||
$lang->block->default['qa']['4']['title'] = '待測版本列表';
|
||||
$lang->block->default['qa']['4']['block'] = 'testtask';
|
||||
$lang->block->default['qa']['4']['grid'] = 8;
|
||||
|
||||
$lang->block->default['qa']['4']['params']['num'] = 15;
|
||||
$lang->block->default['qa']['4']['params']['orderBy'] = 'id_desc';
|
||||
$lang->block->default['qa']['4']['params']['type'] = 'wait';
|
||||
|
||||
$lang->block->default['full']['my']['1']['title'] = '歡迎';
|
||||
$lang->block->default['full']['my']['1']['block'] = 'welcome';
|
||||
@@ -251,9 +262,11 @@ $lang->block->modules['project']->availableBlocks->task = '任務列表';
|
||||
$lang->block->modules['project']->availableBlocks->build = '版本列表';
|
||||
$lang->block->modules['qa'] = new stdclass();
|
||||
$lang->block->modules['qa']->availableBlocks = new stdclass();
|
||||
$lang->block->modules['qa']->availableBlocks->bug = 'Bug列表';
|
||||
$lang->block->modules['qa']->availableBlocks->case = '用例列表';
|
||||
$lang->block->modules['qa']->availableBlocks->testtask = '版本列表';
|
||||
$lang->block->modules['qa']->availableBlocks->statistic = '測試統計';
|
||||
//$lang->block->modules['qa']->availableBlocks->overview = '測試用例總覽';
|
||||
$lang->block->modules['qa']->availableBlocks->bug = 'Bug列表';
|
||||
$lang->block->modules['qa']->availableBlocks->case = '用例列表';
|
||||
$lang->block->modules['qa']->availableBlocks->testtask = '版本列表';
|
||||
$lang->block->modules['todo'] = new stdclass();
|
||||
$lang->block->modules['todo']->availableBlocks = new stdclass();
|
||||
$lang->block->modules['todo']->availableBlocks->list = '待辦列表';
|
||||
@@ -350,7 +363,7 @@ $lang->block->typeList->testtask['done'] = '已測版本';
|
||||
$lang->block->typeList->testtask['all'] = '全部';
|
||||
|
||||
$lang->block->modules['product']->moreLinkList = new stdclass();
|
||||
$lang->block->modules['product']->moreLinkList->list = 'product|all|product=&status=%s';
|
||||
$lang->block->modules['product']->moreLinkList->list = 'product|all|product=&line=0&status=%s';
|
||||
$lang->block->modules['product']->moreLinkList->story = 'my|story|type=%s';
|
||||
$lang->block->modules['project']->moreLinkList = new stdclass();
|
||||
$lang->block->modules['project']->moreLinkList->list = 'project|all|status=%s&project=';
|
||||
|
||||
@@ -129,6 +129,7 @@ $lang->bug->resolvedByMeAB = '由我解决';
|
||||
$lang->bug->ditto = '同上';
|
||||
$lang->bug->dittoNotice = '该bug与上一bug不属于同一产品!';
|
||||
$lang->bug->noAssigned = '未指派';
|
||||
$lang->bug->noBug = '暂时没有BUG,您现在可以';
|
||||
|
||||
/* 页面标签。*/
|
||||
$lang->bug->lblAssignedTo = '当前指派';
|
||||
|
||||
@@ -10,8 +10,13 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php if(empty($bugs)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p><span class="text-muted"><?php echo $lang->bug->noBug;?></span> <?php common::printLink('bug', 'create', "productID={$productID}", "<i class='icon icon-plus'> </i>" . $lang->bug->create, '', "class='btn btn-info'");?></p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<?php
|
||||
include '../../common/view/header.html.php';
|
||||
include '../../common/view/datatable.fix.html.php';
|
||||
js::set('browseType', $browseType);
|
||||
js::set('moduleID', $moduleID);
|
||||
@@ -387,4 +392,5 @@ $(function(){$('#modulemenu .nav li:last').after("<li class='right'><a style='fo
|
||||
#querybox #searchform{border-bottom: 1px solid #ddd; margin-bottom: 20px;}
|
||||
</style>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
+30
-16
@@ -268,22 +268,39 @@ $lang->bug->menu->index = array('link' => "<i class='icon-home'></i>QA|qa|in
|
||||
|
||||
$lang->testcase = new stdclass();
|
||||
$lang->testcase->menu = new stdclass();
|
||||
|
||||
$lang->testcase->menu->product = array('link' => '%s', 'fixed' => true);
|
||||
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testcase->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree');
|
||||
$lang->testcase->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
|
||||
$lang->testcase->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
|
||||
$lang->testcase->menu->report = array('link' => 'Report|testreport|browse|productID=%s', 'alias' => 'view,create,edit');
|
||||
$lang->testcase->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s');
|
||||
$lang->testcase->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s');
|
||||
$lang->testcase->menu->report = array('link' => 'Report|testreport|browse|productID=%s');
|
||||
$lang->testcase->menu->caselib = array('link' => 'Library|testsuite|library');
|
||||
$lang->testcase->menu->index = array('link' => "<i class='icon-home'></i>QA|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
|
||||
$lang->testtask = new stdclass();
|
||||
$lang->testtask->menu = $lang->testcase->menu;
|
||||
$lang->testtask->menu = new stdclass();
|
||||
$lang->testtask->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testtask->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s');
|
||||
$lang->testtask->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
|
||||
$lang->testtask->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s');
|
||||
$lang->testtask->menu->report = array('link' => 'Report|testreport|browse|productID=%s');
|
||||
$lang->testtask->menu->caselib = array('link' => 'Library|testsuite|library');
|
||||
|
||||
$lang->testsuite = new stdclass();
|
||||
$lang->testsuite->menu = $lang->testcase->menu;
|
||||
$lang->testsuite->menu = new stdclass();
|
||||
$lang->testsuite->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testsuite->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s');
|
||||
$lang->testsuite->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s');
|
||||
$lang->testsuite->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
|
||||
$lang->testsuite->menu->report = array('link' => 'Report|testreport|browse|productID=%s');
|
||||
$lang->testsuite->menu->caselib = array('link' => 'Library|testsuite|library');
|
||||
|
||||
$lang->testreport = new stdclass();
|
||||
$lang->testreport->menu = $lang->testcase->menu;
|
||||
$lang->testreport->menu = new stdclass();
|
||||
$lang->testreport->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testreport->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s');
|
||||
$lang->testreport->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s');
|
||||
$lang->testreport->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s');
|
||||
$lang->testreport->menu->report = array('link' => 'Report|testreport|browse|productID=%s', 'alias' => 'view,create,edit');
|
||||
$lang->testreport->menu->caselib = array('link' => 'Library|testsuite|library');
|
||||
|
||||
$lang->caselib = new stdclass();
|
||||
$lang->caselib->menu = new stdclass();
|
||||
@@ -294,8 +311,6 @@ $lang->caselib->menu->testtask = array('link' => 'Build|testtask|browse|');
|
||||
$lang->caselib->menu->testsuite = array('link' => 'Suite|testsuite|browse|');
|
||||
$lang->caselib->menu->report = array('link' => 'Report|testreport|browse|');
|
||||
$lang->caselib->menu->caselib = array('link' => 'Library|testsuite|library', 'alias' => 'createlib,createcase,libview,edit,batchcreatecase,showimport', 'subModule' => 'tree,testcase');
|
||||
$lang->caselib->menu->create = array('link' => "<i class='icon-plus'></i>Create a Library|testsuite|createLib|", 'float' => 'right');
|
||||
$lang->caselib->menu->index = array('link' => "<i class='icon-home'></i>Test Home|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
|
||||
/* 文档视图菜单设置。*/
|
||||
$lang->doc = new stdclass();
|
||||
@@ -762,11 +777,10 @@ if(isset($config->global->flow) and $config->global->flow == 'onlyTest')
|
||||
|
||||
/* Adjust sub menu of caselib module. */
|
||||
$lang->caselib->menu = new stdclass();
|
||||
$lang->caselib->menu->lib = array('link' => '%s', 'fixed' => true);
|
||||
$lang->caselib->menu->all = 'All|testsuite|library|libID=%s&browseType=all';
|
||||
$lang->caselib->menu->wait = 'Wait|testsuite|library|libID=%s&browseType=wait';
|
||||
$lang->caselib->menu->view = 'View|testsuite|libview|libID=%s';
|
||||
$lang->caselib->menu->create = array('link' => "<i class='icon-plus'></i> Create Library|testsuite|createLib", 'float' => 'right');
|
||||
$lang->caselib->menu->lib = array('link' => '%s', 'fixed' => true);
|
||||
$lang->caselib->menu->all = 'All|testsuite|library|libID=%s&browseType=all';
|
||||
$lang->caselib->menu->wait = 'Wait|testsuite|library|libID=%s&browseType=wait';
|
||||
$lang->caselib->menu->view = 'View|testsuite|libview|libID=%s';
|
||||
|
||||
$lang->caselib->menuOrder[5] = 'lib';
|
||||
$lang->caselib->menuOrder[10] = 'all';
|
||||
|
||||
@@ -279,20 +279,39 @@ $lang->bug->menu->caselib = array('link' => '用例库|testsuite|library');
|
||||
|
||||
$lang->testcase = new stdclass();
|
||||
$lang->testcase->menu = new stdclass();
|
||||
|
||||
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testcase->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree');
|
||||
$lang->testcase->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
|
||||
$lang->testcase->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
|
||||
$lang->testcase->menu->report = array('link' => '报告|testreport|browse|productID=%s', 'alias' => 'view,create,edit');
|
||||
$lang->testcase->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s');
|
||||
$lang->testcase->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
|
||||
$lang->testcase->menu->report = array('link' => '报告|testreport|browse|productID=%s');
|
||||
$lang->testcase->menu->caselib = array('link' => '用例库|testsuite|library');
|
||||
|
||||
$lang->testtask = new stdclass();
|
||||
$lang->testtask->menu = $lang->testcase->menu;
|
||||
$lang->testtask->menu = new stdclass();
|
||||
$lang->testtask->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testtask->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
|
||||
$lang->testtask->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
|
||||
$lang->testtask->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
|
||||
$lang->testtask->menu->report = array('link' => '报告|testreport|browse|productID=%s');
|
||||
$lang->testtask->menu->caselib = array('link' => '用例库|testsuite|library');
|
||||
|
||||
$lang->testsuite = new stdclass();
|
||||
$lang->testsuite->menu = $lang->testcase->menu;
|
||||
$lang->testsuite->menu = new stdclass();
|
||||
$lang->testsuite->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testsuite->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
|
||||
$lang->testsuite->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s');
|
||||
$lang->testsuite->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
|
||||
$lang->testsuite->menu->report = array('link' => '报告|testreport|browse|productID=%s');
|
||||
$lang->testsuite->menu->caselib = array('link' => '用例库|testsuite|library');
|
||||
|
||||
$lang->testreport = new stdclass();
|
||||
$lang->testreport->menu = $lang->testcase->menu;
|
||||
$lang->testreport->menu = new stdclass();
|
||||
$lang->testreport->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testreport->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
|
||||
$lang->testreport->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s');
|
||||
$lang->testreport->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
|
||||
$lang->testreport->menu->report = array('link' => '报告|testreport|browse|productID=%s', 'alias' => 'view,create,edit');
|
||||
$lang->testreport->menu->caselib = array('link' => '用例库|testsuite|library');
|
||||
|
||||
$lang->caselib = new stdclass();
|
||||
$lang->caselib->menu = new stdclass();
|
||||
@@ -765,11 +784,10 @@ if(isset($config->global->flow) and $config->global->flow == 'onlyTest')
|
||||
|
||||
/* Adjust sub menu of caselib module. */
|
||||
$lang->caselib->menu = new stdclass();
|
||||
$lang->caselib->menu->lib = array('link' => '%s', 'fixed' => true);
|
||||
$lang->caselib->menu->all = '所有|testsuite|library|libID=%s&browseType=all';
|
||||
$lang->caselib->menu->wait = '待评审|testsuite|library|libID=%s&browseType=wait';
|
||||
$lang->caselib->menu->view = '概况|testsuite|libview|libID=%s';
|
||||
$lang->caselib->menu->create = array('link' => "<i class='icon-plus'></i> 创建库|testsuite|createLib", 'float' => 'right');
|
||||
$lang->caselib->menu->lib = array('link' => '%s', 'fixed' => true);
|
||||
$lang->caselib->menu->all = '所有|testsuite|library|libID=%s&browseType=all';
|
||||
$lang->caselib->menu->wait = '待评审|testsuite|library|libID=%s&browseType=wait';
|
||||
$lang->caselib->menu->view = '概况|testsuite|libview|libID=%s';
|
||||
|
||||
$lang->caselib->menuOrder[5] = 'lib';
|
||||
$lang->caselib->menuOrder[10] = 'all';
|
||||
|
||||
@@ -416,12 +416,12 @@ class commonModel extends model
|
||||
foreach ($lang->searchObjects as $key => $value)
|
||||
{
|
||||
$class = $key == $searchObject ? "class='selected'" : '';
|
||||
echo "<li $class><a href='javascript:;' data-value='{$key}'>{$value}</a></li>";
|
||||
echo "<li $class><a href='javascript:$.setSearchType(\"$key\");' data-value='{$key}'>{$value}</a></li>";
|
||||
}
|
||||
echo '</ul></div>';
|
||||
echo "<input id='searchInput' class='form-control search-input' type='search' onclick='this.value=\"\"' onkeydown='if(event.keyCode==13) shortcut()' placeholder='" . $lang->searchTips . "'/>";
|
||||
echo "<input id='searchInput' class='form-control search-input' type='search' onclick='this.value=\"\"' onkeydown='if(event.keyCode==13) $.gotoObject();' placeholder='" . $lang->searchTips . "'/>";
|
||||
echo '</div>';
|
||||
echo "<a href='javascript:shortcut();' class='btn btn-link' id='searchGo'>GO!</a>";
|
||||
echo "<a href='javascript:$.gotoObject();' class='btn btn-link' id='searchGo'>GO!</a>";
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
<?php if(!empty($setShowModule)):?>
|
||||
$('#sidebar .cell .text-center:last').append("<a href='javascript:;' data-toggle='showModuleModal' class='text-secondary small'><?php echo $lang->datatable->showModule?></a><hr class='space-sm' />");
|
||||
$("a[data-toggle='showModuleModal']").click(function(){$('#showModuleModal').modal('show')});
|
||||
<?php endif;?>
|
||||
|
||||
var $btnToolbar = $('#main #mainContent form.main-table .table-header .btn-toolbar:first');
|
||||
if($btnToolbar.length > 0)
|
||||
{
|
||||
@@ -9,11 +14,7 @@ $(function()
|
||||
// $btnToolbar.append("<a href=\"javascript:saveDatatableConfig('mode', 'table', true);\" class='btn btn-link <?php echo $mode == 'table' ? 'btn-active-line' : '';?>'><?php echo $lang->datatable->table?></a>");
|
||||
// $btnToolbar.append("<a href=\"javascript:saveDatatableConfig('mode', 'datatable', true);\" class='btn btn-link <?php echo $mode == 'datatable' ? 'btn-active-line' : '';?>'><?php echo $lang->datatable->datatable?></a>");
|
||||
$btnToolbar.append("<a id='tableCustomBtn' class='btn btn-link' href='<?php echo $this->createLink('datatable', 'ajaxCustom', 'id=' . $this->moduleName . '&method=' . $this->methodName)?>' data-toggle='modal' data-type='ajax'><i class='icon icon-cog'></i></a>");
|
||||
<?php if(!empty($setShowModule)):?>
|
||||
$('#sidebar .cell .text-center:last').append("<a href='javascript:;' data-toggle='showModuleModal' class='text-secondary small'><?php echo $lang->datatable->showModule?></a><hr class='space-sm' />");
|
||||
<?php endif;?>
|
||||
$('#tableCustomBtn').modalTrigger();
|
||||
$("a[data-toggle='showModuleModal']").click(function(){$('#showModuleModal').modal('show')});
|
||||
}
|
||||
|
||||
$('#setShowModule').click(function()
|
||||
|
||||
@@ -95,6 +95,8 @@ $lang->dev->tableList['entry'] = '應用';
|
||||
$lang->dev->tableList['webhook'] = 'WebHook';
|
||||
$lang->dev->tableList['webhookdatas'] = 'WebHook數據';
|
||||
$lang->dev->tableList['log'] = '介面日誌';
|
||||
$lang->dev->tableList['message'] = '消息';
|
||||
$lang->dev->tableList['notify'] = '通知';
|
||||
|
||||
$lang->dev->groupList['my'] = '我的地盤';
|
||||
$lang->dev->groupList['product'] = $lang->productCommon;
|
||||
|
||||
@@ -34,7 +34,7 @@ $lang->product->otherInfo = '其他信息';
|
||||
$lang->product->plans = '計劃數';
|
||||
$lang->product->releases = '發佈數';
|
||||
$lang->product->docs = '文檔數';
|
||||
$lang->product->bugs = '相關BUG';
|
||||
$lang->product->bugs = '相關Bug';
|
||||
$lang->product->projects = "關聯{$lang->projectCommon}數";
|
||||
$lang->product->cases = '用例數';
|
||||
$lang->product->builds = 'BUILD數';
|
||||
|
||||
@@ -90,13 +90,11 @@
|
||||
</div>
|
||||
<hr class="space">
|
||||
<?php endif;?>
|
||||
|
||||
<?php echo $moduleTree;?>
|
||||
<div class="text-center">
|
||||
<?php common::printLink('tree', 'browse', "rootID=$productID&view=story", $lang->tree->manage, '', "class='btn btn-info btn-wide'");?>
|
||||
<hr class="space-sm" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -11,11 +11,8 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
bootbox.alert("<?php echo $lang->product->errorNoProduct?>", function(){location.href='<?php echo $this->createLink('product', 'create')?>'});
|
||||
})
|
||||
</script>
|
||||
<div class="table-empty-tip">
|
||||
<p><span class="text-muted"><?php echo $lang->product->noProduct;?></span> <?php common::printLink('product', 'create', '', "<i class='icon icon-plus'> </i>" . $lang->product->create, '', "class='btn btn-info'");?></p>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class="col-sm-6">
|
||||
<div class="panel block-release">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title"><?php echo $lang->product->iteration;?> <span class="label label-badge label-light"><?php echo sprintf($lang->product->iterationInfo, count($releases));?></span></div>
|
||||
<div class="panel-title"><?php echo $lang->product->iteration;?> <span class="label label-badge label-light"><?php printf($lang->product->iterationInfo, count($releases));?></span></div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="release-path">
|
||||
@@ -216,17 +216,14 @@
|
||||
echo "<div class='divider'></div>";
|
||||
if($product->status != 'closed')
|
||||
{
|
||||
common::printIcon('product', 'close', "productID=$product->id", $product, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('product', 'close', $params, $product, 'button', '', '', 'iframe', true);
|
||||
echo "<div class='divider'></div>";
|
||||
}
|
||||
|
||||
common::printIcon('product', 'edit', $params, $product);
|
||||
common::printIcon('product', 'delete', $params, $product, 'button', '', 'hiddenwin');
|
||||
}
|
||||
else
|
||||
{
|
||||
common::printBack($browseLink);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -104,10 +104,10 @@
|
||||
<th class="c-actions-2"><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $groupIndex = 1;?>
|
||||
<?php foreach($tasks as $groupKey => $groupTasks):?>
|
||||
<?php
|
||||
<tbody>
|
||||
<?php $groupIndex = 1;?>
|
||||
<?php foreach($tasks as $groupKey => $groupTasks):?>
|
||||
<?php
|
||||
$groupWait = 0;
|
||||
$groupDone = 0;
|
||||
$groupDoing = 0;
|
||||
@@ -119,79 +119,80 @@
|
||||
$groupName = $groupKey;
|
||||
if($groupBy == 'story') $groupName = empty($groupName) ? $this->lang->task->noStory : zget($groupByList, $groupKey);
|
||||
if($groupBy == 'assignedTo' and $groupName == '') $groupName = $this->lang->task->noAssigned;
|
||||
?>
|
||||
<?php
|
||||
$groupSum = 0;
|
||||
foreach($groupTasks as $taskKey => $task)
|
||||
{
|
||||
$groupEstimate += $task->estimate;
|
||||
$groupConsumed += $task->consumed;
|
||||
$groupLeft += ($task->status == 'cancel' ? 0 : $task->left);
|
||||
?>
|
||||
<?php
|
||||
$groupSum = 0;
|
||||
foreach($groupTasks as $taskKey => $task)
|
||||
{
|
||||
$groupEstimate += $task->estimate;
|
||||
$groupConsumed += $task->consumed;
|
||||
$groupLeft += ($task->status == 'cancel' ? 0 : $task->left);
|
||||
|
||||
if($task->status == 'wait') $groupWait++;
|
||||
if($task->status == 'doing') $groupDoing++;
|
||||
if($task->status == 'done') $groupDone++;
|
||||
if($task->status == 'closed') $groupClosed++;
|
||||
}
|
||||
$groupSum = count($groupTasks);
|
||||
?>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($groupTasks as $task):?>
|
||||
<?php $assignedToClass = $task->assignedTo == $app->user->account ? "style='color:red'" : '';?>
|
||||
<?php $taskLink = $this->createLink('task','view',"taskID=$task->id"); ?>
|
||||
<tr data-id='<?php echo $groupIndex?>' <?php if($groupIndex > 1 and $i == 0) echo "class='divider-top'";?>>
|
||||
<?php if($i == 0):?>
|
||||
<td rowspan='<?php echo $groupSum?>' class='c-side text-left group-toggle text-top'>
|
||||
<?php echo html::a('###', "<i class='icon-caret-down'></i> " . $groupName, '', "class='text-primary' title='$groupName'");?>
|
||||
<div class='groupSummary small'>
|
||||
if($task->status == 'wait') $groupWait++;
|
||||
if($task->status == 'doing') $groupDoing++;
|
||||
if($task->status == 'done') $groupDone++;
|
||||
if($task->status == 'closed') $groupClosed++;
|
||||
}
|
||||
$groupSum = count($groupTasks);
|
||||
?>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($groupTasks as $task):?>
|
||||
<?php $assignedToClass = $task->assignedTo == $app->user->account ? "style='color:red'" : '';?>
|
||||
<?php $taskLink = $this->createLink('task','view',"taskID=$task->id"); ?>
|
||||
<tr data-id='<?php echo $groupIndex?>' <?php if($groupIndex > 1 and $i == 0) echo "class='divider-top'";?>>
|
||||
<?php if($i == 0):?>
|
||||
<td rowspan='<?php echo $groupSum?>' class='c-side text-left group-toggle text-top'>
|
||||
<?php echo html::a('###', "<i class='icon-caret-down'></i> " . $groupName, '', "class='text-primary' title='$groupName'");?>
|
||||
<div class='groupSummary small'>
|
||||
|
||||
<?php if($groupBy == 'assignedTo' and isset($members[$task->assignedTo])) printf($lang->project->memberHoursAB, $users[$task->assignedTo], $members[$task->assignedTo]->totalHours);?>
|
||||
<?php printf($lang->project->groupSummaryAB, $groupSum, $groupWait, $groupDoing, $groupEstimate, $groupConsumed, $groupLeft);?>
|
||||
</div>
|
||||
</td>
|
||||
<?php if($groupBy == 'assignedTo' and isset($members[$task->assignedTo])) printf($lang->project->memberHoursAB, $users[$task->assignedTo], $members[$task->assignedTo]->totalHours);?>
|
||||
<?php printf($lang->project->groupSummaryAB, $groupSum, $groupWait, $groupDoing, $groupEstimate, $groupConsumed, $groupLeft);?>
|
||||
</div>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<td class='c-id-sm'><?php echo $task->id;?></td>
|
||||
<td class="c-pri"><span class='label-pri <?php echo 'label-pri-' . $task->pri?>'><?php echo zget($lang->task->priList, $task->pri, $task->pri);?></span></td>
|
||||
<td class="c-name">
|
||||
<?php
|
||||
if(!empty($task->team)) echo '<span class="label">' . $lang->task->multipleAB . '</span> ';
|
||||
if(!empty($task->parent)) echo '<span class="label">' . $lang->task->childrenAB . '</span> ';
|
||||
if(isset($task->children) && $task->children == true) echo '<span class="label">' . $lang->task->parentAB . '</span> ';
|
||||
if(!common::printLink('task', 'view', "task=$task->id", $task->name)) echo $task->name;
|
||||
?>
|
||||
</td>
|
||||
<td class="c-status"><span class='status-<?php echo $task->status;?>'><span class="label label-dot"></span> <?php echo $lang->task->statusList[$task->status];?></span></td>
|
||||
<td class="c-assign text-left has-btn"><?php echo html::a($this->createLink('task', 'assignTo', "projectID=$task->project&taskID=$task->id", 'html', true), '<i class="icon icon-hand-right"></i> ' . $task->assignedToRealName, '', "class='iframe btn btn-icon-left' $assignedToClass");?></td>
|
||||
<td class='c-user'><?php echo zget($users, $task->finishedBy);?></td>
|
||||
<td class="c-hours em"><?php echo $task->estimate;?></td>
|
||||
<td class="c-hours em"><?php echo $task->consumed;?></td>
|
||||
<td class="c-hours em"><?php echo $task->left;?></td>
|
||||
<td class="c-num em"><?php echo $task->progress . '%';?></td>
|
||||
<td class="c-type"><?php echo zget($lang->task->typeList, $task->type);?></td>
|
||||
<td class='c-date <?php if(isset($task->delay)) echo 'delayed';?>'><?php if(substr($task->deadline, 0, 4) > 0) echo $task->deadline;?></td>
|
||||
<td class="c-actions">
|
||||
<?php common::printIcon('task', 'edit', "taskid=$task->id", '', 'list');?>
|
||||
<?php common::printIcon('task', 'delete', "projectID=$task->project&taskid=$task->id", '', 'list', '', 'hiddenwin');?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++;?>
|
||||
<?php endforeach;?>
|
||||
<?php if($i != 0):?>
|
||||
<tr class='group-toggle group-summary hidden <?php if($groupIndex > 1) echo 'divider-top';?>' data-id='<?php echo $groupIndex?>'>
|
||||
<td class='c-side text-left'>
|
||||
<?php echo html::a('###', "<i class='icon-caret-right text-muted'></i> " . $groupName, '', "title='$groupName'");?>
|
||||
</td>
|
||||
<td colspan='13'>
|
||||
<div class="table-row segments-list">
|
||||
<?php if($groupBy == 'assignedTo' and isset($members[$task->assignedTo])) printf($lang->project->memberHours, $users[$task->assignedTo], $members[$task->assignedTo]->totalHours);?>
|
||||
<?php printf($lang->project->countSummary, $groupSum, $groupWait, $groupDoing);?>
|
||||
<?php printf($lang->project->timeSummary, $groupEstimate, $groupConsumed, $groupLeft);?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<td class='c-id-sm'><?php echo $task->id;?></td>
|
||||
<td class="c-pri"><span class='label-pri <?php echo 'label-pri-' . $task->pri?>'><?php echo zget($lang->task->priList, $task->pri, $task->pri);?></span></td>
|
||||
<td class="c-name">
|
||||
<?php
|
||||
if(!empty($task->team)) echo '<span class="label">' . $lang->task->multipleAB . '</span> ';
|
||||
if(!empty($task->parent)) echo '<span class="label">' . $lang->task->childrenAB . '</span> ';
|
||||
if(isset($task->children) && $task->children == true) echo '<span class="label">' . $lang->task->parentAB . '</span> ';
|
||||
if(!common::printLink('task', 'view', "task=$task->id", $task->name)) echo $task->name;
|
||||
?>
|
||||
</td>
|
||||
<td class="c-status"><span class='status-<?php echo $task->status;?>'><span class="label label-dot"></span> <?php echo $lang->task->statusList[$task->status];?></span></td>
|
||||
<td class="c-assign text-left has-btn"><?php echo html::a($this->createLink('task', 'assignTo', "projectID=$task->project&taskID=$task->id", 'html', true), '<i class="icon icon-hand-right"></i> ' . $task->assignedToRealName, '', "class='iframe btn btn-icon-left' $assignedToClass");?></td>
|
||||
<td class='c-user'><?php echo zget($users, $task->finishedBy);?></td>
|
||||
<td class="c-hours em"><?php echo $task->estimate;?></td>
|
||||
<td class="c-hours em"><?php echo $task->consumed;?></td>
|
||||
<td class="c-hours em"><?php echo $task->left;?></td>
|
||||
<td class="c-num em"><?php echo $task->progress . '%';?></td>
|
||||
<td class="c-type"><?php echo zget($lang->task->typeList, $task->type);?></td>
|
||||
<td class='c-date <?php if(isset($task->delay)) echo 'delayed';?>'><?php if(substr($task->deadline, 0, 4) > 0) echo $task->deadline;?></td>
|
||||
<td class="c-actions">
|
||||
<?php common::printIcon('task', 'edit', "taskid=$task->id", '', 'list');?>
|
||||
<?php common::printIcon('task', 'delete', "projectID=$task->project&taskid=$task->id", '', 'list', '', 'hiddenwin');?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++;?>
|
||||
<?php endforeach;?>
|
||||
<?php if($i != 0):?>
|
||||
<tr class='group-toggle group-summary hidden <?php if($groupIndex > 1) echo 'divider-top';?>' data-id='<?php echo $groupIndex?>'>
|
||||
<td class='c-side text-left'>
|
||||
<?php echo html::a('###', "<i class='icon-caret-right text-muted'></i> " . $groupName, '', "title='$groupName'");?>
|
||||
</td>
|
||||
<td colspan='13'>
|
||||
<div class="table-row segments-list">
|
||||
<?php if($groupBy == 'assignedTo' and isset($members[$task->assignedTo])) printf($lang->project->memberHours, $users[$task->assignedTo], $members[$task->assignedTo]->totalHours);?>
|
||||
<?php printf($lang->project->countSummary, $groupSum, $groupWait, $groupDoing);?>
|
||||
<?php printf($lang->project->timeSummary, $groupEstimate, $groupConsumed, $groupLeft);?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php $groupIndex ++;?>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php $groupIndex ++;?>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1111,11 +1111,12 @@ class story extends control
|
||||
$this->view->position[] = html::a($this->createLink('testcase', 'browse', "productID=$productID"), $products[$productID]);
|
||||
$this->view->position[] = $this->lang->story->zeroCase;
|
||||
|
||||
$this->view->stories = $this->story->getZeroCase($productID, $sort);
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->productID = $productID;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->suiteList = $this->loadModel('testsuite')->getSuites($productID);
|
||||
$this->view->stories = $this->story->getZeroCase($productID, $sort);
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->productID = $productID;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->suiteList = $this->loadModel('testsuite')->getSuites($productID);
|
||||
$this->view->browseType = '';
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<th class='w-hour'><?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
|
||||
<th> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<th> <?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
|
||||
<th class='w-140px'><?php echo $lang->actions;?></th>
|
||||
<th class='w-180px'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -47,8 +47,8 @@
|
||||
<div class="checkbox-primary">
|
||||
<input type='checkbox' name='storyIDList[<?php echo $story->id;?>]' value='<?php echo $story->id;?>' />
|
||||
<label></label>
|
||||
<?php printf('%03d', $story->id);?>
|
||||
</div>
|
||||
<?php printf('%03d', $story->id);?>
|
||||
</td>
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>'><?php echo zget($lang->story->priList, $story->pri)?></span></td>
|
||||
<td class='text-left' title="<?php echo $story->title?>"><nobr><?php echo html::a($viewLink, $story->title);?></nobr></td>
|
||||
|
||||
@@ -174,6 +174,9 @@ class testcase extends control
|
||||
}
|
||||
}
|
||||
|
||||
$this->app->loadLang('project');
|
||||
$this->app->loadLang('task');
|
||||
|
||||
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testcase->common;
|
||||
$this->view->position[] = html::a($this->createLink('testcase', 'groupTask', "productID=$productID&groupBy=$groupBy"), $this->products[$productID]);
|
||||
$this->view->position[] = $this->lang->testcase->common;
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#' + browseType + 'Tab').addClass('active');
|
||||
});
|
||||
|
||||
@@ -198,13 +198,13 @@ js::set('branch', $branch);
|
||||
</div>
|
||||
<script>
|
||||
$('#module' + moduleID).addClass('active');
|
||||
$('#' + caseBrowseType + 'Tab').addClass('active');
|
||||
$('#' + caseBrowseType + 'Tab').addClass('btn-active-text');
|
||||
<?php if($browseType == 'bysearch'):?>
|
||||
$shortcut = $('#QUERY<?php echo (int)$param;?>Tab');
|
||||
if($shortcut.size() > 0)
|
||||
{
|
||||
$shortcut.addClass('active');
|
||||
$('#bysearchTab').removeClass('active');
|
||||
$shortcut.addClass('btn-active-text');
|
||||
$('#bysearchTab').removeClass('btn-active-text');
|
||||
$('#querybox').removeClass('show');
|
||||
}
|
||||
<?php endif;?>
|
||||
|
||||
@@ -1,43 +1,35 @@
|
||||
<?php js::set('flow', $this->config->global->flow);?>
|
||||
<?php if(!isset($branch)) $branch = 0;?>
|
||||
<?php if($this->config->global->flow == 'onlyTest'):?>
|
||||
<style>
|
||||
.nav > li > .btn-group > a, .nav > li > .btn-group > a:hover, .nav > li > .btn-group > a:focus{background: #1a4f85; border-color: #164270;}
|
||||
.outer.with-side #featurebar {background: none; border: none; line-height: 0; margin: 0; min-height: 0; padding: 0; }
|
||||
#querybox #searchform{border-bottom: 1px solid #ddd; margin-bottom: 20px;}
|
||||
</style>
|
||||
<div id='featurebar'>
|
||||
<ul class='submenu hidden'>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left hidden'>
|
||||
<?php
|
||||
$hasBrowsePriv = common::hasPriv('testcase', 'browse');
|
||||
$hasGroupPriv = common::hasPriv('testcase', 'groupcase');
|
||||
$hasZeroPriv = common::hasPriv('story', 'zerocase');
|
||||
?>
|
||||
<?php
|
||||
if($this->methodName == 'browse') echo "<li id='bysearchTab'><a href='#'><i class='icon-search icon'></i> {$lang->testcase->bySearch}</a></li> ";
|
||||
?>
|
||||
<li class='pull-right'>
|
||||
<div class='btn-group' id='createActionMenu'>
|
||||
<?php
|
||||
$initModule = isset($moduleID) ? (int)$moduleID : 0;
|
||||
$misc = common::hasPriv('testcase', 'create') ? "class='btn btn-primary'" : "class='btn btn-primary disabled'";
|
||||
$link = common::hasPriv('testcase', 'create') ? $this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule") : '#';
|
||||
echo html::a($link, "<i class='icon-plus'></i>" . $lang->testcase->create, '', $misc);
|
||||
<?php if($this->methodName == 'browse') echo "<a id='bysearchTab' class='btn btn-link'><i class='icon-search icon'></i> {$lang->testcase->bySearch}</a>";?>
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<div class='btn-group' id='createActionMenu'>
|
||||
<?php
|
||||
$initModule = isset($moduleID) ? (int)$moduleID : 0;
|
||||
$misc = common::hasPriv('testcase', 'create') ? "class='btn btn-primary'" : "class='btn btn-primary disabled'";
|
||||
$link = common::hasPriv('testcase', 'create') ? $this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule") : '#';
|
||||
echo html::a($link, "<i class='icon-plus'></i>" . $lang->testcase->create, '', $misc);
|
||||
|
||||
$misc = common::hasPriv('testcase', 'batchCreate') ? '' : "disabled";
|
||||
$link = common::hasPriv('testcase', 'batchCreate') ? $this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule") : '#';
|
||||
?>
|
||||
<button type='button' class='btn btn-primary dropdown-toggle <?php echo $misc?>' data-toggle='dropdown'>
|
||||
<span class='caret'></span>
|
||||
</button>
|
||||
<ul class='dropdown-menu pull-right'>
|
||||
<?php echo "<li>" . html::a($link, $lang->testcase->batchCreate, '', "class='$misc'") . "</li>";?>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
$misc = common::hasPriv('testcase', 'batchCreate') ? '' : "disabled";
|
||||
$link = common::hasPriv('testcase', 'batchCreate') ? $this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule") : '#';
|
||||
?>
|
||||
<button type='button' class='btn btn-primary dropdown-toggle <?php echo $misc?>' data-toggle='dropdown'>
|
||||
<span class='caret'></span>
|
||||
</button>
|
||||
<ul class='dropdown-menu pull-right'>
|
||||
<?php echo "<li>" . html::a($link, $lang->testcase->batchCreate, '', "class='$misc'") . "</li>";?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<li class='pull-right'>
|
||||
<a href='###' class='dropdown-toggle' data-toggle='dropdown' id='importAction'><i class='icon-upload-alt'></i> <?php echo $lang->import ?><span class='caret'></span></a>
|
||||
<a href='###' class='dropdown-toggle' data-toggle='dropdown' id='importAction'><i class='icon-import'></i> <?php echo $lang->import ?><span class='caret'></span></a>
|
||||
<ul class='dropdown-menu' id='importActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('testcase', 'import') ? "class='export'" : "class=disabled";
|
||||
@@ -72,20 +64,21 @@
|
||||
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div id='featurebar'>
|
||||
<ul class='nav'>
|
||||
<li>
|
||||
<div class='label-angle<?php if(!empty($moduleID)) echo ' with-close';?>'>
|
||||
<?php
|
||||
echo !empty($moduleID) ? $moduleName : $this->lang->tree->all;
|
||||
if(!empty($moduleID))
|
||||
{
|
||||
$removeLink = $browseType == 'bymodule' ? inlink('browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("caseModule")';
|
||||
echo html::a($removeLink, "<i class='icon icon-remove'></i>", '', "class='text-muted'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div id="sidebarHeader">
|
||||
<?php echo html::commonButton('<i class="icon icon-caret-left"></i>', '', 'btn btn-icon btn-sm btn-info sidebar-toggle');?>
|
||||
<div class="title">
|
||||
<?php
|
||||
echo !empty($moduleID) ? $moduleName : $this->lang->tree->all;
|
||||
if(!empty($moduleID))
|
||||
{
|
||||
$removeLink = $browseType == 'bymodule' ? inlink('browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("caseModule")';
|
||||
echo html::a($removeLink, "<i class='icon icon-remove'></i>", '', "class='text-muted'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php
|
||||
$hasBrowsePriv = common::hasPriv('testcase', 'browse');
|
||||
$hasGroupPriv = common::hasPriv('testcase', 'groupcase');
|
||||
@@ -100,11 +93,11 @@
|
||||
if($hasBrowsePriv and strpos($menuType, 'QUERY') === 0)
|
||||
{
|
||||
$queryID = (int)substr($menuType, 5);
|
||||
echo "<li id='{$menuType}Tab'>" . html::a($this->createLink('testcase', 'browse', "productid=$productID&branch=$branch&browseType=bySearch¶m=$queryID"), $menuItem->text) . "</li>";
|
||||
echo html::a($this->createLink('testcase', 'browse', "productid=$productID&branch=$branch&browseType=bySearch¶m=$queryID"), $menuItem->text, '', "class='btn btn-link' id='{$menuType}Tab'");
|
||||
}
|
||||
elseif($hasBrowsePriv and ($menuType == 'all' or $menuType == 'needconfirm' or $menuType == 'wait'))
|
||||
{
|
||||
echo "<li id='{$menuType}Tab'>" . html::a($this->createLink('testcase', 'browse', "productid=$productID&branch=$branch&browseType=$menuType"), $menuItem->text) . "</li>";
|
||||
echo html::a($this->createLink('testcase', 'browse', "productid=$productID&branch=$branch&browseType=$menuType"), $menuItem->text, '', "class='btn btn-link' id='{$menuType}Tab'");
|
||||
}
|
||||
elseif($hasBrowsePriv and $menuType == 'suite')
|
||||
{
|
||||
@@ -112,8 +105,8 @@
|
||||
$currentSuite = zget($suiteList, $currentSuiteID, '');
|
||||
$currentLable = empty($currentSuite) ? $lang->testsuite->common : $currentSuite->name;
|
||||
|
||||
echo "<li id='bysuiteTab' class='dropdown'>";
|
||||
echo html::a('javascript:;', $currentLable . " <span class='caret'></span>", '', "data-toggle='dropdown'");
|
||||
echo "<div id='bysuiteTab' class='btn-group'>";
|
||||
echo html::a('javascript:;', $currentLable . " <span class='caret'></span>", '', "class='btn btn-link' data-toggle='dropdown'");
|
||||
echo "<ul class='dropdown-menu' style='max-height:240px; overflow-y:auto'>";
|
||||
|
||||
if(empty($suiteList))
|
||||
@@ -123,7 +116,7 @@
|
||||
echo '</li>';
|
||||
}
|
||||
|
||||
foreach ($suiteList as $suiteID => $suite)
|
||||
foreach($suiteList as $suiteID => $suite)
|
||||
{
|
||||
$suiteName = $suite->name;
|
||||
if($suite->type == 'public') $suiteName .= " <span class='label label-info'>{$lang->testsuite->authorList[$suite->type]}</span>";
|
||||
@@ -134,7 +127,7 @@
|
||||
echo "</li>";
|
||||
}
|
||||
|
||||
echo '</ul></li>';
|
||||
echo '</ul></div>';
|
||||
}
|
||||
elseif($hasGroupPriv and $menuType == 'group')
|
||||
{
|
||||
@@ -142,11 +135,11 @@
|
||||
$current = zget($lang->testcase->groups, isset($groupBy) ? $groupBy : '', '');
|
||||
if(empty($current)) $current = $lang->testcase->groups[''];
|
||||
|
||||
echo "<li id='groupTab' class='dropdown'>";
|
||||
echo html::a('javascript:;', $current . " <span class='caret'></span>", '', "data-toggle='dropdown'");
|
||||
echo "<div id='groupTab' class='btn-group'>";
|
||||
echo html::a('javascript:;', $current . " <span class='caret'></span>", '', "class='btn btn-link' data-toggle='dropdown'");
|
||||
echo "<ul class='dropdown-menu'>";
|
||||
|
||||
foreach ($lang->testcase->groups as $key => $value)
|
||||
foreach($lang->testcase->groups as $key => $value)
|
||||
{
|
||||
if($key == '') continue;
|
||||
echo '<li' . ($key == $groupBy ? " class='active'" : '') . '>';
|
||||
@@ -154,74 +147,68 @@
|
||||
echo "</li>";
|
||||
}
|
||||
|
||||
echo '</ul></li>';
|
||||
echo '</ul></div>';
|
||||
}
|
||||
elseif($hasZeroPriv and $menuType == 'zerocase')
|
||||
{
|
||||
echo "<li id='zerocaseTab'>" . html::a($this->createLink('story', 'zeroCase', "productID=$productID"), $lang->story->zeroCase) . '</li>';
|
||||
echo html::a($this->createLink('story', 'zeroCase', "productID=$productID"), $lang->story->zeroCase, '', "class='btn btn-link' id='zerocaseTab'");
|
||||
}
|
||||
?>
|
||||
<?php endforeach;?>
|
||||
<?php
|
||||
if($this->methodName == 'browse') echo "<li id='bysearchTab'><a href='#'><i class='icon-search icon'></i> {$lang->testcase->bySearch}</a></li> ";
|
||||
if($this->methodName == 'browse') echo "<a id='bysearchTab' class='btn btn-link'><i class='icon-search icon'></i> {$lang->testcase->bySearch}</a>";
|
||||
?>
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<div class='btn-group'>
|
||||
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown'>
|
||||
<i class='icon-export'></i> <?php echo $lang->export ?>
|
||||
<span class='caret'></span>
|
||||
</button>
|
||||
<ul class='dropdown-menu' id='exportActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('testcase', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'export') ? $this->createLink('testcase', 'export', "productID=$productID&orderBy=$orderBy") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->export, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('testcase', 'exportTemplet') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'exportTemplet') ? $this->createLink('testcase', 'exportTemplet', "productID=$productID") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->exportTemplet, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class='btn-group'>
|
||||
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown' id='importAction'><i class='icon-import'></i> <?php echo $lang->import ?><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu' id='importActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('testcase', 'import') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'import') ? $this->createLink('testcase', 'import', "productID=$productID&branch=$branch") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->importFile, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('testcase', 'importFromLib') ? '' : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'importFromLib') ? $this->createLink('testcase', 'importFromLib', "productID=$productID&branch=$branch") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->importFromLib, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
$initModule = isset($moduleID) ? (int)$moduleID : 0;
|
||||
|
||||
if(common::hasPriv('testcase', 'batchCreate'))
|
||||
{
|
||||
$link = $this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule");
|
||||
echo html::a($link, "<i class='icon-plus'></i> " . $lang->testcase->batchCreate, '', "class='btn btn-secondary'");
|
||||
}
|
||||
|
||||
if(common::hasPriv('testcase', 'create'))
|
||||
{
|
||||
$link = $this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule");
|
||||
echo html::a($link, "<i class='icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-primary'");
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<div class='actions'>
|
||||
<div class='btn-group'>
|
||||
<div class='btn-group'>
|
||||
<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown'>
|
||||
<i class='icon-download-alt'></i> <?php echo $lang->export ?>
|
||||
<span class='caret'></span>
|
||||
</button>
|
||||
<ul class='dropdown-menu' id='exportActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('testcase', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'export') ? $this->createLink('testcase', 'export', "productID=$productID&orderBy=$orderBy") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->export, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('testcase', 'exportTemplet') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'exportTemplet') ? $this->createLink('testcase', 'exportTemplet', "productID=$productID") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->exportTemplet, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class='btn-group'>
|
||||
<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown' id='importAction'><i class='icon-upload-alt'></i> <?php echo $lang->import ?><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu' id='importActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('testcase', 'import') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'import') ? $this->createLink('testcase', 'import', "productID=$productID&branch=$branch") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->importFile, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('testcase', 'importFromLib') ? '' : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'importFromLib') ? $this->createLink('testcase', 'importFromLib', "productID=$productID&branch=$branch") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->importFromLib, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='btn-group'>
|
||||
<div class='btn-group' id='createActionMenu'>
|
||||
<?php
|
||||
$initModule = isset($moduleID) ? (int)$moduleID : 0;
|
||||
$misc = common::hasPriv('testcase', 'create') ? "class='btn btn-primary'" : "class='btn btn-primary disabled'";
|
||||
$link = common::hasPriv('testcase', 'create') ? $this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule") : '#';
|
||||
echo html::a($link, "<i class='icon-plus'></i>" . $lang->testcase->create, '', $misc);
|
||||
|
||||
$misc = common::hasPriv('testcase', 'batchCreate') ? '' : "disabled";
|
||||
$link = common::hasPriv('testcase', 'batchCreate') ? $this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule") : '#';
|
||||
?>
|
||||
<button type='button' class='btn btn-primary dropdown-toggle <?php echo $misc?>' data-toggle='dropdown'>
|
||||
<span class='caret'></span>
|
||||
</button>
|
||||
<ul class='dropdown-menu pull-right'>
|
||||
<?php echo "<li>" . html::a($link, $lang->testcase->batchCreate, '', "class='$misc'") . "</li>";?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
|
||||
</div>
|
||||
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
|
||||
<?php endif;?>
|
||||
|
||||
<?php
|
||||
|
||||
@@ -14,62 +14,84 @@
|
||||
<?php include '../../common/view/treetable.html.php';?>
|
||||
<?php include './caseheader.html.php';?>
|
||||
<?php js::set('browseType', $browseType);?>
|
||||
<table class='table table-fixed' id='treetable'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-50px'></th>
|
||||
<th><?php echo $lang->testcase->title;?></th>
|
||||
<th class='w-pri'> <?php echo $lang->priAB;?></th>
|
||||
<th class='w-80px'> <?php echo $lang->typeAB;?></th>
|
||||
<th class='w-80px'> <?php echo $lang->testtask->lastRunAccount;?></th>
|
||||
<th class='w-120px'><?php echo $lang->testtask->lastRunTime;?></th>
|
||||
<th class='w-80px'> <?php echo $lang->testtask->lastRunResult;?></th>
|
||||
<th class='w-80px'> <?php echo $lang->testcase->status;?></th>
|
||||
<th class='w-30px' title='<?php echo $lang->testcase->bugs?>'><?php echo $lang->testcase->bugsAB;?></th>
|
||||
<th class='w-30px' title='<?php echo $lang->testcase->results?>'><?php echo $lang->testcase->resultsAB;?></th>
|
||||
<th class='w-30px' title='<?php echo $lang->testcase->stepNumber?>'><?php echo $lang->testcase->stepNumberAB;?></th>
|
||||
<th class='w-60px'> <?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($cases as $groupKey => $groupTasks):?>
|
||||
<?php $groupClass = ($i % 2 == 0) ? 'even' : 'highlight-warning'; $i ++;?>
|
||||
<tr id='node-<?php echo $groupKey;?>' class='actie-disabled group-title'>
|
||||
<td class='text-right <?php echo $groupClass;?> text-left large strong group-name'><?php echo $groupKey;?></td>
|
||||
<td colspan='11' class='text-left'><?php if($groupByList) echo $groupByList[$groupKey];?></td>
|
||||
</tr>
|
||||
<?php foreach($groupTasks as $case):?>
|
||||
<tr id='<?php echo $case->id;?>' class='text-center child-of-node-<?php echo $groupKey;?>'>
|
||||
<td class='<?php echo $groupClass;?>'></td>
|
||||
<td class='text-left'> <?php echo $case->id . $lang->colon; if(!common::printLink('testcase', 'view', "case=$case->id", $case->title)) echo $case->title;?></td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case->pri, $case->pri)?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri);?></span></td>
|
||||
<td><?php echo $lang->case->typeList[$case->type];?></td>
|
||||
<td><?php echo $users[$case->lastRunner];?></td>
|
||||
<td><?php if(!helper::isZeroDate($case->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($case->lastRunDate));?></td>
|
||||
<td class='<?php echo $case->lastRunResult;?>'><?php if($case->lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?></td>
|
||||
<td class='<?php if(isset($run)) echo $run->status;?>'>
|
||||
<div class="main-table" data-ride="table" data-checkable="false" data-group="true">
|
||||
<table class="table table-grouped text-center">
|
||||
<thead>
|
||||
<tr class="divider">
|
||||
<th class="c-side text-left has-btn group-menu">
|
||||
<div class="table-group-btns">
|
||||
<button type="button" class="btn btn-block btn-link group-collapse-all"><?php echo $lang->project->treeLevel['root'];?> <i class="icon-caret-up"></i></button>
|
||||
<button type="button" class="btn btn-block btn-link group-expand-all"><?php echo $lang->project->treeLevel['all'];?> <i class="icon-caret-down"></i></button>
|
||||
</div>
|
||||
</th>
|
||||
<th class='c-id-sm'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-pri'> <?php echo $lang->priAB;?></th>
|
||||
<th><?php echo $lang->testcase->title;?></th>
|
||||
<th class='w-80px'> <?php echo $lang->typeAB;?></th>
|
||||
<th class='w-80px'> <?php echo $lang->testtask->lastRunAccount;?></th>
|
||||
<th class='w-120px'><?php echo $lang->testtask->lastRunTime;?></th>
|
||||
<th class='w-80px'> <?php echo $lang->testtask->lastRunResult;?></th>
|
||||
<th class='w-80px'> <?php echo $lang->testcase->status;?></th>
|
||||
<th class='w-30px' title='<?php echo $lang->testcase->bugs?>'><?php echo $lang->testcase->bugsAB;?></th>
|
||||
<th class='w-30px' title='<?php echo $lang->testcase->results?>'><?php echo $lang->testcase->resultsAB;?></th>
|
||||
<th class='w-30px' title='<?php echo $lang->testcase->stepNumber?>'><?php echo $lang->testcase->stepNumberAB;?></th>
|
||||
<th class='w-100px'> <?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $groupIndex = 0;?>
|
||||
<?php foreach($cases as $groupKey => $groupTasks):?>
|
||||
<?php
|
||||
if($case->needconfirm)
|
||||
{
|
||||
echo "(<span class='warning'>{$lang->story->changed}</span> ";
|
||||
echo html::a(helper::createLink('testcase', 'confirmStoryChange', "caseID=$case->id"), $lang->confirm, 'hiddenwin');
|
||||
echo ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $lang->testcase->statusList[$case->status];
|
||||
}
|
||||
$i = 0;
|
||||
$groupName = $groupByList ? $groupByList[$groupKey] : '';
|
||||
if(empty($groupName) and $groupBy == 'story') $groupName = $lang->task->noStory;
|
||||
if(empty($groupName) and $groupBy == 'assignedTo') $groupName = $lang->task->noAssigned;
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo (common::hasPriv('testcase', 'bugs') and $case->bugs) ? html::a(inlink('bugs', "runID=0&caseID={$case->id}"), $case->bugs, '', "class='iframe'") : $case->bugs;?></td>
|
||||
<td><?php echo (common::hasPriv('testtask', 'results') and $case->results) ? html::a($this->createLink('testtask', 'results', "runID=0&caseID={$case->id}"), $case->results, '', "class='iframe'") : $case->results;?></td>
|
||||
<td><?php echo $case->stepNumber;?></td>
|
||||
<td>
|
||||
<?php common::printIcon('testcase', 'edit', "caseID=$case->id", '', 'list');?>
|
||||
<?php common::printIcon('testcase', 'delete', "caseID=$case->id", '', 'list', '', 'hiddenwin');?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
<?php foreach($groupTasks as $case):?>
|
||||
<tr data-id='<?php echo $groupIndex;?>' <?php if($i == 0) echo "class='divider-top'";?>>
|
||||
<?php if($i == 0):?>
|
||||
<td rowspan='<?php echo count($groupTasks);?>' class='c-side text-left group-toggle text-top'>
|
||||
<?php echo html::a('###', "<i class='icon-caret-down'></i> $groupName", '', "class='text-primary'");?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<td class='c-id-sm'><?php echo $case->id;?></td>
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $case->pri;?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri);?></span></td>
|
||||
<td class='text-left'><?php if(!common::printLink('testcase', 'view', "case=$case->id", $case->title)) echo $case->title;?></td>
|
||||
<td><?php echo zget($lang->case->typeList, $case->type, '');?></td>
|
||||
<td><?php echo zget($users, $case->lastRunner);?></td>
|
||||
<td><?php if(!helper::isZeroDate($case->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($case->lastRunDate));?></td>
|
||||
<td class='<?php echo $case->lastRunResult;?>'><?php if($case->lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?></td>
|
||||
<td class='<?php if(isset($run)) echo $run->status;?>'>
|
||||
<?php
|
||||
if($case->needconfirm)
|
||||
{
|
||||
echo "(<span class='warning'>{$lang->story->changed}</span> ";
|
||||
echo html::a(helper::createLink('testcase', 'confirmStoryChange', "caseID=$case->id"), $lang->confirm, 'hiddenwin');
|
||||
echo ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $lang->testcase->statusList[$case->status];
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo (common::hasPriv('testcase', 'bugs') and $case->bugs) ? html::a(inlink('bugs', "runID=0&caseID={$case->id}"), $case->bugs, '', "class='iframe'") : $case->bugs;?></td>
|
||||
<td><?php echo (common::hasPriv('testtask', 'results') and $case->results) ? html::a($this->createLink('testtask', 'results', "runID=0&caseID={$case->id}"), $case->results, '', "class='iframe'") : $case->results;?></td>
|
||||
<td><?php echo $case->stepNumber;?></td>
|
||||
<td class='c-actions'>
|
||||
<?php common::printIcon('testcase', 'edit', "caseID=$case->id", '', 'list');?>
|
||||
<?php common::printIcon('testcase', 'delete', "caseID=$case->id", '', 'list', '', 'hiddenwin');?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++;?>
|
||||
<?php endforeach;?>
|
||||
<tr data-id='<?php echo $groupIndex;?>' class='group-toggle group-summary hidden divider-top'>
|
||||
<td class='c-side text-left'><?php echo html::a('###', "<i class='icon-caret-right'></i> $groupName");?></td>
|
||||
<td colspan='12'></td>
|
||||
</tr>
|
||||
<?php $groupIndex++;?>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -14,3 +14,5 @@
|
||||
.datatable-menu {display:none;}
|
||||
|
||||
.pl-5px{padding-left:5px;}
|
||||
|
||||
#pageActions {top: -60px;}
|
||||
|
||||
@@ -42,6 +42,7 @@ $lang->testsuite->confirmDelete = 'Do you want to delete this suite?';
|
||||
$lang->testsuite->libraryDelete = 'Do you want to delete this library?';
|
||||
$lang->testsuite->confirmUnlinkCase = 'Do you want to unlink this Case?';
|
||||
$lang->testsuite->noticeNone = 'You have not created a suite yet.';
|
||||
$lang->testsuite->noModule = '<div>You have no modules</div><div>Manage now</div>';
|
||||
|
||||
$lang->testsuite->lblCases = 'Cases';
|
||||
$lang->testsuite->lblUnlinkCase = 'Unlink Case';
|
||||
|
||||
@@ -42,6 +42,7 @@ $lang->testsuite->confirmDelete = '您确认要删除该套件吗?';
|
||||
$lang->testsuite->libraryDelete = '您确认要删除该用例库吗?';
|
||||
$lang->testsuite->confirmUnlinkCase = '您确认要移除该用例吗?';
|
||||
$lang->testsuite->noticeNone = '您还没有创建套件';
|
||||
$lang->testsuite->noModule = '<div>您现在还没有模块信息</div><div>请维护用例库模块</div>';
|
||||
|
||||
$lang->testsuite->lblCases = '用例列表';
|
||||
$lang->testsuite->lblUnlinkCase = '移除用例';
|
||||
|
||||
@@ -42,6 +42,7 @@ $lang->testsuite->confirmDelete = '您確認要刪除該套件嗎?';
|
||||
$lang->testsuite->libraryDelete = '您確認要刪除該用例庫嗎?';
|
||||
$lang->testsuite->confirmUnlinkCase = '您確認要移除該用例嗎?';
|
||||
$lang->testsuite->noticeNone = '您還沒有創建套件';
|
||||
$lang->testsuite->noModule = '<div>您現在還沒有模組信息</div><div>請維護用例庫模組</div>';
|
||||
|
||||
$lang->testsuite->lblCases = '用例列表';
|
||||
$lang->testsuite->lblUnlinkCase = '移除用例';
|
||||
|
||||
@@ -11,28 +11,30 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<div class='container mw-1400px'>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<strong><small class='text-muted'><?php echo html::icon($lang->icons['create']);?></small> <?php echo $lang->testsuite->createLib;?></strong>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class="center-block">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->testsuite->createLib;?></h2>
|
||||
</div>
|
||||
<form class="load-indicator main-form form-ajax" id="createForm" method="post" target='hiddenwin'>
|
||||
<table class="table table-form">
|
||||
<tr>
|
||||
<th><?php echo $lang->testsuite->name;?></th>
|
||||
<td><?php echo html::input('name', '', "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testsuite->desc;?></th>
|
||||
<td><?php echo html::textarea('desc', '', "rows=10 class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='text-center' colspan='2'>
|
||||
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
|
||||
<?php echo html::backButton('', '', 'btn btn-wide');?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<form class='form-condensed' method='post' target='hiddenwin' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->testsuite->name;?></th>
|
||||
<td colspan='2'><?php echo html::input('name', '', "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testsuite->desc;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('desc', '', "rows=10 class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td colspan='2'><?php echo html::submitButton() . html::backButton();?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->testsuite->name;?></th>
|
||||
<td colspan='2'><?php echo html::input('name', $suite->name, "class='form-control' autocomplete='off'");?></td>
|
||||
<td><?php echo html::input('name', $suite->name, "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testsuite->desc;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('desc', htmlspecialchars($suite->desc), "rows=10 class='form-control'");?></td>
|
||||
<td><?php echo html::textarea('desc', htmlspecialchars($suite->desc), "rows=10 class='form-control'");?></td>
|
||||
</tr>
|
||||
<?php if($suite->type != 'library'):?>
|
||||
<tr>
|
||||
@@ -34,7 +34,7 @@
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<td class='text-center' colspan='3'>
|
||||
<td class='text-center' colspan='2'>
|
||||
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
|
||||
<?php echo html::backButton('', '', 'btn btn-wide');?>
|
||||
</td>
|
||||
|
||||
@@ -25,7 +25,9 @@ js::set('flow', $this->config->global->flow);
|
||||
.outer.with-side #featurebar {background: none; border: none; line-height: 0; margin: 0; min-height: 0; padding: 0; }
|
||||
#querybox #searchform{border-bottom: 1px solid #ddd; margin-bottom: 20px;}
|
||||
</style>
|
||||
<div id='featurebar'>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
</div>
|
||||
<ul class='submenu hidden'>
|
||||
<?php echo "<li id='bysearchTab'><a href='#'><i class='icon-search icon'></i> {$lang->testcase->bySearch}</a></li> ";?>
|
||||
|
||||
@@ -67,202 +69,190 @@ js::set('flow', $this->config->global->flow);
|
||||
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div id='featurebar'>
|
||||
<div class='heading'>
|
||||
<?php echo "<span class='prefix'>" . html::icon($lang->icons['usecase']) . '</span><strong>' . $libName . '</strong>';?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div id="sidebarHeader">
|
||||
<?php echo html::commonButton('<i class="icon icon-caret-left"></i>', '', 'btn btn-icon btn-sm btn-info sidebar-toggle');?>
|
||||
<div class="title">
|
||||
<?php
|
||||
$this->app->loadLang('tree');
|
||||
echo isset($moduleID) ? $moduleName : $this->lang->tree->all;
|
||||
if(!empty($moduleID))
|
||||
{
|
||||
$removeLink = $browseType == 'bymodule' ? inlink('library', "libID=$libID&browseType=$browseType¶m=0&orderBy=$orderBy&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("libCaseModule")';
|
||||
echo html::a($removeLink, "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='nav'>
|
||||
<li>
|
||||
<div class='label-angle <?php echo !empty($moduleID) ? 'with-close' : ''?>'>
|
||||
<?php
|
||||
$this->app->loadLang('tree');
|
||||
echo isset($moduleID) ? $moduleName : $this->lang->tree->all;
|
||||
if(!empty($moduleID))
|
||||
{
|
||||
$removeLink = $browseType == 'bymodule' ? inlink('library', "libID=$libID&browseType=$browseType¶m=0&orderBy=$orderBy&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("libCaseModule")';
|
||||
echo html::a($removeLink, "<span class='close'>×</span>", '', "class='text-muted'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<?php $hasCasesPriv = common::hasPriv('testsuite', 'library'); ?>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php
|
||||
if($hasCasesPriv) echo "<li id='allTab'>" . html::a($this->inlink('library', "libID=$libID&browseType=all"), $lang->testcase->allCases) . "</li>";
|
||||
if($hasCasesPriv and ($config->testcase->needReview or !empty($config->testcase->forceReview))) echo "<li id='waitTab'>" . html::a($this->inlink('library', "libID=$libID&browseType=wait"), $lang->testcase->statusList['wait']) . "</li>";
|
||||
echo "<li id='bysearchTab'><a href='#'><i class='icon-search icon'></i> {$lang->testcase->bySearch}</a></li> ";
|
||||
if(common::hasPriv('testsuite', 'libView')) echo '<li>' . html::a(inlink('libView', "libID=$libID"), $lang->testsuite->view) . '</li>';
|
||||
if(common::hasPriv('testsuite', 'library'))
|
||||
{
|
||||
echo html::a($this->inlink('library', "libID=$libID&browseType=all"), "<span class='text'>{$lang->testcase->allCases}</span><span class='label label-light label-badge'>{$pager->recTotal}</span>", '', "id='allTab' class='btn btn-link'");
|
||||
if($config->testcase->needReview or !empty($config->testcase->forceReview)) echo html::a($this->inlink('library', "libID=$libID&browseType=wait"), "<span class='text'>" . $lang->testcase->statusList['wait'] . "</span><span class='label label-light label-badge'>{$pager->recTotal}</span>", '', "id='waitTab' class='btn btn-link'");
|
||||
}
|
||||
?>
|
||||
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->testcase->bySearch;?></a>
|
||||
</div>
|
||||
<div class='actions'>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<div class='btn-group'>
|
||||
<?php
|
||||
$link = common::hasPriv('testsuite', 'exportTemplet') ? $this->createLink('testsuite', 'exportTemplet', "libID=$libID") : '#';
|
||||
if(common::hasPriv('testsuite', 'exportTemplet')) echo html::a($link, "<i class='icon-download-alt'></i> " . $lang->testsuite->exportTemplet, '', "class='btn export'");
|
||||
|
||||
$link = common::hasPriv('testsuite', 'import') ? $this->createLink('testsuite', 'import', "libID=$libID") : '#';
|
||||
if(common::hasPriv('testsuite', 'import')) echo html::a($link, "<i class='icon-upload-alt'></i> " . $lang->testcase->importFile, '', "class='btn export'");
|
||||
?>
|
||||
</div>
|
||||
<div class='btn-group'>
|
||||
<div class='btn-group' id='createActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('testsuite', 'createCase') ? "class='btn btn-primary'" : "class='btn btn-primary disabled'";
|
||||
$link = common::hasPriv('testsuite', 'createCase') ? $this->createLink('testsuite', 'createCase', "libID=$libID&moduleID=" . (isset($moduleID) ? $moduleID : 0)) : '#';
|
||||
echo html::a($link, "<i class='icon-plus'></i>" . $lang->testcase->create, '', $misc);
|
||||
?>
|
||||
<button type='button' class='btn btn-primary dropdown-toggle' data-toggle='dropdown'>
|
||||
<span class='caret'></span>
|
||||
</button>
|
||||
<ul class='dropdown-menu pull-right'>
|
||||
<?php
|
||||
$misc = common::hasPriv('testsuite', 'batchCreateCase') ? '' : "class=disabled";
|
||||
$link = common::hasPriv('testsuite', 'batchCreateCase') ? $this->createLink('testsuite', 'batchCreateCase', "libID=$libID&moduleID=" . (isset($moduleID) ? $moduleID : 0)) : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->batchCreate, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php common::printLink('testsuite', 'exportTemplet', "libID=$libID", "<i class='icon-export'> </i>" . $lang->testsuite->exportTemplet, '', "class='btn btn-link export'");?>
|
||||
<?php common::printLink('testsuite', 'import', "libID=$libID", "<i class='icon-import'> </i>" . $lang->testcase->importFile, '', "class='btn btn-link export'");?>
|
||||
</div>
|
||||
<?php $params = "libID=$libID&moduleID=" . (isset($moduleID) ? $moduleID : 0);?>
|
||||
<?php common::printLink('testsuite', 'batchCreateCase', $params, "<i class='icon-plus'></i>" . $lang->testcase->batchCreate, '', "class='btn btn-secondary'");?>
|
||||
<?php common::printLink('testsuite', 'createCase', $params, "<i class='icon-plus'></i>" . $lang->testcase->create, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
|
||||
</div>
|
||||
<div id='pageActions'>
|
||||
<?php common::printLink('testsuite', 'libView', "libID=$libID", "<i class='icon icon-file-text'> </i>" . $lang->testsuite->view, '', "class='btn'");?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class='side' id='treebox'>
|
||||
<a class='side-handle' data-id='testcaseTree'><i class='icon-caret-left'></i></a>
|
||||
<div class='side-body'>
|
||||
<div class='panel panel-sm'>
|
||||
<div class='panel-heading nobr'><?php echo html::icon($lang->icons['product']);?> <strong><?php echo $libName;?></strong></div>
|
||||
<div class='panel-body'>
|
||||
<?php echo $moduleTree;?>
|
||||
<div class='text-right'>
|
||||
<?php common::printLink('tree', 'browse', "libID=$libID&view=caselib", $lang->tree->manage);?>
|
||||
</div>
|
||||
<div id="mainContent" class="main-row">
|
||||
<div class="side-col" id="sidebar">
|
||||
<div class="cell">
|
||||
<?php if(!$moduleTree):?>
|
||||
<hr class="space">
|
||||
<div class="text-center text-muted">
|
||||
<?php echo $lang->testsuite->noModule;?>
|
||||
</div>
|
||||
<hr class="space">
|
||||
<?php endif;?>
|
||||
<?php echo $moduleTree;?>
|
||||
<div class="text-center">
|
||||
<?php common::printLink('tree', 'browse', "libID=$libID&view=caselib", $lang->tree->manage, '', "class='btn btn-info btn-wide'");?>
|
||||
<hr class="space-sm" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='main'>
|
||||
<script>setTreeBox();</script>
|
||||
<form id='batchForm' method='post'>
|
||||
<?php $vars = "libID=$libID&browseType=$browseType¶m=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
|
||||
<table class='table table-condensed table-hover table-striped tablesorter table-fixed table-selectable' id='caseList'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-id {sorter:false}'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class='w-pri {sorter:false}'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='{sorter:false}'> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
|
||||
<th class='w-type {sorter:false}'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->typeAB);?></th>
|
||||
<th class='w-user {sorter:false}'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='w-100px {sorter:false}'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<th class='w-70px {sorter:false}'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php if($cases):?>
|
||||
<tbody>
|
||||
<?php foreach($cases as $case):?>
|
||||
<tr class='text-center'>
|
||||
<?php $viewLink = $this->createLink('testcase', 'view', "caseID=$case->id&version=$case->version");?>
|
||||
<td class='cell-id'>
|
||||
<input type='checkbox' name='caseIDList[]' value='<?php echo $case->id;?>'/>
|
||||
<?php echo html::a($viewLink, sprintf('%03d', $case->id));?>
|
||||
</td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case->pri, $case->pri)?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri);?></span></td>
|
||||
<td class='text-left' title="<?php echo $case->title?>">
|
||||
<?php if($modulePairs and $case->module)echo "<span title='{$lang->testcase->module}' class='label label-info label-badge'>{$modulePairs[$case->module]}</span> ";?>
|
||||
<?php echo html::a($viewLink, $case->title, null, "style='color: $case->color'");?>
|
||||
</td>
|
||||
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
|
||||
<td><?php echo $users[$case->openedBy];?></td>
|
||||
<td class='<?php if(isset($run)) echo $run->status;?> testcase-<?php echo $case->status?>'> <?php echo $lang->testcase->statusList[$case->status];?>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
if($config->testcase->needReview or !empty($config->testcase->forceReview)) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'list', 'review', '', 'iframe');
|
||||
common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list');
|
||||
if(common::hasPriv('testcase', 'delete'))
|
||||
{
|
||||
$deleteURL = $this->createLink('testcase', 'delete', "caseID=$case->id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"caseList\",confirmDelete)", '<i class="icon-remove"></i>', '', "title='{$lang->testcase->delete}' class='btn-icon'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<?php endif;?>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='7'>
|
||||
<?php if($cases):?>
|
||||
<div class='table-actions clearfix'>
|
||||
<?php echo html::selectButton();?>
|
||||
<div class='btn-group dropup'>
|
||||
<?php
|
||||
$class = "class='disabled'";
|
||||
|
||||
$actionLink = $this->createLink('testcase', 'batchEdit', "libID=$libID&branch=0&type=lib");
|
||||
$misc = common::hasPriv('testcase', 'batchEdit') ? "onclick=\"setFormAction('$actionLink')\"" : "disabled='disabled'";
|
||||
echo html::commonButton($lang->edit, $misc);
|
||||
?>
|
||||
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu' id='moreActionMenu'>
|
||||
<?php
|
||||
$actionLink = $this->createLink('testcase', 'batchDelete', "libID=$libID");
|
||||
$misc = common::hasPriv('testcase', 'batchDelete') ? "onclick=\"confirmBatchDelete('$actionLink')\"" : $class;
|
||||
echo "<li>" . html::a('#', $lang->delete, '', $misc) . "</li>";
|
||||
|
||||
if(common::hasPriv('testcase', 'batchReview') and ($config->testcase->needReview or !empty($config->testcase->forceReview)))
|
||||
{
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->testcase->review, '', "id='reviewItem'");
|
||||
echo "<ul class='dropdown-menu'>";
|
||||
unset($lang->testcase->reviewResultList['']);
|
||||
foreach($lang->testcase->reviewResultList as $key => $result)
|
||||
{
|
||||
$actionLink = $this->createLink('testcase', 'batchReview', "result=$key");
|
||||
echo '<li>' . html::a('#', $result, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"") . '</li>';
|
||||
}
|
||||
echo '</ul></li>';
|
||||
}
|
||||
elseif($config->testcase->needReview or !empty($config->testcase->forceReview))
|
||||
{
|
||||
echo '<li>' . html::a('javascript:;', $lang->testcase->review, '', $class) . '</li>';
|
||||
}
|
||||
|
||||
if(common::hasPriv('testcase', 'batchChangeModule'))
|
||||
{
|
||||
$withSearch = count($modules) > 8;
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->testcase->moduleAB, '', "id='moduleItem'");
|
||||
echo "<div class='dropdown-menu" . ($withSearch ? ' with-search' : '') . "'>";
|
||||
echo '<ul class="dropdown-list">';
|
||||
foreach($modules as $moduleId => $module)
|
||||
{
|
||||
$actionLink = $this->createLink('testcase', 'batchChangeModule', "moduleID=$moduleId");
|
||||
echo "<li class='option' data-key='$moduleID'>" . html::a('#', $module, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"") . "</li>";
|
||||
}
|
||||
echo '</ul>';
|
||||
if($withSearch) echo "<div class='menu-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></div>";
|
||||
echo '</div></li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<li>' . html::a('javascript:;', $lang->testcase->moduleAB, '', $class) . '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<div class="main-col">
|
||||
<div class="cell" id="queryBox"></div>
|
||||
<form class="main-table table-testcase" data-ride="table" method="post" id='testcaseForm'>
|
||||
<?php $canBatchEdit = common::hasPriv('testcase', 'batchEdit');?>
|
||||
<?php $canBatchDelete = common::hasPriv('testcase', 'batchDelete');?>
|
||||
<?php $canBatchReview = common::hasPriv('testcase', 'batchReview') and ($config->testcase->needReview or !empty($config->testcase->forceReview));?>
|
||||
<?php $canBatchChangeModule = common::hasPriv('testcase', 'batchChangeModule');?>
|
||||
<?php $canBatchAction = $canBatchEdit or $canBatchDelete or $canBatchReview or $canBatchChangeModule;?>
|
||||
<?php $vars = "libID=$libID&browseType=$browseType¶m=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
|
||||
<table class='table has-sort-head' id='caseList'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='c-id'>
|
||||
<?php if($canBatchAction):?>
|
||||
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
|
||||
<label></label>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif?>
|
||||
<div class='text-right'><?php $pager->show();?></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='c-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
|
||||
<th class='c-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->typeAB);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<th class='c-actions-2 text-center'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if($cases):?>
|
||||
<?php foreach($cases as $case):?>
|
||||
<tr>
|
||||
<td class='cell-id'>
|
||||
<?php if($canBatchAction):?>
|
||||
<?php echo html::checkbox('caseIDList', array($case->id => sprintf('%03d', $case->id)));?>
|
||||
<?php else:?>
|
||||
<?php echo sprintf('%03d', $case->id);?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td><span class='label-pri label-pri-<?php echo $case->pri;?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri);?></span></td>
|
||||
<td class='text-left' title="<?php echo $case->title?>">
|
||||
<?php if($modulePairs and $case->module) echo "<span title='{$lang->testcase->module}' class='label label-info label-badge'>{$modulePairs[$case->module]}</span> ";?>
|
||||
<?php $viewLink = $this->createLink('testcase', 'view', "caseID=$case->id&version=$case->version");?>
|
||||
<?php echo html::a($viewLink, $case->title, null, "style='color: $case->color'");?>
|
||||
</td>
|
||||
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
|
||||
<td><?php echo $users[$case->openedBy];?></td>
|
||||
<td class='<?php if(isset($run)) echo $run->status;?> testcase-<?php echo $case->status?>'> <?php echo $lang->testcase->statusList[$case->status];?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if($config->testcase->needReview or !empty($config->testcase->forceReview)) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'list', 'review', '', 'iframe');
|
||||
common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list');
|
||||
if(common::hasPriv('testcase', 'delete'))
|
||||
{
|
||||
$deleteURL = $this->createLink('testcase', 'delete', "caseID=$case->id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"caseList\",confirmDelete)", '<i class="icon icon-trash"></i>', '', "title='{$lang->testcase->delete}' class='btn'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php if($cases):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar">
|
||||
<div class='btn-group dropup'>
|
||||
<?php $actionLink = $this->createLink('testcase', 'batchEdit', "libID=$libID&branch=0&type=lib");?>
|
||||
<?php $misc = $canBatchEdit ? "onclick=\"setFormAction('$actionLink')\"" : "disabled='disabled'";?>
|
||||
<?php echo html::commonButton($lang->edit, $misc);?>
|
||||
<?php if($canBatchDelete or $canBatchReview or $canBatchChangeModule):?>
|
||||
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu' id='moreActionMenu'>
|
||||
<?php
|
||||
if($canBatchDelete)
|
||||
{
|
||||
$actionLink = $this->createLink('testcase', 'batchDelete', "libID=$libID");
|
||||
$misc = "onclick=\"confirmBatchDelete('$actionLink')\"";
|
||||
echo "<li>" . html::a('#', $lang->delete, '', $misc) . "</li>";
|
||||
}
|
||||
|
||||
if($canBatchReview)
|
||||
{
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->testcase->review, '', "id='reviewItem'");
|
||||
echo "<ul class='dropdown-menu'>";
|
||||
unset($lang->testcase->reviewResultList['']);
|
||||
foreach($lang->testcase->reviewResultList as $key => $result)
|
||||
{
|
||||
$actionLink = $this->createLink('testcase', 'batchReview', "result=$key");
|
||||
echo '<li>' . html::a('#', $result, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"") . '</li>';
|
||||
}
|
||||
echo '</ul></li>';
|
||||
}
|
||||
|
||||
if($canBatchChangeModule)
|
||||
{
|
||||
$withSearch = count($modules) > 8;
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->testcase->moduleAB, '', "id='moduleItem'");
|
||||
echo "<div class='dropdown-menu" . ($withSearch ? ' with-search' : '') . "'>";
|
||||
echo '<ul class="dropdown-list">';
|
||||
foreach($modules as $moduleId => $module)
|
||||
{
|
||||
$actionLink = $this->createLink('testcase', 'batchChangeModule', "moduleID=$moduleId");
|
||||
echo "<li class='option' data-key='$moduleID'>" . html::a('#', $module, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"") . "</li>";
|
||||
}
|
||||
echo '</ul>';
|
||||
if($withSearch) echo "<div class='menu-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></div>";
|
||||
echo '</div></li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php echo $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#module' + moduleID).addClass('active');
|
||||
$('#<?php echo $this->session->libBrowseType?>Tab').addClass('active');
|
||||
$('#<?php echo $this->session->libBrowseType?>Tab').addClass('btn-active-text');
|
||||
if(flow == 'onlyTest')
|
||||
{
|
||||
$('#modulemenu > .nav > li.right').before($('#featurebar .submenu').html());
|
||||
|
||||
@@ -11,44 +11,41 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<span class='prefix' title='CASELIB'> <strong><?php echo $lib->id;?></strong></span>
|
||||
<strong><?php echo $lib->name;?></strong>
|
||||
<?php if($lib->deleted):?>
|
||||
<span class='label label-danger'><?php echo $lang->testsuite->deleted;?></span>
|
||||
<?php endif; ?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php $browseLink = $this->session->caseList ? $this->session->caseList : $this->createLink('testsuite', 'library', "libID=$lib->id");?>
|
||||
<?php common::printBack($browseLink, 'btn btn-link');?>
|
||||
<div class='divider'></div>
|
||||
<div class='page-title'>
|
||||
<span class='label label-id'><?php echo $lib->id;?></span>
|
||||
<?php echo $lib->name;?>
|
||||
<?php if($lib->deleted):?>
|
||||
<span class='label label-danger'><?php echo $lang->testsuite->deleted;?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='actions'>
|
||||
</div>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='cell'>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo $lang->testsuite->legendDesc;?></div>
|
||||
<div class='detail-content article-content'><?php echo $lib->desc;?></div>
|
||||
</div>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainActions">
|
||||
<nav class="container"></nav>
|
||||
<div class="btn-toolbar">
|
||||
<?php
|
||||
$browseLink = $this->session->caseList ? $this->session->caseList : $this->createLink('testsuite', 'library', "libID=$lib->id");
|
||||
$actionLinks = '';
|
||||
common::printBack($browseLink);
|
||||
if(!$lib->deleted)
|
||||
{
|
||||
ob_start();
|
||||
|
||||
echo "<div class='btn-group'>";
|
||||
common::printIcon('testsuite', 'edit', "libID=$lib->id");
|
||||
common::printIcon('testsuite', 'delete', "libID=$lib->id", '', 'button', '', 'hiddenwin');
|
||||
echo '</div>';
|
||||
|
||||
echo "<div class='btn-group'>";
|
||||
common::printRPN($browseLink);
|
||||
echo '</div>';
|
||||
|
||||
$actionLinks = ob_get_contents();
|
||||
ob_end_clean();
|
||||
echo $actionLinks;
|
||||
echo "<div class='divider'></div>";
|
||||
common::printIcon('testsuite', 'edit', "libID=$lib->id");
|
||||
common::printIcon('testsuite', 'delete', "libID=$lib->id", '', 'button', '', 'hiddenwin');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='main'>
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->testsuite->legendDesc;?></legend>
|
||||
<div class='article-content'><?php echo $lib->desc;?></div>
|
||||
</fieldset>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
<div class='actions'><?php echo $actionLinks;?></div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
#todoBatchAddForm .control-time-begin + .chosen-container-single .chosen-single {border-radius: 2px 0 0 2px; border-right-width: 0; padding-right: 1px;}
|
||||
#todoBatchAddForm .control-time-begin + .chosen-container-active .chosen-single {border-right-width: 1px; padding-right: 0;}
|
||||
#todoBatchAddHeader [name="date"]:disabled {color: #ccc; text-decoration: line-through;}
|
||||
.main-header > .input-group {width: 220px;}
|
||||
.main-header > .input-group {width: 240px;}
|
||||
@@ -385,7 +385,7 @@ class tree extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetDropMenu($rootID, $module, $method, $extra)
|
||||
public function ajaxGetDropMenu($rootID, $module, $method, $extra = '')
|
||||
{
|
||||
$this->view->productID = $rootID;
|
||||
$this->view->module = $module;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 114 KiB |
Vendored
-150
File diff suppressed because one or more lines are too long
+191
-244
@@ -1,88 +1,35 @@
|
||||
/**
|
||||
* Create link.
|
||||
*
|
||||
* @param string $moduleName
|
||||
* @param string $methodName
|
||||
* @param string $vars
|
||||
* @param string $viewType
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function createLink(moduleName, methodName, vars, viewType, isOnlyBody)
|
||||
{
|
||||
if(!viewType) viewType = config.defaultView;
|
||||
if(!isOnlyBody) isOnlyBody = false;
|
||||
if(vars)
|
||||
{
|
||||
vars = vars.split('&');
|
||||
for(i = 0; i < vars.length; i ++)
|
||||
{
|
||||
splited = vars[i].split('=');
|
||||
// /**
|
||||
// * Bind Event for searchbox
|
||||
// *
|
||||
// */
|
||||
// function setSearchBox()
|
||||
// {
|
||||
// $('#searchTypeMenu a').click(function()
|
||||
// {
|
||||
// $('#searchTypeMenu li.selected').removeClass('selected');
|
||||
// var $this = $(this);
|
||||
// $this.closest('li').addClass('selected');
|
||||
// $("#searchType").val($this.data('value'));
|
||||
// $("#searchTypeName").text($this.text());
|
||||
// });
|
||||
// }
|
||||
|
||||
var newvars = new Array()
|
||||
newvars[0] = splited.shift();
|
||||
newvars[1] = splited.join('=');
|
||||
|
||||
vars[i] = newvars;
|
||||
}
|
||||
}
|
||||
if(config.requestType != 'GET')
|
||||
{
|
||||
if(config.requestType == 'PATH_INFO') link = config.webRoot + moduleName + config.requestFix + methodName;
|
||||
if(config.requestType == 'PATH_INFO2') link = config.webRoot + 'index.php/' + moduleName + config.requestFix + methodName;
|
||||
if(vars)
|
||||
{
|
||||
for(i = 0; i < vars.length; i ++) link += config.requestFix + vars[i][1];
|
||||
}
|
||||
link += '.' + viewType;
|
||||
}
|
||||
else
|
||||
{
|
||||
link = config.router + '?' + config.moduleVar + '=' + moduleName + '&' + config.methodVar + '=' + methodName + '&' + config.viewVar + '=' + viewType;
|
||||
if(vars) for(i = 0; i < vars.length; i ++) link += '&' + vars[i][0] + '=' + vars[i][1];
|
||||
}
|
||||
|
||||
/* if page has onlybody param then add this param in all link. the param hide header and footer. */
|
||||
if((typeof(config.onlybody) != 'undefined' && config.onlybody == 'yes') || isOnlyBody)
|
||||
{
|
||||
var onlybody = config.requestType != 'GET' ? "?onlybody=yes" : '&onlybody=yes';
|
||||
link = link + onlybody;
|
||||
}
|
||||
return link;
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind Event for searchbox
|
||||
*
|
||||
*/
|
||||
function setSearchBox()
|
||||
{
|
||||
$('#searchTypeMenu a').click(function()
|
||||
{
|
||||
$('#searchTypeMenu li.selected').removeClass('selected');
|
||||
var $this = $(this);
|
||||
$this.closest('li').addClass('selected');
|
||||
$("#searchType").val($this.data('value'));
|
||||
$("#searchTypeName").text($this.text());
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Go to the view page of one object.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function shortcut()
|
||||
{
|
||||
objectType = $('#searchType').attr('value');
|
||||
objectValue = $("input#searchInput").attr('value');
|
||||
if(objectType && objectValue)
|
||||
{
|
||||
method = objectType == 'testsuite' ? 'library' : 'view';
|
||||
location.href=createLink(objectType, method, "id=" + objectValue);
|
||||
}
|
||||
}
|
||||
// /**
|
||||
// * Go to the view page of one object.
|
||||
// *
|
||||
// * @access public
|
||||
// * @return void
|
||||
// */
|
||||
// function shortcut()
|
||||
// {
|
||||
// objectType = $('#searchType').attr('value');
|
||||
// objectValue = $("input#searchInput").attr('value');
|
||||
// if(objectType && objectValue)
|
||||
// {
|
||||
// method = objectType == 'testsuite' ? 'library' : 'view';
|
||||
// location.href=createLink(objectType, method, "id=" + objectValue);
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* Show search drop menu.
|
||||
@@ -203,30 +150,30 @@ function setRequiredFields()
|
||||
$('.required').closest('td,th').next().css('padding-left', '15px');
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the help links of forum's items.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setHelpLink()
|
||||
{
|
||||
if(!$.cookie('help')) $.cookie('help', 'off', {expires:config.cookieLife, path:config.webRoot});
|
||||
className = $.cookie('help') == 'off' ? 'hidden' : '';
|
||||
// /**
|
||||
// * Set the help links of forum's items.
|
||||
// *
|
||||
// * @access public
|
||||
// * @return void
|
||||
// */
|
||||
// function setHelpLink()
|
||||
// {
|
||||
// if(!$.cookie('help')) $.cookie('help', 'off', {expires:config.cookieLife, path:config.webRoot});
|
||||
// className = $.cookie('help') == 'off' ? 'hidden' : '';
|
||||
|
||||
$('form input[id], form select[id], form textarea[id]').each(function()
|
||||
{
|
||||
if($(this).attr('type') == 'hidden' || $(this).attr('type') == 'file') return;
|
||||
currentFieldName = $(this).attr('name') ? $(this).attr('name') : $(this).attr('id');
|
||||
if(currentFieldName == 'submit' || currentFieldName == 'reset') return;
|
||||
if(currentFieldName.indexOf('[') > 0) currentFieldName = currentFieldName.substr(0, currentFieldName.indexOf('['));
|
||||
currentFieldName = currentFieldName.toLowerCase();
|
||||
helpLink = createLink('help', 'field', 'module=' + config.currentModule + '&method=' + config.currentMethod + '&field=' + currentFieldName);
|
||||
$(this).after(' <a class="helplink ' + className + '" href=' + helpLink + ' target="_blank">?</a> ');
|
||||
});
|
||||
// $('form input[id], form select[id], form textarea[id]').each(function()
|
||||
// {
|
||||
// if($(this).attr('type') == 'hidden' || $(this).attr('type') == 'file') return;
|
||||
// currentFieldName = $(this).attr('name') ? $(this).attr('name') : $(this).attr('id');
|
||||
// if(currentFieldName == 'submit' || currentFieldName == 'reset') return;
|
||||
// if(currentFieldName.indexOf('[') > 0) currentFieldName = currentFieldName.substr(0, currentFieldName.indexOf('['));
|
||||
// currentFieldName = currentFieldName.toLowerCase();
|
||||
// helpLink = createLink('help', 'field', 'module=' + config.currentModule + '&method=' + config.currentMethod + '&field=' + currentFieldName);
|
||||
// $(this).after(' <a class="helplink ' + className + '" href=' + helpLink + ' target="_blank">?</a> ');
|
||||
// });
|
||||
|
||||
$("a.helplink").modalTrigger({width:600, type:'iframe'});
|
||||
}
|
||||
// $("a.helplink").modalTrigger({width:600, type:'iframe'});
|
||||
// }
|
||||
|
||||
/**
|
||||
* Set paceholder.
|
||||
@@ -367,19 +314,19 @@ function removeAnchor(url)
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the window size and save to cookie.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function saveWindowSize()
|
||||
{
|
||||
width = $(window).width();
|
||||
height = $(window).height();
|
||||
$.cookie('windowWidth', width)
|
||||
$.cookie('windowHeight', height)
|
||||
}
|
||||
// /**
|
||||
// * Get the window size and save to cookie.
|
||||
// *
|
||||
// * @access public
|
||||
// * @return void
|
||||
// */
|
||||
// function saveWindowSize()
|
||||
// {
|
||||
// width = $(window).width();
|
||||
// height = $(window).height();
|
||||
// $.cookie('windowWidth', width)
|
||||
// $.cookie('windowHeight', height)
|
||||
// }
|
||||
|
||||
/**
|
||||
* Adjust Outer box's width and height.
|
||||
@@ -678,39 +625,39 @@ function checkTable($table)
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function toggleSearch()
|
||||
{
|
||||
$("#bysearchTab").toggle
|
||||
(
|
||||
function()
|
||||
{
|
||||
if(typeof(browseType) == 'undefined' || browseType == 'bymodule')
|
||||
{
|
||||
$('#bymoduleTab').removeClass('btn-active-text');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#' + browseType + 'Tab').removeClass('btn-active-text');
|
||||
}
|
||||
$('#bysearchTab').addClass('btn-active-text');
|
||||
ajaxGetSearchForm();
|
||||
$('#queryBox').addClass('show');
|
||||
},
|
||||
function()
|
||||
{
|
||||
if(typeof(browseType) == 'undefined' || browseType == 'bymodule')
|
||||
{
|
||||
$('#bymoduleTab').addClass('btn-active-text');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#' + browseType +'Tab').addClass('btn-active-text');
|
||||
}
|
||||
$('#bysearchTab').removeClass('btn-active-text');
|
||||
$('#queryBox').removeClass('show');
|
||||
}
|
||||
);
|
||||
}
|
||||
// function toggleSearch()
|
||||
// {
|
||||
// $("#bysearchTab").toggle
|
||||
// (
|
||||
// function()
|
||||
// {
|
||||
// if(typeof(browseType) == 'undefined' || browseType == 'bymodule')
|
||||
// {
|
||||
// $('#bymoduleTab').removeClass('btn-active-text');
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// $('#' + browseType + 'Tab').removeClass('btn-active-text');
|
||||
// }
|
||||
// $('#bysearchTab').addClass('btn-active-text');
|
||||
// ajaxGetSearchForm();
|
||||
// $('#queryBox').addClass('show');
|
||||
// },
|
||||
// function()
|
||||
// {
|
||||
// if(typeof(browseType) == 'undefined' || browseType == 'bymodule')
|
||||
// {
|
||||
// $('#bymoduleTab').addClass('btn-active-text');
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// $('#' + browseType +'Tab').addClass('btn-active-text');
|
||||
// }
|
||||
// $('#bysearchTab').removeClass('btn-active-text');
|
||||
// $('#queryBox').removeClass('show');
|
||||
// }
|
||||
// );
|
||||
// }
|
||||
|
||||
/**
|
||||
* Ajax get search form
|
||||
@@ -1400,47 +1347,47 @@ function removeCookieByKey(cookieKey)
|
||||
location.href = location.href;
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind hotkey event
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function initHotKey()
|
||||
{
|
||||
$(document).bind('keydown', 'Ctrl+g', function(e)
|
||||
{
|
||||
/* CTRL+g, auto focus on the search box. */
|
||||
$('#searchQuery').val('').focus();
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}).bind('keydown', 'Alt+up', function()
|
||||
{
|
||||
/* Alt+up, go back to the previous page. */
|
||||
var backLink = $('#back').attr('href');
|
||||
if(backLink) location.href = backLink;
|
||||
}).bind('keydown', 'left', function()
|
||||
{
|
||||
/* left, go to pre object. */
|
||||
var preLink = $('#pre').attr('href');
|
||||
if(!$.cookie('ajax_lastNext'))
|
||||
{
|
||||
$.cookie('ajax_lastNext', 'on', {expires: config.cookieLife, path: config.webRoot});
|
||||
$.get(createLink('score', 'ajax', "method=lastNext"));
|
||||
}
|
||||
if(preLink) location.href = preLink;
|
||||
}).bind('keydown', 'right', function()
|
||||
{
|
||||
/* right, go to next object. */
|
||||
var nextLink = $('#next').attr('href');
|
||||
if(!$.cookie('ajax_lastNext'))
|
||||
{
|
||||
$.cookie('ajax_lastNext', 'on', {expires: config.cookieLife, path: config.webRoot});
|
||||
$.get(createLink('score', 'ajax', "method=lastNext"));
|
||||
}
|
||||
if(nextLink) location.href = nextLink;
|
||||
});
|
||||
}
|
||||
// /**
|
||||
// * Bind hotkey event
|
||||
// * @access public
|
||||
// * @return void
|
||||
// */
|
||||
// function initHotKey()
|
||||
// {
|
||||
// $(document).bind('keydown.ctrl_g', function(e)
|
||||
// {
|
||||
// /* CTRL+g, auto focus on the search box. */
|
||||
// $('#searchQuery').val('').focus();
|
||||
// e.stopPropagation();
|
||||
// e.preventDefault();
|
||||
// return false;
|
||||
// }).bind('keydown.Alt+up', function()
|
||||
// {
|
||||
// /* Alt+up, go back to the previous page. */
|
||||
// var backLink = $('#back').attr('href');
|
||||
// if(backLink) location.href = backLink;
|
||||
// }).bind('keydown.left', function()
|
||||
// {
|
||||
// /* left, go to pre object. */
|
||||
// var preLink = $('#pre').attr('href');
|
||||
// if(!$.cookie('ajax_lastNext'))
|
||||
// {
|
||||
// $.cookie('ajax_lastNext', 'on', {expires: config.cookieLife, path: config.webRoot});
|
||||
// $.get(createLink('score', 'ajax', "method=lastNext"));
|
||||
// }
|
||||
// if(preLink) location.href = preLink;
|
||||
// }).bind('keydown.right', function()
|
||||
// {
|
||||
// /* right, go to next object. */
|
||||
// var nextLink = $('#next').attr('href');
|
||||
// if(!$.cookie('ajax_lastNext'))
|
||||
// {
|
||||
// $.cookie('ajax_lastNext', 'on', {expires: config.cookieLife, path: config.webRoot});
|
||||
// $.get(createLink('score', 'ajax', "method=lastNext"));
|
||||
// }
|
||||
// if(nextLink) location.href = nextLink;
|
||||
// });
|
||||
// }
|
||||
|
||||
/**
|
||||
* Init help link for user to open zentao help website in iframe
|
||||
@@ -1592,50 +1539,50 @@ function revertModuleCookie()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Focus move up or down for input.
|
||||
*
|
||||
* @param type up|down
|
||||
*/
|
||||
function inputFocusJump(type){
|
||||
var hasFocus = $('input').is(':focus');
|
||||
if(hasFocus)
|
||||
{
|
||||
var title = $("input:focus").attr('name').replace(/\[\d]/g, '');
|
||||
var $input = $(":input[name^=" + title + "]:text:not(:disabled):not([name*='%'])");
|
||||
var num = $input.length;
|
||||
var index = parseInt($("input:focus").attr('name').replace(/[^0-9]/g, ''));
|
||||
var nextIndex = type == 'down' ? index + 1 : index - 1;
|
||||
// /**
|
||||
// * Focus move up or down for input.
|
||||
// *
|
||||
// * @param type up|down
|
||||
// */
|
||||
// function inputFocusJump(type){
|
||||
// var hasFocus = $('input').is(':focus');
|
||||
// if(hasFocus)
|
||||
// {
|
||||
// var title = $("input:focus").attr('name').replace(/\[\d]/g, '');
|
||||
// var $input = $(":input[name^=" + title + "]:text:not(:disabled):not([name*='%'])");
|
||||
// var num = $input.length;
|
||||
// var index = parseInt($("input:focus").attr('name').replace(/[^0-9]/g, ''));
|
||||
// var nextIndex = type == 'down' ? index + 1 : index - 1;
|
||||
|
||||
if(nextIndex < num && nextIndex >= 0)
|
||||
{
|
||||
$input[nextIndex].focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
// if(nextIndex < num && nextIndex >= 0)
|
||||
// {
|
||||
// $input[nextIndex].focus();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* Focus move up or down for select.
|
||||
*
|
||||
* @param type
|
||||
*/
|
||||
function selectFocusJump(type)
|
||||
{
|
||||
var hasFocus = $('select').is(':focus');
|
||||
if(hasFocus)
|
||||
{
|
||||
var title = $("select:focus").attr('name').replace(/\[\d]/g, '');
|
||||
var $select = $("select[name^=" + title + "]:not([name*='%'])");
|
||||
var num = $select.length;
|
||||
var index = parseInt($("select:focus").attr('name').replace(/[^0-9]/g, ''));
|
||||
var nextIndex = type == 'down' ? index + 1 : index - 1;
|
||||
// /**
|
||||
// * Focus move up or down for select.
|
||||
// *
|
||||
// * @param type
|
||||
// */
|
||||
// function selectFocusJump(type)
|
||||
// {
|
||||
// var hasFocus = $('select').is(':focus');
|
||||
// if(hasFocus)
|
||||
// {
|
||||
// var title = $("select:focus").attr('name').replace(/\[\d]/g, '');
|
||||
// var $select = $("select[name^=" + title + "]:not([name*='%'])");
|
||||
// var num = $select.length;
|
||||
// var index = parseInt($("select:focus").attr('name').replace(/[^0-9]/g, ''));
|
||||
// var nextIndex = type == 'down' ? index + 1 : index - 1;
|
||||
|
||||
if(nextIndex < num && nextIndex >= 0)
|
||||
{
|
||||
$select[nextIndex].focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
// if(nextIndex < num && nextIndex >= 0)
|
||||
// {
|
||||
// $select[nextIndex].focus();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
function adjustNoticePosition()
|
||||
{
|
||||
@@ -1671,31 +1618,31 @@ needPing = true;
|
||||
/* When body's ready, execute these. */
|
||||
$(document).ready(function()
|
||||
{
|
||||
setTableBehavior();
|
||||
setForm();
|
||||
saveWindowSize();
|
||||
setSearchBox();
|
||||
setOuterBox();
|
||||
// setTableBehavior();
|
||||
// setForm();
|
||||
// saveWindowSize();
|
||||
// setSearchBox();
|
||||
// setOuterBox();
|
||||
|
||||
//setRequiredFields();
|
||||
setPlaceholder();
|
||||
|
||||
setModalTriggerLink();
|
||||
|
||||
checkTable();
|
||||
toggleSearch();
|
||||
// checkTable();
|
||||
// toggleSearch();
|
||||
|
||||
fixStyle();
|
||||
// fixStyle();
|
||||
|
||||
// Init tree menu
|
||||
$('.tree').tree({initialState: 'preserve'});
|
||||
|
||||
$(window).resize(saveWindowSize); // When window resized, call it again.
|
||||
// $(window).resize(saveWindowSize); // When window resized, call it again.
|
||||
|
||||
if(needPing) setTimeout('setPing()', 1000 * 60 * 10); // After 10 minutes, begin ping.
|
||||
|
||||
initPrioritySelector();
|
||||
initHotKey();
|
||||
// initHotKey();
|
||||
initHelpLink();
|
||||
checkTutorial();
|
||||
revertModuleCookie();
|
||||
|
||||
+14
-3
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user