* rewrite the ui.

This commit is contained in:
wangchunsheng
2011-02-21 13:30:05 +00:00
parent e3a2f4686a
commit e17ecf157d
5 changed files with 90 additions and 100 deletions
+24
View File
@@ -0,0 +1,24 @@
/* Browse by module. */
function browseByModule(active)
{
$('#treebox').removeClass('hidden');
$('#bymoduleTab').addClass('active');
$('#querybox').addClass('hidden');
$('#' + active + 'Tab').removeClass('active');
}
/* Search bugs. */
function browseBySearch(active)
{
$('#treebox').addClass('hidden');
$('#querybox').removeClass('hidden');
$('#bymoduleTab').removeClass('active');
$('#' + active + 'Tab').removeClass('active');
$('#bysearchTab').addClass('active');
}
$(document).ready(function()
{
$("a.iframe").colorbox({width:640, height:420, iframe:true, transition:'none'});
$('#' + browseType + 'Tab').addClass('active');
$('#module' + moduleID).addClass('active');
});
+1 -3
View File
@@ -77,6 +77,4 @@ if($.browser.msie && Math.floor(parseInt($.browser.version)) == 6)
$("#browsecss").attr('href', '');
}
</script>
<iframe frameborder='0' name='hiddenwin' class='<?php $config->debug ? print("debugwin") : print('hiddenwin')?>'></iframe>
</body>
</html>
<?php include '../../common/view/footer.html.php';?>
+40 -68
View File
@@ -15,64 +15,51 @@
<?php include '../../common/view/colorize.html.php';?>
<?php include '../../common/view/table2csv.html.php';?>
<script language='Javascript'>
/* Browse by module. */
function browseByModule(active)
{
$('#mainbox').addClass('yui-t1');
$('#treebox').removeClass('hidden');
$('#bymoduleTab').addClass('active');
$('#querybox').addClass('hidden');
$('#' + active + 'Tab').removeClass('active');
}
/* Search bugs. */
function browseBySearch(active)
{
$('#mainbox').removeClass('yui-t1');
$('#treebox').addClass('hidden');
$('#querybox').removeClass('hidden');
$('#bymoduleTab').removeClass('active');
$('#' + active + 'Tab').removeClass('active');
$('#bysearchTab').addClass('active');
}
$(document).ready(function()
{
$("a.iframe").colorbox({width:640, height:420, iframe:true, transition:'none'});
});
var browseType = '<?php echo $browseType;?>';
var moduleID = '<?php echo $moduleID;?>';
</script>
<div class='g'><div class='u-1'>
<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='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>";
echo "<span id='assigntonullTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=assignToNull&param=0"), $lang->bug->assignToNull) . "</span>";
echo "<span id='unresolvedTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=unResolved&param=0"), $lang->bug->unResolved) . "</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' onclick=\"browseBySearch('$browseType')\"><a href='#'>{$lang->bug->byQuery}</a></span> ";
?>
</div>
<div class='f-right'>
<?php common::printLink('bug', 'customFields', '', $lang->bug->customFields, '', "class='iframe'"); ?>
<?php echo html::export2csv($lang->exportCSV, $lang->setFileName);?>
<?php common::printLink('bug', 'report', "productID=$productID&browseType=$browseType&moduleID=$moduleID", $lang->bug->report->common); ?>
<?php common::printLink('bug', 'create', "productID=$productID&extra=moduleID=$moduleID", $lang->bug->create); ?>
<div class='g'>
<div class='u-1'>
<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='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>";
echo "<span id='assigntonullTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=assignToNull&param=0"), $lang->bug->assignToNull) . "</span>";
echo "<span id='unresolvedTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=unResolved&param=0"), $lang->bug->unResolved) . "</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' onclick=\"browseBySearch('$browseType')\"><a href='#'>{$lang->bug->byQuery}</a></span> ";
?>
</div>
<div class='f-right'>
<?php common::printLink('bug', 'customFields', '', $lang->bug->customFields, '', "class='iframe'"); ?>
<?php echo html::export2csv($lang->exportCSV, $lang->setFileName);?>
<?php common::printLink('bug', 'report', "productID=$productID&browseType=$browseType&moduleID=$moduleID", $lang->bug->report->common); ?>
<?php common::printLink('bug', 'create', "productID=$productID&extra=moduleID=$moduleID", $lang->bug->create); ?>
</div>
</div>
<div id='querybox' class='<?php if($browseType !='bysearch') echo 'hidden';?>'><?php echo $searchForm;?></div>
</div>
<div id='querybox' class='<?php if($browseType !='bysearch') echo 'hidden';?>'><?php echo $searchForm;?></div>
</div>
<?php if($customed){include 'browse.custom.html.php'; exit;}?>
<div class='yui-d0 <?php if($browseType == 'bymodule') echo 'yui-t1';?>' id='mainbox'>
<div class="yui-main">
<div class="yui-b">
<?php if($customed) die(include 'browse.custom.html.php');?>
<div class='g side-left-1'>
<div class='u sidebar'>
<div class='box-title'><?php echo $productName;?></div>
<div class='box-content'>
<?php echo $moduleTree;?>
<div class='a-right'>
<?php if(common::hasPriv('tree', 'browse')) echo html::a($this->createLink('tree', 'browse', "productID=$productID&view=bug"), $lang->tree->manage);?>
</div>
</div>
</div>
<div class='u mainbar'>
<div class="cont">
<?php $vars = "productID=$productID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<table class='table-1 fixed colored tablesorter datatable'>
<thead>
@@ -125,20 +112,5 @@ $(document).ready(function()
<?php $pager->show();?>
</div>
</div>
<div class='yui-b <?php if($browseType != 'bymodule') echo 'hidden';?>' id='treebox'>
<div class='box-title'><?php echo $productName;?></div>
<div class='box-content'>
<?php echo $moduleTree;?>
<div class='a-right'>
<?php if(common::hasPriv('tree', 'browse')) echo html::a($this->createLink('tree', 'browse', "productID=$productID&view=bug"), $lang->tree->manage);?>
</div>
</div>
</div>
</div>
<script language='javascript'>
$("#<?php echo $browseType;?>Tab").addClass('active');
$("#module<?php echo $moduleID;?>").addClass('active');
</script>
<?php include '../../common/view/footer.html.php';?>
+7 -9
View File
@@ -3,16 +3,14 @@
<div class='g'>
<div class='u-1'><iframe frameborder='0' name='hiddenwin' scrolling='no' class='<?php $config->debug ? print("debugwin") : print('hidden')?>'></iframe></div>
</div>
<div class='g' id='footer'>
<div class='u-1-2'>
<div class='cont a-left' id='crumbs'><?php commonModel::printBreadMenu($this->moduleName, isset($position) ? $position : ''); ?></div>
</div>
<div class='u-1-2'>
<div class='cont a-right' id='poweredby'>powered by <a href='http://www.zentao.net' target='_blank'>ZenTaoPMS</a> (<?php echo $config->version;?>)
<table class='cont' id='footer'>
<tr>
<td width='50%' id='crumbs'><?php commonModel::printBreadMenu($this->moduleName, isset($position) ? $position : ''); ?></td>
<td id='poweredby'>powered by <a href='http://www.zentao.net' target='_blank'>ZenTaoPMS</a> (<?php echo $config->version;?>)
<?php echo $lang->sponser;?>
</div>
</div>
</div>
</td>
</tr>
</table>
<script laguage='Javascript'>$().ready(function(){setDebugWin('white')}); <?php if(isset($pageJS)) echo $pageJS;?></script>
</body>
</html>
+18 -20
View File
@@ -4,25 +4,23 @@ include 'header.lite.html.php';
include 'colorbox.html.php';
?>
<div id='header'>
<div class='g' id='topbar'>
<div class='u-1-2'>
<div class='cont a-left'>
<?php
echo $app->company->name . $lang->colon;
if($app->company->website) echo html::a($app->company->website, $lang->company->website, '_blank');
if($app->company->backyard) echo html::a($app->company->backyard, $lang->company->backyard, '_blank');
echo html::a('#', $lang->switchHelp, '', "onclick='toggleHelpLink();'");
echo html::select('', $app->config->langs, $this->cookie->lang, 'class=switcher onchange="selectLang(this.value)"');
echo html::select('', $app->lang->themes, $this->cookie->theme, 'class=switcher onchange="selectTheme(this.value)"');
?>
</div>
</div>
<div class='u-1-2'><div class='cont a-right'><?php commonModel::printTopBar();?></div></div>
</div>
<div class='g' id='navbar'>
<div class='u-1'>
<div id='mainmenu'><?php commonModel::printMainmenu($this->moduleName); commonModel::printSearchBox();?></div>
<div id='modulemenu'><?php commonModel::printModuleMenu($this->moduleName);?></div>
</div>
<table class='cont' id='topbar'>
<tr>
<td class='w-p50'>
<?php
echo $app->company->name . $lang->colon;
if($app->company->website) echo html::a($app->company->website, $lang->company->website, '_blank');
if($app->company->backyard) echo html::a($app->company->backyard, $lang->company->backyard, '_blank');
echo html::a('#', $lang->switchHelp, '', "onclick='toggleHelpLink();'");
echo html::select('', $app->config->langs, $this->cookie->lang, 'class=switcher onchange="selectLang(this.value)"');
echo html::select('', $app->lang->themes, $this->cookie->theme, 'class=switcher onchange="selectTheme(this.value)"');
?>
</td>
<td class='a-right'><?php commonModel::printTopBar();?></td>
</tr>
</table>
<div id='navbar'>
<div id='mainmenu'><?php commonModel::printMainmenu($this->moduleName); commonModel::printSearchBox();?></div>
<div id='modulemenu'><?php commonModel::printModuleMenu($this->moduleName);?></div>
</div>
</div>