* code for task#1678.

* remove the byModule link.
This commit is contained in:
azhi
2013-08-08 09:56:43 +08:00
parent df52457cef
commit e4d27b3a67
9 changed files with 26 additions and 65 deletions
+15 -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();
}
-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'});
+3 -4
View File
@@ -22,7 +22,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,7 +31,6 @@ 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> ";
?>
@@ -61,7 +60,7 @@ js::set('customed', $customed);
<form method='post' action='<?php echo inLink('batchEdit', "productID=$productID");?>'>
<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 +70,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}"; ?>
+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();
}
-10
View File
@@ -1,13 +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.
*
+4 -7
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,7 +26,6 @@ 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'>
@@ -44,7 +41,7 @@ var browseType = '<?php echo $browseType;?>';
<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 +51,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>
+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();
}
-11
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)
{
+2 -3
View File
@@ -23,7 +23,6 @@ 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> ";
@@ -42,7 +41,7 @@ js::set('confirmDelete', $lang->testcase->confirmDelete);
<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 +51,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}"; ?>