[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php, 1.123.2.9.2.1
From: |
Dave Hall <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php, 1.123.2.9.2.12, 1.123.2.9.2.13 |
Date: |
Mon, 25 Aug 2003 21:42:18 -0400 |
Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv22909
Modified Files:
Tag: Version-0_9_16-branch
class.common.inc.php
Log Message:
new js support code
Index: class.common.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.common.inc.php,v
retrieving revision 1.123.2.9.2.12
retrieving revision 1.123.2.9.2.13
diff -C2 -r1.123.2.9.2.12 -r1.123.2.9.2.13
*** class.common.inc.php 9 Aug 2003 14:28:00 -0000 1.123.2.9.2.12
--- class.common.inc.php 26 Aug 2003 01:42:16 -0000 1.123.2.9.2.13
***************
*** 382,385 ****
--- 382,386 ----
{
$this->debug_info[] = 'check_owner() is a depreciated
function - use ACL instead';
+ /*
$s = '<a href="' .
$GLOBALS['phpgw']->link($link,$extravars) . '"> ' . lang($label) . ' </a>';
if (ereg('^[0-9]+$',$record))
***************
*** 399,402 ****
--- 400,404 ----
return $s;
+ */
}
***************
*** 666,672 ****
}
! /*!
! @function list_templates
! @abstract list available templates
*/
function list_templates()
--- 668,675 ----
}
! /**
! * List available templates
! *
! * @returns array alphabetically sorted list of templates
*/
function list_templates()
***************
*** 675,679 ****
while ($entry=$d->read())
{
! if ($entry != 'CVS' && $entry != '.' && $entry
!= '..' && $entry != 'phpgw_website' && is_dir(PHPGW_SERVER_ROOT .
'/phpgwapi/templates/' . $entry))
{
$list[$entry]['name'] = $entry;
--- 678,684 ----
while ($entry=$d->read())
{
! if ($entry != 'CVS' && $entry != '.' && $entry
!= '..'
! && $entry != 'phpgw_website'
! && is_dir(PHPGW_SERVER_ROOT .
'/phpgwapi/templates/' . $entry))
{
$list[$entry]['name'] = $entry;
***************
*** 691,695 ****
}
$d->close();
! reset ($list);
return $list;
}
--- 696,700 ----
}
$d->close();
! ksort($list);
return $list;
}
***************
*** 1123,1126 ****
--- 1128,1140 ----
}
+ /**
+ * Used by template headers for including CSS in the header
+ *
+ * This first loads up the basic global CSS definitions, which
support
+ * the selected user theme colors. Next we load up the app CSS.
This is
+ * all merged into the selected theme's css.tpl file.
+ *
+ * @author Dave Hall (*based* on verdilak? css inclusion code)
+ */
function get_css()
{
***************
*** 1129,1157 ****
$tpl->set_var($GLOBALS['phpgw_info']['theme']);
$app_css = '';
! if(@isset($GLOBALS['HTTP_GET_VARS']['menuaction']))
! {
! list($app,$class,$method) =
explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']);
! if(is_array($GLOBALS[$class]->public_functions) &&
$GLOBALS[$class]->public_functions['css'])
! {
! $app_css .= $GLOBALS[$class]->css();
! }
! if(is_array($GLOBALS[$class]->public_functions) &&
$GLOBALS[$class]->public_functions['java_script'])
! {
! $java_script = $GLOBALS[$class]->java_script();
! }
! }
! if (isset($GLOBALS['phpgw_info']['flags']['css']))
! {
! $app_css .= $GLOBALS['phpgw_info']['flags']['css'];
! }
$tpl->set_var('app_css', $app_css);
return $tpl->subst('css');
}
function hex2bin($data)
{
$len = strlen($data);
! return pack('H' . $len, $data);
}
--- 1143,1203 ----
$tpl->set_var($GLOBALS['phpgw_info']['theme']);
$app_css = '';
! if(@isset($_GET['menuaction']))
! {
! list($app,$class,$method) =
explode('.',$_GET['menuaction']);
! if(is_array($GLOBALS[$class]->public_functions)
! &&
$GLOBALS[$class]->public_functions['css'])
! {
! $app_css .= $GLOBALS[$class]->css();
! }
! }
! if (isset($GLOBALS['phpgw_info']['flags']['css']))
! {
! $app_css .=
$GLOBALS['phpgw_info']['flags']['css'];
! }
$tpl->set_var('app_css', $app_css);
return $tpl->subst('css');
}
+ /**
+ * Used by the template headers for including javascript in the
header
+ *
+ * The method is included here to make it easier to change the
js support
+ * in phpgw. One change then all templates will support it (as
long as they
+ * include a call to this method).
+ *
+ * @author Dave Hall (*vaguely based* on verdilak? css inclusion
code)
+ * @return string the javascript to be included
+ */
+ function get_java_script()
+ {
+ $java_script = '';
+ if(@is_object($GLOBALS['phpgw']->js))
+ {
+ $java_script .=
$GLOBALS['phpgw']->js->get_script_links();
+ }
+
+ if(@isset($_GET['menuaction']))
+ {
+ list($app,$class,$method) =
explode('.',$_GET['menuaction']);
+ if(is_array($GLOBALS[$class]->public_functions)
+ &&
$GLOBALS[$class]->public_functions['java_script'])
+ {
+ $java_script .=
$GLOBALS[$class]->java_script();
+ }
+ }
+ //you never know - best to protect the stupid ;)
+ if
(isset($GLOBALS['phpgw_info']['flags']['java_script']))
+ {
+ $java_script .=
$GLOBALS['phpgw_info']['flags']['java_script'] . "\n";
+ }
+ return $java_script;
+ }
+
function hex2bin($data)
{
$len = strlen($data);
! return @pack('H' . $len, $data);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php, 1.123.2.9.2.12, 1.123.2.9.2.13,
Dave Hall <address@hidden> <=