[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: etemplate/inc class.uietemplate.inc.php,1.56,1.5
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: etemplate/inc class.uietemplate.inc.php,1.56,1.57 |
Date: |
Mon, 21 Apr 2003 04:43:23 -0400 |
Update of /cvsroot/phpgroupware/etemplate/inc
In directory subversions:/tmp/cvs-serv8014
Modified Files:
class.uietemplate.inc.php
Log Message:
use new facility to include java_script in the html head-tag
Index: class.uietemplate.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.uietemplate.inc.php,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -r1.56 -r1.57
*** class.uietemplate.inc.php 13 Apr 2003 21:47:03 -0000 1.56
--- class.uietemplate.inc.php 21 Apr 2003 08:43:20 -0000 1.57
***************
*** 67,74 ****
function location($vars='')
{
! Header('Location: ' . $this->html->link(is_array($vars)
? '/index.php' : $vars,
! is_array($vars) ? $vars : ''));
!
! $GLOBALS['phpgw']->common->phpgw_exit();
}
--- 67,72 ----
function location($vars='')
{
! $GLOBALS['phpgw']->redirect_link(is_array($vars) ?
'/index.php' : $vars,
! is_array($vars) ? $vars : '');
}
***************
*** 111,114 ****
--- 109,117 ----
$changes = array();
}
+ if (isset($content['app_header']))
+ {
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
$content['app_header'];
+ }
+ $html = '';
if ($this->stable)
{
***************
*** 116,121 ****
--- 119,129 ----
if
(address@hidden'phpgw_info']['etemplate']['hooked'])
{
+
$GLOBALS['phpgw_info']['flags']['java_script'] = $this->include_java_script(2);
$GLOBALS['phpgw']->common->phpgw_header();
}
+ else
+ {
+ $html = $this->include_java_script(2);
// better than nothing
+ }
}
else
***************
*** 123,126 ****
--- 131,135 ----
$hooked =
$GLOBALS['phpgw']->xslttpl->get_var('phpgw');
$hooked = $hooked['body_data'];
+
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('java_script' =>
$this->include_java_script(2)));
}
if ($GLOBALS['phpgw_info']['flags']['currentapp'] !=
'etemplate')
***************
*** 133,137 ****
$GLOBALS['phpgw_info']['etemplate']['to_process'] =
array();
$html .= ($this->stable ?
$this->html->themeStyles()."\n\n" : ''). // so they get included once
! $this->html->form($this->include_java_script() .
$this->show($this->complete_array_merge($content,$changes),$sel_options,$readonlys,'exec'),array(
'etemplate_exec_id' => $id,
--- 142,146 ----
$GLOBALS['phpgw_info']['etemplate']['to_process'] =
array();
$html .= ($this->stable ?
$this->html->themeStyles()."\n\n" : ''). // so they get included once
! $this->html->form($this->include_java_script(1).
$this->show($this->complete_array_merge($content,$changes),$sel_options,$readonlys,'exec'),array(
'etemplate_exec_id' => $id,
***************
*** 1015,1023 ****
@author ralfbecker
@abstract returns the javascript to be included by exec
*/
! function include_java_script()
{
// this is to test if javascript is enabled
! if
(!isset($GLOBALS['phpgw_info']['etemplate']['java_script']))
{
$js = '<script language="javascript">
--- 1024,1034 ----
@author ralfbecker
@abstract returns the javascript to be included by exec
+ @param $what &1 = returns the test, note: has to be included in
the body, not the header\
+ &2 = returns the common functions, best to be included
in the header
*/
! function include_java_script($what = 3)
{
// this is to test if javascript is enabled
! if ($what & 1 &&
!isset($GLOBALS['phpgw_info']['etemplate']['java_script']))
{
$js = '<script language="javascript">
***************
*** 1031,1035 ****
// here are going all the necesarry functions if
javascript is enabled
! if ($this->java_script(True))
{
$js .= "<script language=\"JavaScript\">
--- 1042,1046 ----
// here are going all the necesarry functions if
javascript is enabled
! if ($what & 2 && $this->java_script(True))
{
$js .= "<script language=\"JavaScript\">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: etemplate/inc class.uietemplate.inc.php,1.56,1.57,
Ralf Becker <address@hidden> <=