* adjust code

This commit is contained in:
wangyidong
2011-05-02 04:54:41 +00:00
parent 2848ed67e6
commit b5ab9106df
6 changed files with 42 additions and 40 deletions
-1
View File
@@ -14,7 +14,6 @@
<?php include '../../common/view/treeview.html.php';?>
<?php include '../../common/view/colorize.html.php';?>
<?php include '../../common/view/table2csv.html.php';?>
<?php include '../../common/js/togglesearch.js';?>
<script language='Javascript'>
var browseType = '<?php echo $browseType;?>';
var moduleID = '<?php echo $moduleID;?>';
-36
View File
@@ -1,36 +0,0 @@
<script language='Javascript'>
$(function()
{
/* show the search or reduction the style. */
$("#bysearchTab").toggle(
function(){
if(browseType == 'bymodule')
{
$('#treebox').addClass('hidden');
$('.divider').addClass('hidden');
$('#bymoduleTab').removeClass('active');
}
else
{
$('#' + browseType + 'Tab').removeClass('active');
}
$('#bysearchTab').addClass('active');
$('#querybox').removeClass('hidden');
},
function(){
if(browseType == 'bymodule')
{
$('#treebox').removeClass('hidden');
$('.divider').removeClass('hidden');
$('#bymoduleTab').addClass('active');
}
else
{
$('#' + browseType +'Tab').addClass('active');
}
$('#bysearchTab').removeClass('active');
$('#querybox').addClass('hidden');
}
);
})
</script>
-1
View File
@@ -13,7 +13,6 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/treeview.html.php';?>
<?php include '../../common/view/colorize.html.php';?>
<?php include '../../common/js/togglesearch.js';?>
<script language='Javascript'>
var browseType = '<?php echo $browseType;?>';
</script>
-1
View File
@@ -13,7 +13,6 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/treeview.html.php';?>
<?php include '../../common/view/colorize.html.php';?>
<?php include '../../common/js/togglesearch.js';?>
<script language='Javascript'>
var browseType = '<?php echo $browseType;?>';
</script>
-1
View File
@@ -13,7 +13,6 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/colorize.html.php';?>
<?php include '../../common/view/table2csv.html.php';?>
<?php include '../../common/js/togglesearch.js';?>
<?php include './taskheader.html.php';?>
<script language='Javascript'>
var browseType = '<?php echo $browseType;?>';
+42
View File
@@ -620,6 +620,47 @@ function autoCheck()
});
}
/**
* Show the search or reduction the style.
*
* @access public
* @return void
*/
function togglesearch()
{
$("#bysearchTab").toggle(
function()
{
if(browseType == 'bymodule')
{
$('#treebox').addClass('hidden');
$('.divider').addClass('hidden');
$('#bymoduleTab').removeClass('active');
}
else
{
$('#' + browseType + 'Tab').removeClass('active');
}
$('#bysearchTab').addClass('active');
$('#querybox').removeClass('hidden');
},
function()
{
if(browseType == 'bymodule')
{
$('#treebox').removeClass('hidden');
$('.divider').removeClass('hidden');
$('#bymoduleTab').addClass('active');
}
else
{
$('#' + browseType +'Tab').addClass('active');
}
$('#bysearchTab').removeClass('active');
$('#querybox').addClass('hidden');
}
);
}
/* Ping the server every some minutes to keep the session. */
needPing = true;
@@ -638,6 +679,7 @@ $(document).ready(function()
setForm();
setImageSize();
autoCheck();
togglesearch();
});
/* CTRL+g, auto focus on the search box. */