Merge branch 'master' of git@github.com:easysoft/zentaopms

This commit is contained in:
wyd621
2013-08-08 15:44:07 +08:00
34 changed files with 310 additions and 218 deletions
+39 -16
View File
@@ -61,7 +61,7 @@ class bug extends control
* @access public
* @return void
*/
public function browse($productID = 0, $browseType = 'byModule', $param = 0, $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function browse($productID = 0, $browseType = 'all', $param = 0, $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Set browseType, productID, moduleID and queryID. */
$browseType = strtolower($browseType);
@@ -148,21 +148,20 @@ class bug extends control
$position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
$position[] = $this->lang->bug->common;
$this->view->title = $title;
$this->view->position = $position;
$this->view->productID = $productID;
$this->view->productName = $this->products[$productID];
$this->view->moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'bug', $startModuleID = 0, array('treeModel', 'createBugLink'));
$this->view->browseType = $browseType;
$this->view->bugs = $bugs;
$this->view->users = $users;
$this->view->pager = $pager;
$this->view->param = $param;
$this->view->orderBy = $orderBy;
$this->view->moduleID = $moduleID;
$this->view->customed = $customed;
$this->view->customFields= explode(',', str_replace(' ', '', trim($customFields)));
$this->view->treeClass = $browseType == 'bymodule' ? '' : 'hidden';
$this->view->title = $title;
$this->view->position = $position;
$this->view->productID = $productID;
$this->view->productName = $this->products[$productID];
$this->view->moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'bug', $startModuleID = 0, array('treeModel', 'createBugLink'));
$this->view->browseType = $browseType;
$this->view->bugs = $bugs;
$this->view->users = $users;
$this->view->pager = $pager;
$this->view->param = $param;
$this->view->orderBy = $orderBy;
$this->view->moduleID = $moduleID;
$this->view->customed = $customed;
$this->view->customFields = explode(',', str_replace(' ', '', trim($customFields)));
$this->display();
}
@@ -668,6 +667,25 @@ class bug extends control
$this->view->actions = $this->action->getList('bug', $bugID);
$this->display();
}
/**
* Batch confirm.
*
* @access public
* @return void
*/
public function batchConfirm()
{
$bugIDList = $this->post->bugIDList ? $this->post->bugIDList : die(js::locate($this->session->bugList, 'parent'));
$this->bug->batchConfirm($bugIDList);
if(dao::isError()) die(js::error(dao::getError()));
foreach($bugIDList as $bugID)
{
$actionID = $this->action->create('bug', $bugID, 'bugConfirmed');
$this->sendmail($bugID, $actionID);
}
die(js::locate($this->session->bugList, 'parent'));
}
/**
* Resolve a bug.
@@ -711,6 +729,11 @@ class bug extends control
$this->display();
}
public function batchResolve()
{
}
/**
* Activate a bug.
*
-10
View File
@@ -1,13 +1,3 @@
/* Browse by module. */
function browseByModule(active)
{
$('#treebox').removeClass('hidden');
$('.divider').removeClass('hidden');
$('#bymoduleTab').addClass('active');
$('#querybox').addClass('hidden');
$('#' + active + 'Tab').removeClass('active');
}
$(document).ready(function()
{
$("a.customFields").colorbox({width:540, height:340, iframe:true, transition:'none'});
+2
View File
@@ -73,12 +73,14 @@ $lang->bug->index = 'Index';
$lang->bug->create = 'Create Bug';
$lang->bug->batchCreate = 'Batch create';
$lang->bug->confirmBug = 'Confirm Bug';
$lang->bug->batchConfirm = 'Batch confirm';
$lang->bug->edit = 'Edit Bug';
$lang->bug->batchEdit = 'Batch edit';
$lang->bug->assignTo = 'Assign';
$lang->bug->browse = 'Browse Bug';
$lang->bug->view = 'Bug Info';
$lang->bug->resolve = 'Resolve';
$lang->bug->barchResolve = 'batchResolve';
$lang->bug->close = 'Close';
$lang->bug->activate = 'Activate';
$lang->bug->reportChart = 'Report';
+3 -1
View File
@@ -73,16 +73,18 @@ $lang->bug->index = '首页';
$lang->bug->create = '提Bug';
$lang->bug->batchCreate = '批量添加';
$lang->bug->confirmBug = '确认';
$lang->bug->batchConfirm = '批量确认';
$lang->bug->edit = '编辑';
$lang->bug->batchEdit = '批量编辑';
$lang->bug->assignTo = '指派';
$lang->bug->browse = 'Bug列表';
$lang->bug->view = 'Bug详情';
$lang->bug->resolve = '解决';
$lang->bug->batchResolve = '批量解决';
$lang->bug->close = '关闭';
$lang->bug->activate = '激活';
$lang->bug->reportChart = '报表统计';
$lang->bug->export = '导出';
$lang->bug->export = '导出数据';
$lang->bug->delete = '删除';
$lang->bug->saveTemplate = '保存模板';
$lang->bug->deleteTemplate = '删除模板';
+25
View File
@@ -393,6 +393,31 @@ class bugModel extends model
$this->dao->update(TABLE_BUG)->data($bug)->where('id')->eq($bugID)->exec();
}
/**
* Batch confirm bugs.
*
* @param array $bugIDList
* @access public
* @return void
*/
public function batchConfirm($bugIDList)
{
$now = helper::now();
foreach($bugIDList as $bugID)
{
$oldBug = $this->getById($bugID);
if($oldBug->confirmed) continue;
$bug = new stdclass();
$bug->assignedTo = $this->app->user->account;
$bug->lastEditedBy = $this->app->user->account;
$bug->lastEditedDate = $now;
$bug->confirmed = 1;
$this->dao->update(TABLE_BUG)->data($bug)->where('id')->eq($bugID)->exec();
}
}
/**
* Resolve a bug.
*
+64 -12
View File
@@ -14,6 +14,7 @@
include '../../common/view/header.html.php';
include '../../common/view/treeview.html.php';
include '../../common/view/colorize.html.php';
include '../../common/view/dropmenu.html.php';
js::set('browseType', $browseType);
js::set('moduleID', $moduleID);
js::set('customed', $customed);
@@ -22,7 +23,7 @@ js::set('customed', $customed);
<div id='featurebar'>
<div class='f-left'>
<?php
echo "<span id='bymoduleTab' onclick=\"browseByModule('$browseType')\"><a href='#'>" . $lang->bug->moduleBugs . "</a></span> ";
echo "<span id='allTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=all&param=0&orderBy=$orderBy&recTotal=0&recPerPage=200"), $lang->bug->allBugs) . "</span>";
echo "<span id='assigntomeTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=assignToMe&param=0"), $lang->bug->assignToMe) . "</span>";
echo "<span id='openedbymeTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=openedByMe&param=0"), $lang->bug->openedByMe) . "</span>";
echo "<span id='resolvedbymeTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=resolvedByMe&param=0"), $lang->bug->resolvedByMe) . "</span>";
@@ -31,21 +32,35 @@ js::set('customed', $customed);
echo "<span id='unclosedTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=unclosed&param=0"), $lang->bug->unclosed) . "</span>";
echo "<span id='longlifebugsTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=longLifeBugs&param=0"), $lang->bug->longLifeBugs) . "</span>";
echo "<span id='postponedbugsTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=postponedBugs&param=0"), $lang->bug->postponedBugs) . "</span>";
echo "<span id='allTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=all&param=0&orderBy=$orderBy&recTotal=0&recPerPage=200"), $lang->bug->allBugs) . "</span>";
echo "<span id='needconfirmTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=needconfirm&param=0"), $lang->bug->needConfirm) . "</span>";
echo "<span id='bysearchTab'><a href='#'><span class='icon-search'></span>{$lang->bug->byQuery}</a></span> ";
?>
</div>
<div class='f-right'>
<?php
echo '<span class="link-button dropButton">';
echo html::a("#", "&nbsp;", '', "id='exportAction' class='icon-green-common-export' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->export}'");
echo html::a("#", $lang->export, '', "id='exportAction' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->export}'");
echo '</span>';
common::printIcon('bug', 'report', "productID=$productID&browseType=$browseType&moduleID=$moduleID");
if($browseType != 'needconfirm') common::printIcon('bug', 'export', "productID=$productID&orderBy=$orderBy");
common::printIcon('bug', 'customFields');
common::printIcon('bug', 'batchCreate', "productID=$productID&projectID=0&moduleID=$moduleID");
common::printIcon('bug', 'create', "productID=$productID&extra=moduleID=$moduleID");
?>
</div>
</div>
<div id='exportActionMenu' class='listMenu hidden'>
<ul>
<?php
$misc = common::hasPriv('bug', 'export') ? "class='export'" : "class=disabled";
$link = common::hasPriv('bug', 'export') ? $this->createLink('bug', 'export', "productID=$productID&orderBy=$orderBy") : '#';
echo "<li>" . html::a($link, $lang->bug->export, '', $misc) . "</li>";
?>
</ul>
</div>
<div id='querybox' class='<?php if($browseType !='bysearch') echo 'hidden';?>'></div>
<?php
@@ -58,10 +73,10 @@ js::set('customed', $customed);
?>
<div class='treeSlider'><span>&nbsp;</span></div>
<form method='post' action='<?php echo inLink('batchEdit', "productID=$productID");?>'>
<form method='post'>
<table class='cont-lt1'>
<tr valign='top'>
<td class='side <?php echo $treeClass;?>' id='treebox'>
<td class='side' id='treebox'>
<div class='box-title'><?php echo $productName;?></div>
<div class='box-content'>
<?php echo $moduleTree;?>
@@ -71,7 +86,7 @@ js::set('customed', $customed);
</div>
</div>
</td>
<td class='divider <?php echo $treeClass;?>'></td>
<td class='divider'></td>
<td>
<table class='table-1 fixed colored tablesorter datatable' id='bugList'>
<?php $vars = "productID=$productID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
@@ -110,14 +125,11 @@ js::set('customed', $customed);
</tr>
</thead>
<tbody>
<?php $canBatchEdit = common::hasPriv('bug', 'batchEdit');?>
<?php foreach($bugs as $bug):?>
<?php $bugLink = inlink('view', "bugID=$bug->id");?>
<tr class='a-center'>
<td class='<?php echo $bug->status;?>' style="font-weight:bold">
<?php if($canBatchEdit):?>
<input type='checkbox' name='bugIDList[]' value='<?php echo $bug->id;?>'/>
<?php endif;?>
<?php echo html::a($bugLink, sprintf('%03d', $bug->id));?>
</td>
<td><span class='<?php echo 'severity' . $bug->severity;?>'><?php echo $bug->severity;?></span></td>
@@ -170,11 +182,19 @@ js::set('customed', $customed);
if($browseType == 'needconfirm') $columns = $this->cookie->windowWidth >= $this->config->wideSize ? 7 : 6;
?>
<td colspan='<?php echo $columns;?>'>
<?php if(!empty($bugs) and $canBatchEdit):?>
<?php if(!empty($bugs)):?>
<div class='f-left'>
<?php
echo html::selectAll() . html::selectReverse();
echo html::submitButton($lang->edit);
echo "<div class='groupButton'>";
echo html::selectAll() . html::selectReverse();
echo "</div>";
$actionLink = $this->createLink('bug', 'batchEdit', "productID=$productID");
$misc = common::hasPriv('bug', 'batchEdit') ? "onclick=setFormAction('$actionLink')" : "disabled='disabled'";
echo "<div class='groupButton dropButton'>";
echo html::commonButton($lang->edit, $misc);
echo "<button id='moreAction' type='button' onclick=\"toggleSubMenu(this.id, 'top', 0)\"><span class='caret'></span></button>";
echo "</div>";
?>
</div>
<?php endif?>
@@ -187,4 +207,36 @@ js::set('customed', $customed);
</tr>
</table>
</form>
<div id='moreActionMenu' class='listMenu hidden'>
<ul>
<?php
$class = "class='disabled'";
$actionLink = $this->createLink('bug', 'batchConfirm');
$misc = common::hasPriv('bug', 'batchConfirm') ? "onclick=setFormAction('$actionLink','hiddenwin')" : "class='disabled'";
echo "<li>" . html::a('#', $lang->bug->confirmBug, '', $misc) . "</li>";
$misc = common::hasPriv('bug', 'batchResolve') ? "onmouseover='toggleSubMenu(this.id)' onmouseout='toggleSubMenu(this.id)' id='resolveItem'" : $class;
echo "<li>" . html::a('#', $lang->bug->resolve, '', $misc) . "</li>";
?>
</ul>
</div>
<div id='resolveItemMenu' class='hidden listMenu'>
<ul>
<?php
unset($lang->bug->resolutionList['']);
unset($lang->bug->resolutionList['duplicate']);
foreach($lang->bug->resolutionList as $key => $resolution)
{
$actionLink = $this->createLink('story', 'batchResolve', "resolution=$key");
echo "<li>";
echo html::a('#', $resolution, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"");
echo "</li>";
}
?>
</ul>
</div>
<?php include '../../common/view/footer.html.php';?>
+3 -4
View File
@@ -132,14 +132,14 @@ $(function(){
<?php $this->action->printAction($action);?>
<?php if(!empty($action->history)) echo "<span id='switchButton$i' class='hand change-show' onclick=switchChange($i)>&nbsp;</span>";?>
</span>
<?php if($canEditComment):?>
<span class='link-button f-right comment<?php echo $action->id;?>'><?php echo html::a('#lastCommentBox', '&nbsp;', '', "class='icon-green-common-edit' onclick='toggleComment($action->id)'")?></span>
<?php endif;?>
<?php if(!empty($action->comment) or !empty($action->history)):?>
<?php if(!empty($action->comment)) echo "<div class='history'>";?>
<div class='changes hidden' id='changeBox<?php echo $i;?>'>
<?php echo $this->action->printChanges($action->objectType, $action->history);?>
</div>
<?php if($canEditComment):?>
<span class='link-button f-right comment<?php echo $action->id;?>'><?php echo html::a('#lastCommentBox', '&nbsp;', '', "class='icon-green-common-edit' onclick='toggleComment($action->id)'")?></span>
<?php endif;?>
<?php
if($action->comment)
{
@@ -148,7 +148,6 @@ $(function(){
echo "</div>";
}
?>
<?php if($canEditComment):?>
<div class='hidden' id='lastCommentBox'>
<form method='post' action='<?php echo $this->createLink('action', 'editComment', "actionID=$action->id")?>'>
+17 -13
View File
@@ -355,11 +355,13 @@ $lang->resource->bug->browse = 'browse';
$lang->resource->bug->create = 'create';
$lang->resource->bug->batchCreate = 'batchCreate';
$lang->resource->bug->confirmBug = 'confirmBug';
$lang->resource->bug->batchConfirm = 'batchConfirm';
$lang->resource->bug->view = 'view';
$lang->resource->bug->edit = 'edit';
$lang->resource->bug->batchEdit = 'batchEdit';
$lang->resource->bug->assignTo = 'assignTo';
$lang->resource->bug->resolve = 'resolve';
$lang->resource->bug->batchResolve = 'batchResolve';
$lang->resource->bug->activate = 'activate';
$lang->resource->bug->close = 'close';
$lang->resource->bug->report = 'reportChart';
@@ -375,19 +377,21 @@ $lang->bug->methodOrder[5] = 'browse';
$lang->bug->methodOrder[10] = 'create';
$lang->bug->methodOrder[15] = 'batchCreate';
$lang->bug->methodOrder[20] = 'confirmBug';
$lang->bug->methodOrder[25] = 'view';
$lang->bug->methodOrder[30] = 'edit';
$lang->bug->methodOrder[35] = 'assignTo';
$lang->bug->methodOrder[40] = 'resolve';
$lang->bug->methodOrder[45] = 'activate';
$lang->bug->methodOrder[50] = 'close';
$lang->bug->methodOrder[55] = 'report';
$lang->bug->methodOrder[60] = 'export';
$lang->bug->methodOrder[65] = 'confirmStoryChange';
$lang->bug->methodOrder[70] = 'delete';
$lang->bug->methodOrder[75] = 'saveTemplate';
$lang->bug->methodOrder[80] = 'deleteTemplate';
$lang->bug->methodOrder[85] = 'customFields';
$lang->bug->methodOrder[25] = 'batchConfirm';
$lang->bug->methodOrder[30] = 'view';
$lang->bug->methodOrder[35] = 'edit';
$lang->bug->methodOrder[40] = 'assignTo';
$lang->bug->methodOrder[45] = 'resolve';
$lang->bug->methodOrder[50] = 'batchResolve';
$lang->bug->methodOrder[55] = 'activate';
$lang->bug->methodOrder[60] = 'close';
$lang->bug->methodOrder[65] = 'report';
$lang->bug->methodOrder[70] = 'export';
$lang->bug->methodOrder[75] = 'confirmStoryChange';
$lang->bug->methodOrder[80] = 'delete';
$lang->bug->methodOrder[85] = 'saveTemplate';
$lang->bug->methodOrder[90] = 'deleteTemplate';
$lang->bug->methodOrder[95] = 'customFields';
/* Test case. */
$lang->resource->testcase = new stdclass();
-6
View File
@@ -2,9 +2,3 @@ $(function()
{
if(typeof(listName) != 'undefined') setModal4List('iframe', listName, function(){$(".colorbox").colorbox({width:960, height:550, iframe:true, transition:'none'});});
});
function changeAction(formName, actionName, actionLink)
{
if(formName =='myTaskForm' && actionName == 'batchClose') $('#' + formName).attr('target', 'hiddenwin');
$('#' + formName).attr('action', actionLink).submit();
}
-15
View File
@@ -5,19 +5,4 @@ function changeDate(date)
location.href=link;
}
/**
* Change form action.
*
* @param formName $formName
* @param actionName $actionName
* @param actionLink $actionLink
* @access public
* @return void
*/
function changeAction(formName, actionName, actionLink)
{
if(actionName == 'batchFinish') $('#' + formName).attr('target', 'hiddenwin');
$('#' + formName).attr('action', actionLink).submit();
}
$(".colorbox").colorbox({width:960, height:550, iframe:true, transition:'none'});
+2 -2
View File
@@ -85,12 +85,12 @@
if($canBatchEdit)
{
$actionLink = $this->createLink('story', 'batchEdit');
echo html::commonButton($lang->edit, "onclick=\"changeAction('myStoryForm', 'batchEdit', '$actionLink')\"");
echo html::commonButton($lang->edit, "onclick=\"setFormAction('$actionLink')\"");
}
if($canBatchClose)
{
$actionLink = $this->createLink('story', 'batchClose');
echo html::commonButton($lang->close, "onclick=\"changeAction('myStoryForm', 'batchClose', '$actionLink')\"");
echo html::commonButton($lang->close, "onclick=\"setFormAction('$actionLink')\"");
}
}
?>
+2 -2
View File
@@ -83,12 +83,12 @@
if($canBatchEdit)
{
$actionLink = $this->createLink('task', 'batchEdit', "projectID=0&orderBy=$orderBy");
echo html::commonButton($lang->edit, "onclick=\"changeAction('myTaskForm', 'batchEdit', '$actionLink')\"");
echo html::commonButton($lang->edit, "onclick=\"setFormAction('$actionLink')\"");
}
if($canBatchClose)
{
$actionLink = $this->createLink('task', 'batchClose');
echo html::commonButton($lang->close, "onclick=\"changeAction('myTaskForm', 'batchClose', '$actionLink')\"");
echo html::commonButton($lang->close, "onclick=\"setFormAction('$actionLink','hiddenwin')\"");
}
?>
</div>
+2 -2
View File
@@ -89,12 +89,12 @@
if($canBatchEdit)
{
$actionLink = $this->createLink('testcase', 'batchEdit');
echo html::submitButton($lang->edit, "onclick=changeAction('myCaseForm','batchEdit','$actionLink')");
echo html::submitButton($lang->edit, "onclick=setFormAction('$actionLink')");
}
if($canBatchRun)
{
$actionLink = $this->createLink('testtask', 'batchRun', "productID=0&orderBy=$orderBy&from=testcase");
echo html::submitButton($lang->testtask->runCase, "onclick=changeAction('myCaseForm','batchEdit','$actionLink')");
echo html::submitButton($lang->testtask->runCase, "onclick=setFormAction('$actionLink')");
}
?>
</div>
+3 -3
View File
@@ -104,19 +104,19 @@
if(common::hasPriv('todo', 'batchEdit'))
{
$actionLink = $this->createLink('todo', 'batchEdit', "from=myTodo&type=$type&account=$account&status=$status");
echo html::commonButton($lang->edit, "onclick=\"changeAction('todoform', 'batchEdit', '$actionLink')\"");
echo html::commonButton($lang->edit, "onclick=\"setFormAction('$actionLink')\"");
}
if(common::hasPriv('todo', 'batchFinish'))
{
$actionLink = $this->createLink('todo', 'batchFinish');
echo html::commonButton($lang->todo->finish, "onclick=\"changeAction('todoform', 'batchFinish', '$actionLink')\"");
echo html::commonButton($lang->todo->finish, "onclick=\"setFormAction('$actionLink','hiddenwin')\"");
}
if(common::hasPriv('todo', 'import2Today') and $importFuture)
{
$actionLink = $this->createLink('todo', 'import2Today');
echo html::commonButton($lang->todo->import, "onclick=\"changeAction('todoform', 'import2Today', '$actionLink')\"");
echo html::commonButton($lang->todo->import, "onclick=\"setFormAction('$actionLink')\"");
echo html::input('date', date('Y-m-d'), "class='date w-80px'");
}
?>
+1 -2
View File
@@ -93,7 +93,7 @@ class product extends control
* @access public
* @return void
*/
public function browse($productID = 0, $browseType = 'byModule', $param = 0, $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function browse($productID = 0, $browseType = 'allStory', $param = 0, $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Lower browse type. */
$browseType = strtolower($browseType);
@@ -162,7 +162,6 @@ class product extends control
$this->view->orderBy = $orderBy;
$this->view->browseType = $browseType;
$this->view->moduleID = $moduleID;
$this->view->treeClass = $browseType == 'bymodule' ? '' : 'hidden';
$this->display();
}
-24
View File
@@ -1,27 +1,3 @@
/* Browse by module. */
function browseByModule()
{
$('#treebox').removeClass('hidden');
$('.divider').removeClass('hidden');
$('#querybox').addClass('hidden');
$('#featurebar .active').removeClass('active');
$('#bymoduleTab').addClass('active');
}
/**
* Change form action.
*
* @param url $actionLink
* @param bool $hiddenwin
* @access public
* @return void
*/
function changeAction(actionLink, hiddenwin)
{
if(hiddenwin) $('form').attr('target', 'hiddenwin');
$('form').attr('action', actionLink).submit();
}
$(function()
{
if(browseType == 'bysearch') ajaxGetSearchForm();
+30 -18
View File
@@ -14,12 +14,10 @@
<?php include '../../common/view/treeview.html.php';?>
<?php include '../../common/view/colorize.html.php';?>
<?php include '../../common/view/dropmenu.html.php';?>
<script language='Javascript'>
var browseType = '<?php echo $browseType;?>';
</script>
<?php js::set('browseType', $browseType);?>
<div id='featurebar'>
<div class='f-left'>
<span id='bymoduleTab' onclick='browseByModule()'><?php echo html::a($this->inlink('browse',"productID=$productID"), $lang->product->moduleStory);?></span>
<span id='allstoryTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=allStory"), $lang->product->allStory);?></span>
<span id='assignedtomeTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=assignedtome"), $lang->product->assignedToMe);?></span>
<span id='openedbymeTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=openedByMe"), $lang->product->openedByMe);?></span>
<span id='reviewedbymeTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=reviewedByMe"), $lang->product->reviewedByMe);?></span>
@@ -28,23 +26,37 @@ var browseType = '<?php echo $browseType;?>';
<span id='activestoryTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=activeStory"), $lang->product->activeStory);?></span>
<span id='changedstoryTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=changedStory"), $lang->product->changedStory);?></span>
<span id='closedstoryTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=closedStory"), $lang->product->closedStory);?></span>
<span id='allstoryTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=allStory"), $lang->product->allStory);?></span>
<span id='bysearchTab' ><a href='#'><span class='icon-search'></span><?php echo $lang->product->searchStory;?></a></span>
</div>
<div class='f-right'>
<?php common::printIcon('story', 'report', "productID=$productID&browseType=$browseType&moduleID=$moduleID");?>
<?php common::printIcon('story', 'export', "productID=$productID&orderBy=$orderBy");?>
<?php common::printIcon('story', 'batchCreate', "productID=$productID&moduleID=$moduleID");?>
<?php common::printIcon('story', 'create', "productID=$productID&moduleID=$moduleID"); ?>
<?php
echo '<span class="link-button dropButton">';
echo html::a("#", "&nbsp;", '', "id='exportAction' class='icon-green-common-export' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->export}'");
echo html::a("#", $lang->export, '', "id='exportAction' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->export}'");
echo '</span>';
common::printIcon('story', 'report', "productID=$productID&browseType=$browseType&moduleID=$moduleID");
common::printIcon('story', 'batchCreate', "productID=$productID&moduleID=$moduleID");
common::printIcon('story', 'create', "productID=$productID&moduleID=$moduleID");
?>
</div>
</div>
<div id='querybox' class='<?php if($browseType !='bysearch') echo 'hidden';?>'></div>
<div id='exportActionMenu' class='listMenu hidden'>
<ul>
<?php
$misc = common::hasPriv('story', 'export') ? "class='export'" : "class=disabled";
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy") : '#';
echo "<li>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
?>
</ul>
</div>
<div id='querybox' class='<?php if($browseType !='bysearch') echo 'hidden';?>'></div>
<div class='treeSlider'><span>&nbsp;</span></div>
<form method='post' id='productStoryForm'>
<table class='cont-lt1'>
<tr valign='top'>
<td class='side <?php echo $treeClass;?>' id='treebox'>
<td class='side' id='treebox'>
<div class='box-title'><?php echo $productName;?></div>
<div class='box-content'>
<?php echo $moduleTree;?>
@@ -54,7 +66,7 @@ var browseType = '<?php echo $browseType;?>';
</div>
</div>
</td>
<td class='divider <?php echo $treeClass;?>'></td>
<td class='divider'></td>
<td>
<table class='table-1 fixed colored tablesorter datatable' id='storyList'>
<thead>
@@ -122,7 +134,7 @@ var browseType = '<?php echo $browseType;?>';
$actionLink = $this->createLink('story', 'batchEdit', "productID=$productID&projectID=0");
echo "<div class='groupButton dropButton'>";
echo html::commonButton($lang->edit, "onclick=\"changeAction('$actionLink')\" $disabled");
echo html::commonButton($lang->edit, "onclick=\"setFormAction('$actionLink')\" $disabled");
echo "<button id='moreAction' type='button' onclick=\"toggleSubMenu(this.id, 'top', 0)\"><span class='caret'></span></button>";
echo "</div>";
}
@@ -143,7 +155,7 @@ var browseType = '<?php echo $browseType;?>';
$canBatchClose = common::hasPriv('story', 'batchClose') and strtolower($browseType) != 'closedbyme' and strtolower($browseType) != 'closedstory';
$actionLink = $this->createLink('story', 'batchClose', "productID=$productID&projectID=0");
$misc = $canBatchClose ? "onclick=changeAction('$actionLink')" : $class;
$misc = $canBatchClose ? "onclick=setFormAction('$actionLink')" : $class;
echo "<li>" . html::a('#', $lang->close, '', $misc) . "</li>";
$misc = common::hasPriv('story', 'batchReview') ? "onmouseover='toggleSubMenu(this.id)' onmouseout='toggleSubMenu(this.id)' id='reviewItem'" : $class;
@@ -173,7 +185,7 @@ var browseType = '<?php echo $browseType;?>';
}
else
{
echo html::a('#', $result, '', "onclick=\"changeAction('$actionLink',true)\"");
echo html::a('#', $result, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"");
}
echo "</li>";
}
@@ -192,7 +204,7 @@ var browseType = '<?php echo $browseType;?>';
{
$actionLink = $this->createLink('story', 'batchReview', "result=reject&reason=$key");
echo "<li>";
echo html::a('#', $reason, '', "onclick=\"changeAction('$actionLink',true)\"");
echo html::a('#', $reason, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"");
echo "</li>";
}
?>
@@ -207,7 +219,7 @@ var browseType = '<?php echo $browseType;?>';
foreach($plans as $planID => $plan)
{
$actionLink = $this->createLink('story', 'batchChangePlan', "planID=$planID");
echo "<li>" . html::a('#', $plan, '', "onclick=\"changeAction('$actionLink',true)\"") . "</li>";
echo "<li>" . html::a('#', $plan, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"") . "</li>";
}
?>
</ul>
@@ -220,7 +232,7 @@ var browseType = '<?php echo $browseType;?>';
foreach($lang->story->stageList as $key => $stage)
{
$actionLink = $this->createLink('story', 'batchChangeStage', "stage=$key");
echo "<li>" . html::a('#', $stage, '', "onclick=\"changeAction('$actionLink',true)\"") . "</li>";
echo "<li>" . html::a('#', $stage, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"") . "</li>";
}
?>
</ul>
-14
View File
@@ -2,17 +2,3 @@ $(document).ready(function()
{
$("a.iframe").colorbox({width:640, height:480, iframe:true, transition:'none'});
});
/**
* Change form action.
*
* @param formName $formName
* @param actionName $actionName
* @param actionLink $actionLink
* @access public
* @return void
*/
function changeAction(formName, actionName, actionLink)
{
$('#' + formName).attr('action', actionLink).submit();
}
-5
View File
@@ -4,10 +4,5 @@ $(function()
if(browseType == 'bysearch') ajaxGetSearchForm();
});
function changeAction(formName, actionName, actionLink)
{
if(actionName == 'batchClose') $('#' + formName).attr('target', 'hiddenwin');
$('#' + formName).attr('action', actionLink).submit();
}
$('#module' + moduleID).addClass('active');
$('#product' + productID).addClass('active');
+2 -2
View File
@@ -106,12 +106,12 @@
if($canBatchEdit)
{
$actionLink = $this->createLink('story', 'batchEdit', "productID=0&projectID=$project->id");
echo html::commonButton($lang->edit, "onclick=\"changeAction('projectStoryForm', 'batchEdit', '$actionLink')\"");
echo html::commonButton($lang->edit, "onclick=\"setFormAction('$actionLink')\"");
}
if($canBatchClose)
{
$actionLink = $this->createLink('story', 'batchClose', "productID=0&projectID=$project->id");
echo html::commonButton($lang->close, "onclick=\"changeAction('projectStoryForm', 'batchClose', '$actionLink')\"");
echo html::commonButton($lang->close, "onclick=\"setFormAction('$actionLink')\"");
}
}
echo $summary;
+4 -4
View File
@@ -150,13 +150,13 @@ var browseType = '<?php echo $browseType;?>';
echo "</div>";
$actionLink = $this->createLink('task', 'batchEdit', "projectID=$projectID");
$misc = $canBatchEdit ? "onclick=changeAction('$actionLink')" : "disabled='disabled'";
$misc = $canBatchEdit ? "onclick=setFormAction('$actionLink')" : "disabled='disabled'";
echo "<div class='groupButton dropButton'>";
echo html::commonButton($lang->edit, "onclick=\"changeAction('projectTaskForm', 'batchEdit', '$actionLink')\" $misc");
echo html::commonButton($lang->edit, $misc);
echo "<button id='moreAction' type='button' onclick=\"toggleSubMenu(this.id, 'top', 0)\"><span class='caret'></span></button>";
echo "</div>";
}
echo $summary;
echo "<span class='f-12px'>" . $summary . "</span>";
?>
</div>
<?php $pager->show();?>
@@ -173,7 +173,7 @@ var browseType = '<?php echo $browseType;?>';
<ul>
<?php
$actionLink = $this->createLink('task', 'batchClose');
$misc = $canBatchClose ? "onclick=changeAction('projectTaskForm','batchClose','$actionLink')" : "class='disabled'";
$misc = $canBatchClose ? "onclick=setFormAction('$actionLink','hiddenwin')" : "class='disabled'";
echo "<li>" . html::a('#', $lang->close, '', $misc) . "</li>";
?>
</ul>
+22 -3
View File
@@ -22,7 +22,11 @@
if(!isset($browseType)) $browseType = '';
if(!isset($orderBy)) $orderBy = '';
common::printIcon('task', 'report', "project=$projectID&browseType=$browseType");
if($browseType != 'needconfirm') common::printIcon('task', 'export', "projectID=$projectID&orderBy=$orderBy");
echo '<span class="link-button dropButton">';
echo html::a("#", "&nbsp;", '', "id='exportAction' class='icon-green-common-export' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->export}'");
echo html::a("#", $lang->export, '', "id='exportAction' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->export}'");
echo '</span>';
echo '<span class="link-button dropButton">';
echo html::a("#", "&nbsp;", '', "id='importAction' class='icon-green-task-import' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->import}'");
@@ -35,11 +39,26 @@
</div>
</div>
<div id='exportActionMenu' class='listMenu hidden'>
<ul>
<?php
$misc = common::hasPriv('task', 'export') ? "class='export'" : "class=disabled";
$link = common::hasPriv('task', 'export') ? $this->createLink('task', 'export', "project=$projectID&orderBy=$orderBy") : '#';
echo "<li>" . html::a($link, $lang->task->export, '', $misc) . "</li>";
?>
</ul>
</div>
<div id='importActionMenu' class='listMenu hidden'>
<ul>
<?php
echo "<li>" . html::a($this->createLink('project', 'importTask', "project=$project->id"), $lang->project->importTask) . "</li>";
echo "<li>" . html::a($this->createLink('project', 'importBug', "projectID=$project->id"), $lang->project->importBug) . "</li>";
$misc = common::hasPriv('project', 'importTask') ? '' : "class=disabled";
$link = common::hasPriv('project', 'importTask') ? $this->createLink('project', 'importTask', "project=$project->id") : '#';
echo "<li>" . html::a($link, $lang->project->importTask, '', $misc) . "</li>";
$misc = common::hasPriv('project', 'importBug') ? '' : "class=disabled";
$link = common::hasPriv('project', 'importBug') ? $this->createLink('project', 'importTask', "project=$project->id") : '#';
echo "<li>" . html::a($link, $lang->project->importBug, '', $misc) . "</li>";
?>
</ul>
</div>
+1 -1
View File
@@ -28,7 +28,7 @@ $lang->story->tasks = "Tasks";
$lang->story->taskCount = 'Tasks count';
$lang->story->bugs = "Bug";
$lang->story->linkStory = 'Related story';
$lang->story->export = "Export";
$lang->story->export = "Export data";
$lang->story->reportChart = "Report";
$lang->story->batchChangePlan = "Batch change plan";
$lang->story->batchChangeStage = "Batch change stage";
+1 -1
View File
@@ -28,7 +28,7 @@ $lang->story->tasks = "相关任务";
$lang->story->taskCount = '任务数';
$lang->story->bugs = "Bug";
$lang->story->linkStory = '关联需求';
$lang->story->export = "导出";
$lang->story->export = "导出数据";
$lang->story->reportChart = "统计报表";
$lang->story->batchChangePlan = "批量修改计划";
$lang->story->batchChangeStage = "批量修改阶段";
+1 -1
View File
@@ -25,7 +25,7 @@ $lang->task->close = "Close";
$lang->task->batchClose = "Batch close";
$lang->task->cancel = "Cancel";
$lang->task->activate = "Activate";
$lang->task->export = "Export";
$lang->task->export = "Export data";
$lang->task->reportChart = "Report chart";
$lang->task->fromBug = 'From Bug';
$lang->task->confirmStoryChange = "Confirm story change";
+1 -1
View File
@@ -25,7 +25,7 @@ $lang->task->close = "关闭";
$lang->task->batchClose = "批量关闭";
$lang->task->cancel = "取消";
$lang->task->activate = "激活";
$lang->task->export = "导出";
$lang->task->export = "导出数据";
$lang->task->reportChart = "报表统计";
$lang->task->fromBug = '来源Bug';
$lang->task->confirmStoryChange = "确认需求变动";
+1 -2
View File
@@ -52,7 +52,7 @@ class testcase extends control
* @access public
* @return void
*/
public function browse($productID = 0, $browseType = 'byModule', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function browse($productID = 0, $browseType = 'all', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Set browseType, productID, moduleID and queryID. */
$browseType = strtolower($browseType);
@@ -154,7 +154,6 @@ class testcase extends control
$this->view->orderBy = $orderBy;
$this->view->browseType = $browseType;
$this->view->param = $param;
$this->view->treeClass = $browseType == 'bymodule' ? '' : 'hidden';
$this->display();
}
-16
View File
@@ -1,14 +1,3 @@
/* Switch to module browse. */
function browseByModule(active)
{
$('.side').removeClass('hidden');
$('.divider').removeClass('hidden');
$('#bymoduleTab').addClass('active');
$('#' + active + 'Tab').removeClass('active');
$('#bysearchTab').removeClass('active');
$('#querybox').addClass('hidden');
}
/* Swtich to search module. */
function browseBySearch(active)
{
@@ -20,11 +9,6 @@ function browseBySearch(active)
$('#bymoduleTab').removeClass('active');
}
function changeAction(url)
{
$('#batchForm').attr('action', url);
}
$(document).ready(function()
{
setModal4List('runCase', 'caseList', function(){$(".results").colorbox({width:900, height:550, iframe:true, transition:'none'});});
+1 -1
View File
@@ -65,7 +65,7 @@ $lang->testcase->import = "Import";
$lang->testcase->importID = "Linenum";
$lang->testcase->showImport = "Show import";
$lang->testcase->exportTemplet = "Export templet";
$lang->testcase->export = "Export";
$lang->testcase->export = "Export data";
$lang->testcase->confirmChange = 'Confirm case change';
$lang->testcase->confirmStoryChange = 'Confirm story change';
+1 -1
View File
@@ -65,7 +65,7 @@ $lang->testcase->import = "导入";
$lang->testcase->importID = "行号";
$lang->testcase->showImport = "显示导入内容";
$lang->testcase->exportTemplet = "导出模板";
$lang->testcase->export = "导出";
$lang->testcase->export = "导出数据";
$lang->testcase->confirmChange = '确认用例变动';
$lang->testcase->confirmStoryChange = '确认需求变动';
+47 -17
View File
@@ -15,6 +15,7 @@ include '../../common/view/header.html.php';
include '../../common/view/datepicker.html.php';
include '../../common/view/treeview.html.php';
include '../../common/view/colorize.html.php';
include '../../common/view/dropmenu.html.php';
js::set('browseType', $browseType);
js::set('moduleID' , $moduleID);
js::set('confirmDelete', $lang->testcase->confirmDelete);
@@ -23,26 +24,45 @@ js::set('confirmDelete', $lang->testcase->confirmDelete);
<div id='featurebar'>
<div class='f-left'>
<?php
echo "<span id='bymoduleTab' onclick=\"browseByModule('$browseType')\"><a href='#'>" . $lang->testcase->moduleCases . "</a></span> ";
echo "<span id='allTab'>" . html::a($this->createLink('testcase', 'browse', "productid=$productID&browseType=all&param=0&orderBy=$orderBy&recTotal=0&recPerPage=200"), $lang->testcase->allCases) . "</span>";
echo "<span id='needconfirmTab'>" . html::a($this->createLink('testcase', 'browse', "productid=$productID&browseType=needconfirm&param=0"), $lang->testcase->needConfirm) . "</span>";
echo "<span id='bysearchTab' onclick=\"browseBySearch('$browseType')\"><a href='#'><span class='icon-search'></span>{$lang->testcase->bySearch}</a></span> ";
?>
</div>
<div class='f-right'>
<?php common::printIcon('testcase', 'import', "productID=$productID", '', 'button', '', '', 'export');?>
<?php common::printIcon('testcase', 'exportTemplet', "productID=$productID", '', 'button', 'export', '', 'export');?>
<?php if($browseType != 'needconfirm') common::printIcon('testcase', 'export', "productID=$productID&orderBy=$orderBy"); ?>
<?php common::printIcon('testcase', 'batchCreate', "productID=$productID&moduleID=$moduleID");?>
<?php common::printIcon('testcase', 'create', "productID=$productID&moduleID=$moduleID"); ?>
<?php
common::printIcon('testcase', 'import', "productID=$productID", '', 'button', '', '', 'export');
echo '<span class="link-button dropButton">';
echo html::a("#", "&nbsp;", '', "id='exportAction' class='icon-green-common-export' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->export}'");
echo html::a("#", $lang->export, '', "id='exportAction' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->export}'");
echo '</span>';
common::printIcon('testcase', 'batchCreate', "productID=$productID&moduleID=$moduleID");
common::printIcon('testcase', 'create', "productID=$productID&moduleID=$moduleID");
?>
</div>
</div>
<div id='exportActionMenu' class='listMenu hidden'>
<ul>
<?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 id='querybox' class='<?php if($browseType != 'bysearch') echo 'hidden';?>'></div>
<div class='treeSlider'><span>&nbsp;</span></div>
<form id='batchForm' method='post'>
<table class='cont-lt1'>
<tr valign='top'>
<td class='side <?php echo $treeClass;?>'>
<td class='side'>
<div class='box-title'><?php echo $productName;?></div>
<div class='box-content'>
<?php echo $moduleTree;?>
@@ -52,7 +72,7 @@ js::set('confirmDelete', $lang->testcase->confirmDelete);
</div>
</div>
</td>
<td class='divider <?php echo $treeClass;?>'></td>
<td class='divider'></td>
<td>
<table class='table-1 colored tablesorter datatable fixed' id='caseList'>
<?php $vars = "productID=$productID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
@@ -74,17 +94,11 @@ js::set('confirmDelete', $lang->testcase->confirmDelete);
<th class='w-150px {sorter:false}'><?php echo $lang->actions;?></th>
<?php endif;?>
</tr>
<?php
$canBatchEdit = common::hasPriv('testcase', 'batchEdit');
$canBatchRun = common::hasPriv('testtask', 'batchRun');
?>
<?php foreach($cases as $case):?>
<tr class='a-center'>
<?php $viewLink = inlink('view', "caseID=$case->id");?>
<td>
<?php if($canBatchEdit or $canBatchRun):?>
<input type='checkbox' name='caseIDList[]' value='<?php echo $case->id;?>'/>
<?php endif;?>
<?php echo html::a($viewLink, sprintf('%03d', $case->id));?>
</td>
<td><span class='<?php echo 'pri' . $case->pri?>'><?php echo $case->pri?></span></td>
@@ -123,9 +137,14 @@ js::set('confirmDelete', $lang->testcase->confirmDelete);
<?php if($cases):?>
<div class='f-left'>
<?php
if($canBatchEdit or $canBatchRun) echo html::selectAll() . html::selectReverse();
if($canBatchEdit) echo html::submitButton($lang->edit, "onclick='changeAction(\"" . inLink('batchEdit', "productID=$productID") . "\")'");
if($canBatchRun) echo html::submitButton($lang->testtask->runCase, "onclick='changeAction(\"" . $this->createLink('testtask', 'batchRun', "productID=$productID&orderBy=$orderBy") . "\")'");
echo "<div class='groupButton'>" . html::selectAll() . html::selectReverse() . "</div>";
$actionLink = $this->createLink('testcase', 'batchEdit', "productID=$productID");
$misc = common::hasPriv('testcase', 'batchEdit') ? "onclick=setFormAction('$actionLink')" : "disabled='disabled'";
echo "<div class='groupButton dropButton'>";
echo html::commonButton($lang->edit, $misc);
echo "<button id='moreAction' type='button' onclick=\"toggleSubMenu(this.id, 'top', 0)\"><span class='caret'></span></button>";
echo "</div>";
?>
</div>
<?php endif?>
@@ -138,4 +157,15 @@ js::set('confirmDelete', $lang->testcase->confirmDelete);
</tr>
</table>
</form>
<div id='moreActionMenu' class='listMenu hidden'>
<ul>
<?php
$actionLink = $this->createLink('testtask', 'batchRun', "productID=$productID&orderBy=$orderBy");
$misc = common::hasPriv('testtask', 'batchRun') ? "onclick=setFormAction('$actionLink')" : "class='disabled'";
echo "<li>" . html::a('#', $lang->testtask->runCase, '', $misc) . "</li>";
?>
</ul>
</div>
<?php include '../../common/view/footer.html.php';?>
-5
View File
@@ -18,11 +18,6 @@ function browseBySearch(active)
$('#bymoduleTab').removeClass('active');
}
function changeAction(url)
{
$('#batchForm').attr('action', url);
}
$(document).ready(function()
{
setModal4List('runCase', 'caseList', function(){$(".results").colorbox({width:900, height:550, iframe:true, transition:'none'});});
+19 -14
View File
@@ -106,20 +106,25 @@ var moduleID = '<?php echo $moduleID;?>';
<?php if($runs):?>
<div class='f-left'>
<?php if($canBatchEdit or $canBatchAssign or $canBatchRun) echo html::selectAll() . html::selectReverse(); ?>
<?php if($canBatchEdit):?>
<input class='button-s' value="<?php echo $lang->edit; ?>" type="button" onclick="casesform.action='<?php echo $this->createLink('testcase', 'batchEdit', "from=testtaskCases&productID=$productID");?>';casesform.submit();">
<?php endif;?>
<?php if($canBatchAssign):?>
<?php echo html::select('assignedTo', $users);?>
<input class='button-s' value="<?php echo $lang->testtask->assign; ?>" type="button" onclick="casesform.action='<?php echo inLink('batchAssign', "taskID=$task->id");?>';casesform.submit();">
<?php endif;?>
<?php if($canBatchRun):?>
<input class='button-s' value="<?php echo $lang->testtask->runCase; ?>" type="button" onclick="casesform.action='<?php echo inLink('batchRUN', "productID=$productID&orderBy=id_desc&from=testtask");?>';casesform.submit();">
<?php endif;?>
<?php
if($canBatchEdit or $canBatchAssign or $canBatchRun) echo html::selectAll() . html::selectReverse();
if($canBatchEdit)
{
$actionLink = $this->createLink('testcase', 'batchEdit', "productID=$productID");
echo html::commonButton($lang->edit, "onclick=\"setFormAction('$actionLink')\"");
}
if($canBatchAssign)
{
$actionLink = inLink('batchAssign', "taskID=$task->id");
echo html::select('assignedTo', $users);
echo html::commonButton($lang->testtask->assign, "onclick=\"setFormAction('$actionLink')\"");
}
if($canBatchRun)
{
$actionLink = inLink('batchRUN', "productID=$productID&orderBy=id_desc&from=testtask");
echo html::commonButton($lang->testtask->runCase, "onclick=\"setFormAction('$actionLink')\"");
}
?>
</div>
<?php endif;?>
+16
View File
@@ -300,12 +300,14 @@ function toggleTreeBox()
function()
{
$('.side').hide()
$('.divider').hide()
$('.treeSlider span').css("border-right", "0 none");
$('.treeSlider span').css("border-left", "4px solid #000000");
},
function()
{
$('.side').show()
$('.divider').show()
$('.treeSlider span').css("border-right", "4px solid #000000");
$('.treeSlider span').css("border-left", "0 none");
}
@@ -462,6 +464,20 @@ function setForm()
});
}
/**
* Set form action and submit.
*
* @param url $actionLink
* @param string $hiddenwin 'hiddenwin'
* @access public
* @return void
*/
function setFormAction(actionLink, hiddenwin)
{
if(hiddenwin) $('form').attr('target', hiddenwin);
$('form').attr('action', actionLink).submit();
}
/**
* Set the max with of image.
*