[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property inc/class.uiproject.inc.php inc/class....
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property inc/class.uiproject.inc.php inc/class.... |
Date: |
Thu, 04 Jan 2007 14:36:17 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Changes by: Sigurd Nes <sigurdne> 07/01/04 14:36:16
Modified files:
inc : class.uiproject.inc.php class.uirequest.inc.php
class.uiworkorder.inc.php
templates/base : date_search.xsl project.xsl request.xsl
workorder.xsl
Log message:
jscalendar
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiproject.inc.php?cvsroot=phpgroupware&r1=1.47&r2=1.48
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uirequest.inc.php?cvsroot=phpgroupware&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiworkorder.inc.php?cvsroot=phpgroupware&r1=1.38&r2=1.39
http://cvs.savannah.gnu.org/viewcvs/property/templates/base/date_search.xsl?cvsroot=phpgroupware&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/property/templates/base/project.xsl?cvsroot=phpgroupware&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/property/templates/base/request.xsl?cvsroot=phpgroupware&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/property/templates/base/workorder.xsl?cvsroot=phpgroupware&r1=1.9&r2=1.10
Patches:
Index: inc/class.uiproject.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiproject.inc.php,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- inc/class.uiproject.inc.php 4 Jan 2007 12:04:02 -0000 1.47
+++ inc/class.uiproject.inc.php 4 Jan 2007 14:36:16 -0000 1.48
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.uiproject.inc.php,v 1.47 2007/01/04 12:04:02
sigurdne Exp $
+ * @version $Id: class.uiproject.inc.php,v 1.48 2007/01/04 14:36:16
sigurdne Exp $
*/
/**
@@ -445,30 +445,19 @@
$function_msg = lang('Date search');
$appname = lang('project');
- $dateformat =
strtolower($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
- $sep = '/';
- $dlarr[strpos($dateformat,'y')] = 'yyyy';
- $dlarr[strpos($dateformat,'m')] = 'MM';
- $dlarr[strpos($dateformat,'d')] = 'DD';
- ksort($dlarr);
-
- $dateformat= (implode($sep,$dlarr));
-
if(!$values['end_date'])
{
$values['end_date'] =
$GLOBALS['phpgw']->common->show_date(mktime(0,0,0,date("m"),date("d"),date("Y")),$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
}
- $cal_info = $this->bocommon->jscalendar();
- $jsDateFormat=$cal_info['jsDateFormat'];
+ $jscal = CreateObject('phpgwapi.jscalendar');
+ $jscal->add_listener('start_date');
+ $jscal->add_listener('end_date');
$data = array
(
- 'jsDateFormat' =>
$jsDateFormat,
- 'date_img' =>
$cal_info['img'],
'lang_datetitle' => lang('Select
date'),
- 'calendar_setup_start' =>
"Calendar.setup({inputField : 'start_date',ifFormat : '" . $jsDateFormat .
"',button : 'start_date-trigger'});",
- 'calendar_setup_end' =>
"Calendar.setup({inputField : 'end_date',ifFormat : '" . $jsDateFormat .
"',button : 'end_date-trigger'});",
+ 'img_cal' =>
$GLOBALS['phpgw']->common->image('phpgwapi','cal'),
'lang_start_date_statustext' => lang('Select
the estimated end date for the Project'),
'lang_start_date' => lang('Start
date'),
@@ -478,7 +467,6 @@
'lang_end_date' => lang('End
date'),
'value_end_date' =>
$values['end_date'],
- 'dateformat' => $dateformat,
'lang_submit_statustext' => lang('Select
this dates'),
'lang_submit' =>
lang('Submit')
);
@@ -593,9 +581,6 @@
);
}
- $values['start_date'] =
get_var('start_date',array('POST'));
- $values['end_date'] =
get_var('end_date',array('POST'));
-
$config->read_repository();
$save='';
@@ -911,9 +896,9 @@
$remainder_percent=
number_format(($reserve_remainder/$values['reserve'])*100, 2, ',', '');
}
- $cal_info = $this->bocommon->jscalendar();
- $jsDateFormat=$cal_info['jsDateFormat'];
-
+ $jscal = CreateObject('phpgwapi.jscalendar');
+ $jscal->add_listener('values_start_date');
+ $jscal->add_listener('values_end_date');
if (isset($values['origin']) AND
is_array($values['origin']))
{
@@ -972,12 +957,8 @@
'lang_history'
=> lang('History'),
'lang_no_history'
=> lang('No history'),
-// 'cal_info'
=> $cal_info,
- 'jsDateFormat'
=> $jsDateFormat,
- 'date_img'
=> $cal_info['img'],
+ 'img_cal'
=> $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
'lang_datetitle'
=> lang('Select date'),
- 'calendar_setup_start'
=> "Calendar.setup({inputField : 'start_date',ifFormat : '" . $jsDateFormat .
"',button : 'start_date-trigger'});",
- 'calendar_setup_end'
=> "Calendar.setup({inputField : 'end_date',ifFormat : '" . $jsDateFormat .
"',button : 'end_date-trigger'});",
'lang_start_date_statustext'
=> lang('Select the estimated end date for the Project'),
'lang_start_date'
=> lang('Project start date'),
Index: inc/class.uirequest.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uirequest.inc.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- inc/class.uirequest.inc.php 4 Jan 2007 12:04:02 -0000 1.29
+++ inc/class.uirequest.inc.php 4 Jan 2007 14:36:16 -0000 1.30
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.uirequest.inc.php,v 1.29 2007/01/04 12:04:02
sigurdne Exp $
+ * @version $Id: class.uirequest.inc.php,v 1.30 2007/01/04 14:36:16
sigurdne Exp $
*/
/**
@@ -610,9 +610,6 @@
);
}
- $values['start_date'] =
get_var('start_date',array('POST'));
- $values['end_date'] =
get_var('end_date',array('POST'));
-
//_debug_array($values);
$this->config->read_repository();
@@ -837,8 +834,9 @@
);
}
- $cal_info = $this->bocommon->jscalendar();
- $jsDateFormat=$cal_info['jsDateFormat'];
+ $jscal = CreateObject('phpgwapi.jscalendar');
+ $jscal->add_listener('values_start_date');
+ $jscal->add_listener('values_end_date');
$msgbox_data = $this->bocommon->msgbox_data($receipt);
@@ -923,11 +921,8 @@
'lang_history' =>
lang('History'),
'lang_no_history' =>
lang('No history'),
- 'jsDateFormat' =>
$jsDateFormat,
- 'date_img' =>
$cal_info['img'],
+ 'img_cal'
=> $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
'lang_datetitle' =>
lang('Select date'),
- 'calendar_setup_start' =>
"Calendar.setup({inputField : 'start_date',ifFormat : '" . $jsDateFormat .
"',button : 'start_date-trigger'});",
- 'calendar_setup_end' =>
"Calendar.setup({inputField : 'end_date',ifFormat : '" . $jsDateFormat .
"',button : 'end_date-trigger'});",
'lang_start_date_statustext' =>
lang('Select the estimated end date for the request'),
'lang_start_date' =>
lang('request start date'),
Index: inc/class.uiworkorder.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiworkorder.inc.php,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- inc/class.uiworkorder.inc.php 4 Jan 2007 12:04:02 -0000 1.38
+++ inc/class.uiworkorder.inc.php 4 Jan 2007 14:36:16 -0000 1.39
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.uiworkorder.inc.php,v 1.38 2007/01/04 12:04:02
sigurdne Exp $
+ * @version $Id: class.uiworkorder.inc.php,v 1.39 2007/01/04 14:36:16
sigurdne Exp $
*/
/**
@@ -492,10 +492,6 @@
$values['b_account_id'] =
get_var('b_account_id',array('POST'));
$values['b_account_name'] =
get_var('b_account_name',array('POST'));
-
- $values['start_date'] =
get_var('start_date',array('POST'));
- $values['end_date'] =
get_var('end_date',array('POST'));
-
$config->read_repository();
if (isset($values['save']))
@@ -798,8 +794,9 @@
$values['status']=$project_status;
}
- $cal_info = $this->bocommon->jscalendar();
- $jsDateFormat=$cal_info['jsDateFormat'];
+ $jscal = CreateObject('phpgwapi.jscalendar');
+ $jscal->add_listener('values_start_date');
+ $jscal->add_listener('values_end_date');
if( isset($receipt) && is_array($receipt))
{
@@ -831,11 +828,8 @@
'lang_history' =>
lang('History'),
'lang_no_history' =>
lang('No history'),
- 'jsDateFormat' =>
$jsDateFormat,
- 'date_img' =>
$cal_info['img'],
+ 'img_cal'
=> $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
'lang_datetitle' =>
lang('Select date'),
- 'calendar_setup_start' =>
"Calendar.setup({inputField : 'start_date',ifFormat : '" . $jsDateFormat .
"',button : 'start_date-trigger'});",
- 'calendar_setup_end' =>
"Calendar.setup({inputField : 'end_date',ifFormat : '" . $jsDateFormat .
"',button : 'end_date-trigger'});",
'lang_start_date_statustext' =>
lang('Select the estimated end date for the Project'),
'lang_start_date' =>
lang('Workorder start date'),
Index: templates/base/date_search.xsl
===================================================================
RCS file: /sources/phpgroupware/property/templates/base/date_search.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- templates/base/date_search.xsl 17 Jan 2005 10:03:18 -0000 1.1
+++ templates/base/date_search.xsl 4 Jan 2007 14:36:16 -0000 1.2
@@ -1,4 +1,4 @@
-<!-- $Id: date_search.xsl,v 1.1 2005/01/17 10:03:18 sigurdne Exp $ -->
+<!-- $Id: date_search.xsl,v 1.2 2007/01/04 14:36:16 sigurdne Exp $ -->
<xsl:template name="app_data">
<xsl:apply-templates select="date_search"/>
@@ -29,11 +29,8 @@
<xsl:text>'; return
true;</xsl:text>
</xsl:attribute>
</input>
+ <img id="start_date-trigger"
src="{img_cal}" alt="{lang_datetitle}" title="{lang_datetitle}"
style="cursor:pointer; cursor:hand;" />
- <script type="text/javascript">
- document.writeln('<img
id="start_date-trigger" src="{date_img}" title="{lang_datetitle}"
style="cursor:pointer; cursor:hand;"/>');
- <xsl:value-of
select="calendar_setup_start"/>
- </script>
</td>
</tr>
<tr>
@@ -48,11 +45,7 @@
<xsl:text>'; return
true;</xsl:text>
</xsl:attribute>
</input>
-
- <script type="text/javascript">
- document.writeln('<img
id="end_date-trigger" src="{date_img}" title="{lang_datetitle}"
style="cursor:pointer; cursor:hand;"/>');
- <xsl:value-of
select="calendar_setup_end"/>
- </script>
+ <img id="end_date-trigger"
src="{img_cal}" alt="{lang_datetitle}" title="{lang_datetitle}"
style="cursor:pointer; cursor:hand;" />
</td>
</tr>
<tr>
Index: templates/base/project.xsl
===================================================================
RCS file: /sources/phpgroupware/property/templates/base/project.xsl,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- templates/base/project.xsl 15 Dec 2006 20:16:44 -0000 1.9
+++ templates/base/project.xsl 4 Jan 2007 14:36:16 -0000 1.10
@@ -1,4 +1,4 @@
-<!-- $Id: project.xsl,v 1.9 2006/12/15 20:16:44 sigurdne Exp $ -->
+<!-- $Id: project.xsl,v 1.10 2007/01/04 14:36:16 sigurdne Exp $ -->
<xsl:template name="app_data">
<xsl:choose>
@@ -406,18 +406,14 @@
<xsl:value-of select="lang_start_date"/>
</td>
<td>
- <input type="text" id="start_date"
name="start_date" size="10" value="{value_start_date}" readonly="readonly"
onMouseout="window.status='';return true;" >
+ <input type="text"
id="values_start_date" name="values[start_date]" size="10"
value="{value_start_date}" readonly="readonly"
onMouseout="window.status='';return true;" >
<xsl:attribute
name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of
select="lang_start_date_statustext"/>
<xsl:text>'; return
true;</xsl:text>
</xsl:attribute>
</input>
-
- <script type="text/javascript">
- document.writeln('<img
id="start_date-trigger" src="{date_img}" title="{lang_datetitle}"
style="cursor:pointer; cursor:hand;"/>');
- <xsl:value-of
select="calendar_setup_start"/>
- </script>
+ <img id="values_start_date-trigger"
src="{img_cal}" alt="{lang_datetitle}" title="{lang_datetitle}"
style="cursor:pointer; cursor:hand;" />
</td>
</tr>
<tr>
@@ -425,18 +421,14 @@
<xsl:value-of select="lang_end_date"/>
</td>
<td>
- <input type="text" id="end_date"
name="end_date" size="10" value="{value_end_date}" readonly="readonly"
onMouseout="window.status='';return true;" >
+ <input type="text" id="values_end_date"
name="values[end_date]" size="10" value="{value_end_date}" readonly="readonly"
onMouseout="window.status='';return true;" >
<xsl:attribute
name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of
select="lang_end_date_statustext"/>
<xsl:text>'; return
true;</xsl:text>
</xsl:attribute>
</input>
-
- <script type="text/javascript">
- document.writeln('<img
id="end_date-trigger" src="{date_img}" title="{lang_datetitle}"
style="cursor:pointer; cursor:hand;"/>');
- <xsl:value-of
select="calendar_setup_end"/>
- </script>
+ <img id="values_end_date-trigger"
src="{img_cal}" alt="{lang_datetitle}" title="{lang_datetitle}"
style="cursor:pointer; cursor:hand;" />
</td>
</tr>
<tr>
Index: templates/base/request.xsl
===================================================================
RCS file: /sources/phpgroupware/property/templates/base/request.xsl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- templates/base/request.xsl 15 Dec 2006 20:16:44 -0000 1.10
+++ templates/base/request.xsl 4 Jan 2007 14:36:16 -0000 1.11
@@ -1,4 +1,4 @@
-<!-- $Id: request.xsl,v 1.10 2006/12/15 20:16:44 sigurdne Exp $ -->
+<!-- $Id: request.xsl,v 1.11 2007/01/04 14:36:16 sigurdne Exp $ -->
<xsl:template name="app_data">
<xsl:choose>
@@ -465,18 +465,14 @@
<xsl:value-of select="lang_start_date"/>
</td>
<td>
- <input type="text" id="start_date"
name="start_date" size="10" value="{value_start_date}" readonly="readonly"
onMouseout="window.status='';return true;" >
+ <input type="text"
id="values_start_date" name="values[start_date]" size="10"
value="{value_start_date}" readonly="readonly"
onMouseout="window.status='';return true;" >
<xsl:attribute
name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of
select="lang_start_date_statustext"/>
<xsl:text>'; return
true;</xsl:text>
</xsl:attribute>
</input>
-
- <script type="text/javascript">
- document.writeln('<img
id="start_date-trigger" src="{date_img}" title="{lang_datetitle}"
style="cursor:pointer; cursor:hand;"/>');
- <xsl:value-of
select="calendar_setup_start"/>
- </script>
+ <img id="values_start_date-trigger"
src="{img_cal}" alt="{lang_datetitle}" title="{lang_datetitle}"
style="cursor:pointer; cursor:hand;" />
</td>
</tr>
<tr>
@@ -484,18 +480,14 @@
<xsl:value-of select="lang_end_date"/>
</td>
<td>
- <input type="text" id="end_date"
name="end_date" size="10" value="{value_end_date}" readonly="readonly"
onMouseout="window.status='';return true;" >
+ <input type="text" id="values_end_date"
name="values[end_date]" size="10" value="{value_end_date}" readonly="readonly"
onMouseout="window.status='';return true;" >
<xsl:attribute
name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of
select="lang_end_date_statustext"/>
<xsl:text>'; return
true;</xsl:text>
</xsl:attribute>
</input>
-
- <script type="text/javascript">
- document.writeln('<img
id="end_date-trigger" src="{date_img}" title="{lang_datetitle}"
style="cursor:pointer; cursor:hand;"/>');
- <xsl:value-of
select="calendar_setup_end"/>
- </script>
+ <img id="values_end_date-trigger"
src="{img_cal}" alt="{lang_datetitle}" title="{lang_datetitle}"
style="cursor:pointer; cursor:hand;" />
</td>
</tr>
<tr>
Index: templates/base/workorder.xsl
===================================================================
RCS file: /sources/phpgroupware/property/templates/base/workorder.xsl,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- templates/base/workorder.xsl 15 Dec 2006 20:16:44 -0000 1.9
+++ templates/base/workorder.xsl 4 Jan 2007 14:36:16 -0000 1.10
@@ -1,4 +1,4 @@
-<!-- $Id: workorder.xsl,v 1.9 2006/12/15 20:16:44 sigurdne Exp $ -->
+<!-- $Id: workorder.xsl,v 1.10 2007/01/04 14:36:16 sigurdne Exp $ -->
<xsl:template name="app_data">
<xsl:choose>
@@ -644,7 +644,7 @@
<xsl:value-of select="lang_start_date"/>
</td>
<td>
- <input type="text" id="start_date"
name="start_date" size="10" value="{value_start_date}" readonly="readonly"
onMouseout="window.status='';return true;" >
+ <input type="text"
id="values_start_date" name="values[start_date]" size="10"
value="{value_start_date}" readonly="readonly"
onMouseout="window.status='';return true;" >
<xsl:attribute
name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of
select="lang_start_date_statustext"/>
@@ -652,10 +652,7 @@
</xsl:attribute>
</input>
- <script type="text/javascript">
- document.writeln('<img
id="start_date-trigger" src="{date_img}" title="{lang_datetitle}"
style="cursor:pointer; cursor:hand;"/>');
- <xsl:value-of
select="calendar_setup_start"/>
- </script>
+ <img id="values_start_date-trigger"
src="{img_cal}" alt="{lang_datetitle}" title="{lang_datetitle}"
style="cursor:pointer; cursor:hand;" />
</td>
</tr>
<tr>
@@ -663,18 +660,14 @@
<xsl:value-of select="lang_end_date"/>
</td>
<td>
- <input type="text" id="end_date"
name="end_date" size="10" value="{value_end_date}" readonly="readonly"
onMouseout="window.status='';return true;" >
+ <input type="text" id="values_end_date"
name="values[end_date]" size="10" value="{value_end_date}" readonly="readonly"
onMouseout="window.status='';return true;" >
<xsl:attribute
name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of
select="lang_end_date_statustext"/>
<xsl:text>'; return
true;</xsl:text>
</xsl:attribute>
</input>
-
- <script type="text/javascript">
- document.writeln('<img
id="end_date-trigger" src="{date_img}" title="{lang_datetitle}"
style="cursor:pointer; cursor:hand;"/>');
- <xsl:value-of
select="calendar_setup_end"/>
- </script>
+ <img id="values_end_date-trigger"
src="{img_cal}" alt="{lang_datetitle}" title="{lang_datetitle}"
style="cursor:pointer; cursor:hand;" />
</td>
</tr>
<tr>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property inc/class.uiproject.inc.php inc/class....,
Sigurd Nes <=