update js and css

This commit is contained in:
ceb 2003-04-24 01:34:44 +00:00
parent 91757ddabd
commit ded88a0790
9 changed files with 237 additions and 59 deletions

View File

@ -1322,12 +1322,10 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
$var['app_tpl'] = ''; $var['app_tpl'] = '';
$menuaction = get_var('menuaction',Array('GET')); $menuaction = get_var('menuaction',Array('GET'));
if ($menuaction && $GLOBALS['phpgw_info']['flags']['xslt_app']) if ($menuaction && isset($GLOBALS['phpgw_info']['flags']['xslt_app']))
{ {
list($app,$class,$method) = explode('.',$menuaction); list($app,$class,$method) = explode('.',$menuaction);
$var['app_tpl'] = $method; $var['app_tpl'] = $method;
//$app_function = strrchr($menuaction,'.');
//$var['app_tpl'] = substr($app_function,1,strlen($app_function));
} }
$var['lang_powered_by'] = lang('powered by'); $var['lang_powered_by'] = lang('powered by');
@ -1341,8 +1339,10 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
{ {
$var['app_header'] = $GLOBALS['phpgw_info']['flags']['app_header']; $var['app_header'] = $GLOBALS['phpgw_info']['flags']['app_header'];
} }
$var['java_script'] = $var['app_css'] = '';
if (isset($_GET['menuaction'])) $var['app_java_script'] = $var['app_css'] = $var['app_java_script_url'] = $var['app_css_url'] = '';
if (isset($_GET['menuaction']) && isset($GLOBALS['phpgw_info']['flags']['etemplate_app']))
{ {
list($app,$class,$method) = explode('.',$_GET['menuaction']); list($app,$class,$method) = explode('.',$_GET['menuaction']);
$class = CreateObject("$app.$class"); $class = CreateObject("$app.$class");
@ -1352,18 +1352,29 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
} }
if (isset($class->public_functions['java_script'])) if (isset($class->public_functions['java_script']))
{ {
$var['java_script'] = $class->java_script(); $var['app_java_script'] = $class->java_script();
} }
unset($class); unset($class);
} }
if (isset($GLOBALS['phpgw_info']['flags']['css'])) if (isset($GLOBALS['phpgw_info']['flags']['css']))
{ {
$var['app_css'] .= $GLOBALS['phpgw_info']['flags']['css']; $var['app_css'] .= $GLOBALS['phpgw_info']['flags']['css'];
} }
if (isset($GLOBALS['phpgw_info']['flags']['java_script'])) if (isset($GLOBALS['phpgw_info']['flags']['java_script']))
{ {
$var['java_script'] .= $GLOBALS['phpgw_info']['flags']['java_script']; $var['app_java_script'] .= $GLOBALS['phpgw_info']['flags']['java_script'];
} }
if (isset($GLOBALS['phpgw_info']['flags']['css_url']))
{
$var['app_css_url'] = $GLOBALS['phpgw_info']['flags']['css_url'];
}
if (isset($GLOBALS['phpgw_info']['flags']['java_script_url']))
{
$var['app_java_script_url'] = $GLOBALS['phpgw_info']['flags']['java_script_url'];
}
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',$var); $GLOBALS['phpgw']->xslttpl->set_var('phpgw',$var);
} }

View File

@ -23,6 +23,7 @@
<xsl:variable name="navbar_format" select="navbar_format"/> <xsl:variable name="navbar_format" select="navbar_format"/>
<xsl:variable name="app_tpl" select="app_tpl"/> <xsl:variable name="app_tpl" select="app_tpl"/>
<xsl:variable name="current_app" select="current_app"/> <xsl:variable name="current_app" select="current_app"/>
<xsl:variable name="webserver_url"><xsl:value-of select="webserver_url"/></xsl:variable>
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset={$charset}"/> <meta http-equiv="Content-Type" content="text/html; charset={$charset}"/>
@ -33,18 +34,35 @@
<link rel="icon" href="favicon.ico" type="image/x-ico"/> <link rel="icon" href="favicon.ico" type="image/x-ico"/>
<link rel="shortcut icon" href="favicon.ico"/> <link rel="shortcut icon" href="favicon.ico"/>
<title><xsl:value-of select="website_title"/></title> <title><xsl:value-of select="website_title"/></title>
<script type="text/javascript" language="javascript" src="{$webserver_url}/phpgwapi/templates/default/scripts.js"></script>
<xsl:choose>
<xsl:when test="app_java_script != ''">
<xsl:value-of disable-output-escaping="yes" select="app_java_script"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="app_java_script_url != ''">
<xsl:variable name="app_java_script_url" select="app_java_script_url"/>
<script type="text/javascript" language="javascript" src="{$webserver_url}/{$current_app}/templates/{$app_java_script_url}"></script>
</xsl:when>
</xsl:choose>
<link rel="stylesheet" type="text/css" href="{$phpgw_css_file}"/> <link rel="stylesheet" type="text/css" href="{$phpgw_css_file}"/>
<link rel="stylesheet" type="text/css" href="{$theme_css_file}"/> <link rel="stylesheet" type="text/css" href="{$theme_css_file}"/>
<xsl:value-of disable-output-escaping="yes" select="java_script"/>
<xsl:choose> <xsl:choose>
<xsl:when test="app_css"> <xsl:when test="app_css != ''">
<style type="text/css"> <style type="text/css">
<xsl:text>&lt;!--</xsl:text> <xsl:text>&lt;!--</xsl:text>
<xsl:value-of disable-output-escaping="yes" select="app_css"/> <xsl:value-of disable-output-escaping="yes" select="app_css"/>
<xsl:text>--></xsl:text> <xsl:text>--&gt;</xsl:text>
</style> </style>
</xsl:when> </xsl:when>
</xsl:choose> </xsl:choose>
<xsl:choose>
<xsl:when test="app_css_url != ''">
<xsl:variable name="app_css_url" select="app_css_url"/>
<link rel="stylesheet" type="text/css" href="{$webserver_url}/{$current_app}/templates/{$app_css_url}"/>
</xsl:when>
</xsl:choose>
</head> </head>
<body onLoad="{$onload}"> <body onLoad="{$onload}">
<table width="100%" height="100%" cellspacing="0" cellpadding="0"> <table width="100%" height="100%" cellspacing="0" cellpadding="0">

View File

@ -0,0 +1,24 @@
var popupw;
function openwindow(url,width,height)
{
if (popupw)
{
if (popupw.closed)
{
popupw.stop;
popupw.close;
}
}
popupw = window.open(url, "popupWindow","width=" + width + ",height=" + height + ",location=no,menubar=no,directories=no,toolbar=no,scrollbars=yes,resizable=yes,status=no");
if (popupw.opener == null)
{
popupw.opener = window;
}
}
function done()
{
popupw.close()
}

View File

@ -35,8 +35,35 @@
<link rel="icon" href="favicon.ico" type="image/x-ico"/> <link rel="icon" href="favicon.ico" type="image/x-ico"/>
<link rel="shortcut icon" href="favicon.ico"/> <link rel="shortcut icon" href="favicon.ico"/>
<title><xsl:value-of select="website_title"/></title> <title><xsl:value-of select="website_title"/></title>
<script type="text/javascript" language="javascript" src="{$webserver_url}/phpgwapi/templates/default/scripts.js"></script>
<xsl:choose>
<xsl:when test="app_java_script != ''">
<xsl:value-of disable-output-escaping="yes" select="app_java_script"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="app_java_script_url != ''">
<xsl:variable name="app_java_script_url" select="app_java_script_url"/>
<script type="text/javascript" language="javascript" src="{$webserver_url}/{$current_app}/templates/{$app_java_script_url}"></script>
</xsl:when>
</xsl:choose>
<link rel="stylesheet" type="text/css" href="{$phpgw_css_file}"/> <link rel="stylesheet" type="text/css" href="{$phpgw_css_file}"/>
<link rel="stylesheet" type="text/css" href="{$theme_css_file}"/> <link rel="stylesheet" type="text/css" href="{$theme_css_file}"/>
<xsl:choose>
<xsl:when test="app_css != ''">
<style type="text/css">
<xsl:text>&lt;!--</xsl:text>
<xsl:value-of disable-output-escaping="yes" select="app_css"/>
<xsl:text>--&gt;</xsl:text>
</style>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="app_css_url != ''">
<xsl:variable name="app_css_url" select="app_css_url"/>
<link rel="stylesheet" type="text/css" href="{$webserver_url}/{$current_app}/templates/{$app_css_url}"/>
</xsl:when>
</xsl:choose>
</head> </head>
<body> <body>
<!-- BEGIN top_part --> <!-- BEGIN top_part -->

View File

@ -41,18 +41,34 @@
<link rel="shortcut icon" href="favicon.ico"/> <link rel="shortcut icon" href="favicon.ico"/>
<title><xsl:value-of select="website_title"/></title> <title><xsl:value-of select="website_title"/></title>
<script type="text/javascript" language="javascript" src="{$webserver_url}/phpgwapi/templates/idsociety/scripts.js"></script> <script type="text/javascript" language="javascript" src="{$webserver_url}/phpgwapi/templates/idsociety/scripts.js"></script>
<xsl:choose>
<xsl:when test="app_java_script != ''">
<xsl:value-of disable-output-escaping="yes" select="app_java_script"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="app_java_script_url != ''">
<xsl:variable name="app_java_script_url" select="app_java_script_url"/>
<script type="text/javascript" language="javascript" src="{$webserver_url}/{$current_app}/templates/{$app_java_script_url}"></script>
</xsl:when>
</xsl:choose>
<link rel="stylesheet" type="text/css" href="{$phpgw_css_file}"/> <link rel="stylesheet" type="text/css" href="{$phpgw_css_file}"/>
<link rel="stylesheet" type="text/css" href="{$theme_css_file}"/> <link rel="stylesheet" type="text/css" href="{$theme_css_file}"/>
<xsl:value-of disable-output-escaping="yes" select="java_script"/>
<xsl:choose> <xsl:choose>
<xsl:when test="app_css"> <xsl:when test="app_css != ''">
<style type="text/css"> <style type="text/css">
<xsl:text>&lt;!--</xsl:text> <xsl:text>&lt;!--</xsl:text>
<xsl:value-of disable-output-escaping="yes" select="app_css"/> <xsl:value-of disable-output-escaping="yes" select="app_css"/>
<xsl:text>--></xsl:text> <xsl:text>--&gt;</xsl:text>
</style> </style>
</xsl:when> </xsl:when>
</xsl:choose> </xsl:choose>
<xsl:choose>
<xsl:when test="app_css_url != ''">
<xsl:variable name="app_css_url" select="app_css_url"/>
<link rel="stylesheet" type="text/css" href="{$webserver_url}/{$current_app}/templates/{$app_css_url}"/>
</xsl:when>
</xsl:choose>
</head> </head>
<body onLoad="{$onload}"> <body onLoad="{$onload}">
<table width="100%" height="100%" cellspacing="0" cellpadding="0"> <table width="100%" height="100%" cellspacing="0" cellpadding="0">

View File

@ -60,3 +60,27 @@
if(right_doc != null){ parent.right.location.href=right_doc; } if(right_doc != null){ parent.right.location.href=right_doc; }
if(bottom_doc != null){ parent.bottom.location.href=bottom_doc; } if(bottom_doc != null){ parent.bottom.location.href=bottom_doc; }
} }
var popupw;
function openwindow(url,width,height)
{
if (popupw)
{
if (popupw.closed)
{
popupw.stop;
popupw.close;
}
}
popupw = window.open(url, "popupWindow","width=" + width + ",height=" + height + ",location=no,menubar=no,directories=no,toolbar=no,scrollbars=yes,resizable=yes,status=no");
if (popupw.opener == null)
{
popupw.opener = window;
}
}
function done()
{
popupw.close()
}

View File

@ -37,18 +37,34 @@
<title><xsl:value-of select="website_title"/></title> <title><xsl:value-of select="website_title"/></title>
<script type="text/javascript" language="javascript" src="{$webserver_url}/phpgwapi/templates/justweb/navcond.js"></script> <script type="text/javascript" language="javascript" src="{$webserver_url}/phpgwapi/templates/justweb/navcond.js"></script>
<script type="text/javascript" language="javascript" src="{$webserver_url}/phpgwapi/templates/justweb/scripts.js"></script> <script type="text/javascript" language="javascript" src="{$webserver_url}/phpgwapi/templates/justweb/scripts.js"></script>
<xsl:choose>
<xsl:when test="app_java_script != ''">
<xsl:value-of disable-output-escaping="yes" select="app_java_script"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="app_java_script_url != ''">
<xsl:variable name="app_java_script_url" select="app_java_script_url"/>
<script type="text/javascript" language="javascript" src="{$webserver_url}/{$current_app}/templates/{$app_java_script_url}"></script>
</xsl:when>
</xsl:choose>
<link rel="stylesheet" type="text/css" href="{$phpgw_css_file}"/> <link rel="stylesheet" type="text/css" href="{$phpgw_css_file}"/>
<link rel="stylesheet" type="text/css" href="{$theme_css_file}"/> <link rel="stylesheet" type="text/css" href="{$theme_css_file}"/>
<xsl:value-of disable-output-escaping="yes" select="java_script"/>
<xsl:choose> <xsl:choose>
<xsl:when test="app_css"> <xsl:when test="app_css != ''">
<style type="text/css"> <style type="text/css">
<xsl:text>&lt;!--</xsl:text> <xsl:text>&lt;!--</xsl:text>
<xsl:value-of disable-output-escaping="yes" select="app_css"/> <xsl:value-of disable-output-escaping="yes" select="app_css"/>
<xsl:text>--></xsl:text> <xsl:text>--&gt;</xsl:text>
</style> </style>
</xsl:when> </xsl:when>
</xsl:choose> </xsl:choose>
<xsl:choose>
<xsl:when test="app_css_url != ''">
<xsl:variable name="app_css_url" select="app_css_url"/>
<link rel="stylesheet" type="text/css" href="{$webserver_url}/{$current_app}/templates/{$app_css_url}"/>
</xsl:when>
</xsl:choose>
</head> </head>
<body onLoad="init();"> <body onLoad="init();">
<table width="100%" height="100%" cellspacing="0" cellpadding="0"> <table width="100%" height="100%" cellspacing="0" cellpadding="0">

View File

@ -49,3 +49,27 @@
myNavBar1.create(); myNavBar1.create();
myNavBar1.setzIndex(2); myNavBar1.setzIndex(2);
} }
var popupw;
function openwindow(url,width,height)
{
if (popupw)
{
if (popupw.closed)
{
popupw.stop;
popupw.close;
}
}
popupw = window.open(url,"popupWindow","width=" + width + ",height=" + height + ",location=no,menubar=no,directories=no,toolbar=no,scrollbars=yes,resizable=yes,status=no");
if (popupw.opener == null)
{
popupw.opener = window;
}
}
function done()
{
popupw.close()
}

View File

@ -25,6 +25,7 @@
<xsl:variable name="phpgw_statustext" select="lang_phpgw_statustext"/> <xsl:variable name="phpgw_statustext" select="lang_phpgw_statustext"/>
<xsl:variable name="app_tpl" select="app_tpl"/> <xsl:variable name="app_tpl" select="app_tpl"/>
<xsl:variable name="current_app" select="current_app"/> <xsl:variable name="current_app" select="current_app"/>
<xsl:variable name="webserver_url"><xsl:value-of select="webserver_url"/></xsl:variable>
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset={$charset}"/> <meta http-equiv="Content-Type" content="text/html; charset={$charset}"/>
@ -35,18 +36,35 @@
<link rel="icon" href="favicon.ico" type="image/x-ico"/> <link rel="icon" href="favicon.ico" type="image/x-ico"/>
<link rel="shortcut icon" href="favicon.ico"/> <link rel="shortcut icon" href="favicon.ico"/>
<title><xsl:value-of select="website_title"/></title> <title><xsl:value-of select="website_title"/></title>
<script type="text/javascript" language="javascript" src="{$webserver_url}/phpgwapi/templates/default/scripts.js"></script>
<xsl:choose>
<xsl:when test="app_java_script != ''">
<xsl:value-of disable-output-escaping="yes" select="app_java_script"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="app_java_script_url != ''">
<xsl:variable name="app_java_script_url" select="app_java_script_url"/>
<script type="text/javascript" language="javascript" src="{$webserver_url}/{$current_app}/templates/{$app_java_script_url}"></script>
</xsl:when>
</xsl:choose>
<link rel="stylesheet" type="text/css" href="{$phpgw_css_file}"/> <link rel="stylesheet" type="text/css" href="{$phpgw_css_file}"/>
<link rel="stylesheet" type="text/css" href="{$theme_css_file}"/> <link rel="stylesheet" type="text/css" href="{$theme_css_file}"/>
<xsl:value-of disable-output-escaping="yes" select="java_script"/>
<xsl:choose> <xsl:choose>
<xsl:when test="app_css"> <xsl:when test="app_css != ''">
<style type="text/css"> <style type="text/css">
<xsl:text>&lt;!--</xsl:text> <xsl:text>&lt;!--</xsl:text>
<xsl:value-of disable-output-escaping="yes" select="app_css"/> <xsl:value-of disable-output-escaping="yes" select="app_css"/>
<xsl:text>--></xsl:text> <xsl:text>--&gt;</xsl:text>
</style> </style>
</xsl:when> </xsl:when>
</xsl:choose> </xsl:choose>
<xsl:choose>
<xsl:when test="app_css_url != ''">
<xsl:variable name="app_css_url" select="app_css_url"/>
<link rel="stylesheet" type="text/css" href="{$webserver_url}/{$current_app}/templates/{$app_css_url}"/>
</xsl:when>
</xsl:choose>
</head> </head>
<body> <body>
<table width="100%" height="100%" cellspacing="0" cellpadding="0"> <table width="100%" height="100%" cellspacing="0" cellpadding="0">