* fix the error of footer.
* adjust the header.
This commit is contained in:
@@ -358,54 +358,30 @@ EOT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Export the createLink function of JS version.
|
||||
* Export the config vars for createLink() js version.
|
||||
*
|
||||
* @static
|
||||
* @access public
|
||||
* @return string the js code of createLink()
|
||||
* @return string
|
||||
*/
|
||||
static public function exportLinkFunc()
|
||||
static public function exportConfigVars()
|
||||
{
|
||||
global $app, $config;
|
||||
$defaultViewType = $app->getViewType();
|
||||
$themeRoot = $app->getWebRoot() . 'theme/';
|
||||
$js = <<<EOT
|
||||
<script language = 'javascript'>
|
||||
function createLink(moduleName, methodName, vars, viewType)
|
||||
{
|
||||
link = '$config->webRoot';
|
||||
requestType = '$config->requestType';
|
||||
pathType = '$config->pathType';
|
||||
requestFix = '$config->requestFix';
|
||||
moduleVar = '$config->moduleVar';
|
||||
methodVar = '$config->methodVar';
|
||||
viewVar = '$config->viewVar';
|
||||
viewType = viewType ? viewType : '$defaultViewType';
|
||||
|
||||
vars = vars.split('&');
|
||||
for(i = 0; i < vars.length; i ++) vars[i] = vars[i].split('=');
|
||||
|
||||
if(requestType == 'PATH_INFO')
|
||||
{
|
||||
link += moduleName + requestFix + methodName;
|
||||
|
||||
if(pathType == "full")
|
||||
{
|
||||
for(i = 0; i < vars.length; i ++) link += requestFix + vars[i][0] + requestFix + vars[i][1];
|
||||
}
|
||||
else
|
||||
{
|
||||
for(i = 0; i < vars.length; i ++) link += requestFix + vars[i][1];
|
||||
}
|
||||
link += '.' + viewType;
|
||||
}
|
||||
else
|
||||
{
|
||||
link += '?' + moduleVar + '=' + moduleName + '&' + methodVar + '=' + methodName + '&' + viewVar + '=' + viewType;
|
||||
for(i = 0; i < vars.length; i ++) link += '&' + vars[i][0] + '=' + vars[i][1];
|
||||
}
|
||||
return link;
|
||||
}
|
||||
webRoot = '$config->webRoot';
|
||||
requestType = '$config->requestType';
|
||||
pathType = '$config->pathType';
|
||||
requestFix = '$config->requestFix';
|
||||
moduleVar = '$config->moduleVar';
|
||||
methodVar = '$config->methodVar';
|
||||
viewVar = '$config->viewVar';
|
||||
defaultView = '$defaultViewType';
|
||||
themeRoot = '$themeRoot';
|
||||
</script>
|
||||
|
||||
EOT;
|
||||
return $js;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<iframe frameborder='0' name='hiddenwin' id='hiddenwin' style='<?php if($config->debug) echo "display:block; margin:10px; width:90%; height:100px; border:1px solid #fff";?>' src='<?php echo $this->createLink('index', 'ping');?>'></iframe>
|
||||
<div id='footer' class='yui-d0'>
|
||||
powered by <a href='http://www.zentao.cn' target='_blank'>ZenTaoPMS</a> <span style='font-size:8px;'>(<?php echo $config->version, ' ', $config->svn->revision, ' ', $config->svn->lastDate ;?>)</span>.
|
||||
</div>
|
||||
<iframe frameborder='0' name='hiddenwin' id='hiddenwin' style='<?php if($config->debug) echo "display:block; margin:10px; width:90%; height:100px; border:1px solid #fff";?>' src='<?php echo $this->createLink('index', 'ping');?>'></iframe>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -13,34 +13,16 @@ $themeRoot = $webRoot . "theme/";
|
||||
if(isset($header['keyword'])) echo "<meta name='keywords' content='$header[keyword]'>\n";
|
||||
if(isset($header['desc'])) echo "<meta name='description' content='$header[desc]'>\n";
|
||||
?>
|
||||
<?php echo js::exportConfigVars();?>
|
||||
<script src="<?php echo $jsRoot;?>jquery/lib.js" type="text/javascript"></script>
|
||||
<script src="<?php echo $jsRoot;?>my.js" type="text/javascript"></script>
|
||||
<link rel='stylesheet' href='<?php echo $clientTheme . 'yui.css';?>' type='text/css' media='screen' />
|
||||
<link rel='stylesheet' href='<?php echo $clientTheme . 'style.css';?>' type='text/css' media='screen' />
|
||||
<script src="<?php echo $jsRoot;?>jquery/lib.js" type="text/javascript"></script>
|
||||
<?php echo js::exportLinkFunc();?>
|
||||
<script type="text/javascript">
|
||||
cssRoot = '<?php echo $themeRoot;?>';
|
||||
cssFile = '';
|
||||
if($.browser.msie && Math.floor(parseInt($.browser.version)) == 6)
|
||||
{
|
||||
cssFile = cssRoot + 'ie.6.css';
|
||||
}
|
||||
else if($.browser.mozilla)
|
||||
{
|
||||
cssFile = cssRoot + 'firefox.css';
|
||||
}
|
||||
if(cssFile != '')
|
||||
{
|
||||
document.write("<link rel='stylesheet' href='" + cssFile + "' type='text/css' media='screen' />");
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">loadFixedCSS();</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='topbar' class='yui-d0 yui-t6'>
|
||||
<div class='yui-main'>
|
||||
<div class='yui-b'>
|
||||
<?php printf($lang->welcome, $app->company->name);?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='yui-main'><div class='yui-b'><?php printf($lang->welcome, $app->company->name);?></div></div>
|
||||
<div class='yui-b a-right'>
|
||||
<?php if(isset($app->user)) echo $app->user->realname;?>
|
||||
<?php
|
||||
@@ -57,7 +39,6 @@ if(cssFile != '')
|
||||
<a href='http://www.zentao.cn' target='_blank'><?php echo $lang->zentaoSite;?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id='navbar' class='yui-d0'>
|
||||
<div id='mainmenu'>
|
||||
<ul>
|
||||
|
||||
45
trunk/www/js/my.js
Normal file
45
trunk/www/js/my.js
Normal file
@@ -0,0 +1,45 @@
|
||||
/* 根据不同的浏览器加载相应的修正样式表文件。*/
|
||||
function loadFixedCSS()
|
||||
{
|
||||
cssFile = '';
|
||||
if($.browser.msie && Math.floor(parseInt($.browser.version)) == 6)
|
||||
{
|
||||
cssFile = themeRoot + 'ie.6.css';
|
||||
}
|
||||
else if($.browser.mozilla)
|
||||
{
|
||||
cssFile = themeRoot + 'firefox.css';
|
||||
}
|
||||
if(cssFile != '')
|
||||
{
|
||||
document.write("<link rel='stylesheet' href='" + cssFile + "' type='text/css' media='screen' />");
|
||||
}
|
||||
}
|
||||
|
||||
/* JS版本的createLink。*/
|
||||
function createLink(moduleName, methodName, vars, viewType)
|
||||
{
|
||||
link = webRoot;
|
||||
if(!viewType) viewType = defaultView;
|
||||
vars = vars.split('&');
|
||||
for(i = 0; i < vars.length; i ++) vars[i] = vars[i].split('=');
|
||||
if(requestType == 'PATH_INFO')
|
||||
{
|
||||
link += moduleName + requestFix + methodName;
|
||||
if(pathType == "full")
|
||||
{
|
||||
for(i = 0; i < vars.length; i ++) link += requestFix + vars[i][0] + requestFix + vars[i][1];
|
||||
}
|
||||
else
|
||||
{
|
||||
for(i = 0; i < vars.length; i ++) link += requestFix + vars[i][1];
|
||||
}
|
||||
link += '.' + viewType;
|
||||
}
|
||||
else
|
||||
{
|
||||
link += '?' + moduleVar + '=' + moduleName + '&' + methodVar + '=' + methodName + '&' + viewVar + '=' + viewType;
|
||||
for(i = 0; i < vars.length; i ++) link += '&' + vars[i][0] + '=' + vars[i][1];
|
||||
}
|
||||
return link;
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
html{overflow:hidden;}
|
||||
body{height:100%;overflow:auto;}
|
||||
body{height:100%;width:100%; overflow:auto; overflow-y:scroll}
|
||||
div#footer{position:absolute;}
|
||||
|
||||
Reference in New Issue
Block a user