* change link to tab.

This commit is contained in:
wangyidong
2014-08-05 01:08:52 +00:00
parent 161a56a6f4
commit c1b2fcbca9
2 changed files with 19 additions and 13 deletions
+4
View File
@@ -0,0 +1,4 @@
$(document).ready(function()
{
$('#zerocaseTab').addClass('active');
});
+15 -13
View File
@@ -5,21 +5,24 @@
echo "<li id='allTab'>" . html::a($this->createLink('testcase', 'browse', "productid=$productID&browseType=all"), $lang->testcase->allCases) . "</li>";
echo "<li id='needconfirmTab'>" . html::a($this->createLink('testcase', 'browse', "productid=$productID&browseType=needconfirm"), $lang->testcase->needConfirm) . "</li>";
echo "<li id='groupTab' class='dropdown'>";
$groupBy = isset($groupBy) ? $groupBy : '';
$current = zget($lang->testcase->groups, isset($groupBy) ? $groupBy : '', '');
if(empty($current)) $current = $lang->testcase->groups[''];
echo html::a('javascript:;', $current . " <span class='caret'></span>", '', "data-toggle='dropdown'");
echo "<ul class='dropdown-menu'>";
foreach ($lang->testcase->groups as $key => $value)
if(common::hasPriv('testcase', 'groupcase'))
{
if($key == '') continue;
echo '<li' . ($key == $groupBy ? " class='active'" : '') . '>';
echo html::a($this->createLink('testcase', 'groupCase', "productID=$productID&groupBy=$key"), $value);
echo "<li id='groupTab' class='dropdown'>";
$groupBy = isset($groupBy) ? $groupBy : '';
$current = zget($lang->testcase->groups, isset($groupBy) ? $groupBy : '', '');
if(empty($current)) $current = $lang->testcase->groups[''];
echo html::a('javascript:;', $current . " <span class='caret'></span>", '', "data-toggle='dropdown'");
echo "<ul class='dropdown-menu'>";
foreach ($lang->testcase->groups as $key => $value)
{
if($key == '') continue;
echo '<li' . ($key == $groupBy ? " class='active'" : '') . '>';
echo html::a($this->createLink('testcase', 'groupCase', "productID=$productID&groupBy=$key"), $value);
}
echo '</ul></li>';
}
echo '</ul></li>';
if(common::hasPriv('story', 'zeroCase')) echo "<li id='zerocaseTab'>" . html::a($this->createLink('story', 'zeroCase', "productID=$productID"), $lang->story->zeroCase) . '</li>';
if($this->methodName == 'browse') echo "<li id='bysearchTab'><a href='#'><i class='icon-search icon'></i>&nbsp;{$lang->testcase->bySearch}</a></li> ";
?>
</ul>
@@ -44,7 +47,6 @@
</div>
<?php
common::printIcon('testcase', 'import', "productID=$productID", '', 'button', '', '', 'export cboxElement iframe');
common::printIcon('story', 'zeroCase', "productID=$productID", '', 'button', 'story');
$initModule = isset($moduleID) ? (int)$moduleID : 0;
common::printIcon('testcase', 'batchCreate', "productID=$productID&moduleID=$initModule");