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'] = '';
$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);
$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');
@ -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['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']);
$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']))
{
$var['java_script'] = $class->java_script();
$var['app_java_script'] = $class->java_script();
}
unset($class);
}
if (isset($GLOBALS['phpgw_info']['flags']['css']))
{
$var['app_css'] .= $GLOBALS['phpgw_info']['flags']['css'];
}
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);
}

View File

@ -23,6 +23,7 @@
<xsl:variable name="navbar_format" select="navbar_format"/>
<xsl:variable name="app_tpl" select="app_tpl"/>
<xsl:variable name="current_app" select="current_app"/>
<xsl:variable name="webserver_url"><xsl:value-of select="webserver_url"/></xsl:variable>
<html>
<head>
<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="shortcut icon" href="favicon.ico"/>
<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="{$theme_css_file}"/>
<xsl:value-of disable-output-escaping="yes" select="java_script"/>
<xsl:choose>
<xsl:when test="app_css">
<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>--></xsl:text>
<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>
<body onLoad="{$onload}">
<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="shortcut icon" href="favicon.ico"/>
<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="{$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>
<body>
<!-- BEGIN top_part -->

View File

@ -41,18 +41,34 @@
<link rel="shortcut icon" href="favicon.ico"/>
<title><xsl:value-of select="website_title"/></title>
<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="{$theme_css_file}"/>
<xsl:value-of disable-output-escaping="yes" select="java_script"/>
<xsl:choose>
<xsl:when test="app_css">
<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>--></xsl:text>
<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>
<body onLoad="{$onload}">
<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(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>
<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>
<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="{$theme_css_file}"/>
<xsl:value-of disable-output-escaping="yes" select="java_script"/>
<xsl:choose>
<xsl:when test="app_css">
<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>--></xsl:text>
<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>
<body onLoad="init();">
<table width="100%" height="100%" cellspacing="0" cellpadding="0">

View File

@ -1,51 +1,75 @@
var myNavBar1 = new NavBar(0);
var dhtmlMenu;
//define menu items (first parameter of NavBarMenu specifies main category width, second specifies sub category width in pixels)
//add more menus simply by adding more "blocks" of same code below
var myNavBar1 = new NavBar(0);
var dhtmlMenu;
//define menu items (first parameter of NavBarMenu specifies main category width, second specifies sub category width in pixels)
//add more menus simply by adding more "blocks" of same code below
dhtmlMenu = new NavBarMenu(60, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Home", "{home}"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(60, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Home", "{home}"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(60, 140);
dhtmlMenu.addItem(new NavBarMenuItem("Edit", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Add new Appointment", "{appt}"));
dhtmlMenu.addItem(new NavBarMenuItem("Add new Todo", "{todo}"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(60, 140);
dhtmlMenu.addItem(new NavBarMenuItem("Edit", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Add new Appointment", "{appt}"));
dhtmlMenu.addItem(new NavBarMenuItem("Add new Todo", "{todo}"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(125, 140);
dhtmlMenu.addItem(new NavBarMenuItem("Preferences", ""));
dhtmlMenu.addItem(new NavBarMenuItem("General", "{prefs}"));
dhtmlMenu.addItem(new NavBarMenuItem("Email", "{email}"));
dhtmlMenu.addItem(new NavBarMenuItem("Calendar", "{calendar}"));
dhtmlMenu.addItem(new NavBarMenuItem("Addressbook", "{addressbook}"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(125, 140);
dhtmlMenu.addItem(new NavBarMenuItem("Preferences", ""));
dhtmlMenu.addItem(new NavBarMenuItem("General", "{prefs}"));
dhtmlMenu.addItem(new NavBarMenuItem("Email", "{email}"));
dhtmlMenu.addItem(new NavBarMenuItem("Calendar", "{calendar}"));
dhtmlMenu.addItem(new NavBarMenuItem("Addressbook", "{addressbook}"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(62, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Help", ""));
dhtmlMenu.addItem(new NavBarMenuItem("General", ""));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(62, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Help", ""));
dhtmlMenu.addItem(new NavBarMenuItem("General", ""));
myNavBar1.addMenu(dhtmlMenu);
//set menu colors
myNavBar1.setColors("#343434", "#eeeeee", "#60707C", "#ffffff", "#888888", "#eeeeee", "#60707C", "#ffffff", "#777777")
myNavBar1.setFonts("Verdana", "Normal", "Normal", "10pt", "Verdana", "Normal", "Normal", "10pt");
//set menu colors
myNavBar1.setColors("#343434", "#eeeeee", "#60707C", "#ffffff", "#888888", "#eeeeee", "#60707C", "#ffffff", "#777777")
myNavBar1.setFonts("Verdana", "Normal", "Normal", "10pt", "Verdana", "Normal", "Normal", "10pt");
//uncomment below line to center the menu (valid values are "left", "center", and "right"
//myNavBar1.setAlign("center")
//uncomment below line to center the menu (valid values are "left", "center", and "right"
//myNavBar1.setAlign("center")
var fullWidth;
var fullWidth;
function init()
{
//Get width of window, need to account for scrollbar width in Netscape.
function init()
{
//Get width of window, need to account for scrollbar width in Netscape.
fullWidth = getWindowWidth()
- (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0);
fullWidth = getWindowWidth()
- (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0);
myNavBar1.moveTo(10,36);
myNavBar1.resize(500 /*fullWidth*/);
myNavBar1.setSizes(0,1,1);
myNavBar1.create();
myNavBar1.setzIndex(2);
}
myNavBar1.moveTo(10,36);
myNavBar1.resize(500 /*fullWidth*/);
myNavBar1.setSizes(0,1,1);
myNavBar1.create();
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="app_tpl" select="app_tpl"/>
<xsl:variable name="current_app" select="current_app"/>
<xsl:variable name="webserver_url"><xsl:value-of select="webserver_url"/></xsl:variable>
<html>
<head>
<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="shortcut icon" href="favicon.ico"/>
<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="{$theme_css_file}"/>
<xsl:value-of disable-output-escaping="yes" select="java_script"/>
<xsl:choose>
<xsl:when test="app_css">
<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>--></xsl:text>
<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>
<body>
<table width="100%" height="100%" cellspacing="0" cellpadding="0">