[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/inc class.jscalendar.inc.php
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] phpgwapi/inc class.jscalendar.inc.php |
Date: |
Mon, 27 Nov 2006 05:43:30 +0000 |
CVSROOT: /sources/phpgwapi
Module name: phpgwapi
Changes by: Dave Hall <skwashd> 06/11/27 05:43:30
Modified files:
inc : class.jscalendar.inc.php
Log message:
fix adding JS to <head> notices and docs
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.jscalendar.inc.php?cvsroot=phpgwapi&r1=1.12&r2=1.13
Patches:
Index: class.jscalendar.inc.php
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/inc/class.jscalendar.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- class.jscalendar.inc.php 3 Sep 2006 06:15:27 -0000 1.12
+++ class.jscalendar.inc.php 27 Nov 2006 05:43:30 -0000 1.13
@@ -7,7 +7,7 @@
* @license http://www.fsf.org/licenses/gpl.html GNU General Public
License
* @package phpgwapi
* @subpackage gui
- * @version $Id: class.jscalendar.inc.php,v 1.12 2006/09/03 06:15:27
skwashd Exp $
+ * @version $Id: class.jscalendar.inc.php,v 1.13 2006/11/27 05:43:30
skwashd Exp $
*/
/**
@@ -35,15 +35,23 @@
$this->phpgw_js_url =
$GLOBALS['phpgw_info']['server']['webserver_url'].'/phpgwapi/js';
$this->dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
- if ($do_header && isset($GLOBALS['phpgw_info']['flags']['css'])
- &&
!strstr($GLOBALS['phpgw_info']['flags']['css'],'jscalendar'))
+ if ($do_header &&
(!isset($GLOBALS['phpgw_info']['flags']['css']) ||
+ (isset($GLOBALS['phpgw_info']['flags']['css']) &&
!strstr($GLOBALS['phpgw_info']['flags']['css'],'jscalendar') ) ) )
{
+ if ( !isset($GLOBALS['phpgw_info']['flags']['css']) )
+ {
+ $GLOBALS['phpgw_info']['flags']['css'] = '';
+ }
$GLOBALS['phpgw_info']['flags']['css'] .=
"-->\n</style>\n"
. '<link rel="stylesheet" type="text/css"
media="all" href="'
. $this->phpgw_js_url
. '/jscalendar/calendar-win2k-cold-1.css"
title="win2k-cold-1" />'
. "\n<style type=\"text/css\">\n<!--\n";
+ if (
!isset($GLOBALS['phpgw_info']['flags']['java_script']) )
+ {
+ $GLOBALS['phpgw_info']['flags']['java_script']
= '';
+ }
$GLOBALS['phpgw_info']['flags']['java_script'] .= "\n"
. '<script type="text/javascript" src="'
.
$GLOBALS['phpgw']->link('/phpgwapi/js/jscalendar/jscalendar-setup.php')
@@ -124,6 +132,12 @@
}
+ /**
+ * Render the text box and trigger icon
+ *
+ * @deprecated
+ * @access private
+ */
function _input_legacy($name, $date, $year, $month, $day, $helpmsg,
$options)
{
//echo "<p>jscalendar::input(name='$name',
date='$date'='".date('Y-m-d',$date)."', year='$year', month='$month',
day='$day')</p>\n";
@@ -159,9 +173,15 @@
';
}
- function _input_modern($name)
+ /**
+ * Add an event listener to the trigger icon - used for XSLT
+ *
+ * @access private
+ * @param string $name the element ID
+ */
+ function _input_modern($id)
{
- $GLOBALS['phpgw']->js->add_event('load',
"Calendar.setup({inputField : '$name', button : '{$name}-trigger'});");
+ $GLOBALS['phpgw']->js->add_event('load',
"Calendar.setup({inputField : '$id', button : '{$id}-trigger'});");
}
}
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] phpgwapi/inc class.jscalendar.inc.php,
Dave Hall <=