|
From: <sv...@de...> - 2005-05-18 19:43:20
|
Author: pcamacho
Date: 2005-05-18 15:23:33 -0400 (Wed, 18 May 2005)
New Revision: 1089
Modified:
humano2/trunk/web/portal/site/xsl/dateTime.xsl
Log:
FIX: with various dateTime attributes the creation of an instance was fai=
ling (to set a date).
Modified: humano2/trunk/web/portal/site/xsl/dateTime.xsl
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- humano2/trunk/web/portal/site/xsl/dateTime.xsl 2005-05-18 17:46:14 UT=
C (rev 1088)
+++ humano2/trunk/web/portal/site/xsl/dateTime.xsl 2005-05-18 19:23:33 UT=
C (rev 1089)
@@ -9,38 +9,6 @@
<xsl:variable name=3D"sysAttName" select=3D"/page/classInstance/struct=
ure/attribute[id_entity=3D$idEntity]/sysAttName"/>
<xsl:variable name=3D"isEditable" select=3D"/page/classInstance/=
structure/attribute[id_entity=3D$idEntity]/isEditable"/>
=20
- <!-- calendar stylesheet -->
- <link rel=3D"stylesheet" type=3D"text/css" media=3D"all" href=3D=
"js/calendar/calendar-win2k-cold-1.css" title=3D"win2k-cold-1" />
- <!-- main calendar program -->
- <script type=3D"text/javascript" src=3D"js/calendar/calendar.js"=
></script>
- <!-- language for the calendar -->
- <script type=3D"text/javascript" src=3D"js/calendar/lang/calenda=
r-es.js"></script>
- <!-- the following script defines the Calendar.setup helper func=
tion, which makes
- adding a calendar a matter of 1 or 2 lines of code. -->
- <script type=3D"text/javascript" src=3D"js/calendar/calendar-set=
up.js"></script>
- <script language=3D"JavaScript">
- function convertISO(date, format)=20
- {
- if(date!=3D"" ) {
- var year =3D date.substr(0,4);
- var month =3D date.substr(5,2);
- var day =3D date.substr(8,2); =09
- var hour =3D date.substr(11,2); =09
- var minute =3D date.substr(14,2); =09
- var second =3D date.substr(17,2); =09
- var output;=09
- if (format=3D=3D"dd/MM/yyyy") output =3D day + "/" +=
month + "/" + year;
- else if (format=3D=3D"MM/dd/yyyy") output =3D month =
+ "/" + day + "/" + year;
- else if (format=3D=3D"hh:mm") output =3D hour + ":" =
+ minute;
- else if (format=3D=3D"hh:mm:ss") output =3D hour + "=
:" + minute + ":" + second;
- else if (format=3D=3D"yyyy/MM/dd=
") output =3D year + "/" + mounth + "/" + day;
- else output =3D date;=09
- return output;
- }
- else return "no date";
- }
- </script>
- =20
<xsl:choose>=09
<xsl:when test=3D"/page/flagaction=3D'Read'">
<script language=3D"JavaScript">
@@ -55,19 +23,19 @@
<table cellspacing=3D"0" cellpadding=3D"0" style=3D"=
border-collapse: collapse">
<tr>
<td>
- <input type=3D"text" id=3D"f_date_c" nam=
e=3D"{$sysAttName}" value=3D"{$data}" readonly=3D"1" />
+ <input type=3D"text" id=3D"f_date_c{$sys=
AttName}" name=3D"{$sysAttName}" value=3D"{$data}" readonly=3D"1" />
</td>
<td>
- <img src=3D"js/calendar/img.gif" id=3D"f_tri=
gger_c" style=3D"cursor: pointer; border: 1px solid red;" title=3D"Date s=
elector"
+ <img src=3D"js/calendar/img.gif" id=3D"f_tri=
gger_c{$sysAttName}" style=3D"cursor: pointer; border: 1px solid red;" ti=
tle=3D"Date selector"
onmouseover=3D"this.style.background=3D'=
red';" onmouseout=3D"this.style.background=3D''" />
</td>
</tr>
</table>
<script type=3D"text/javascript">
Calendar.setup({
- inputField : "f_date_c", // id of=
the input field
- ifFormat : "%Y/%m/%d", // form=
at of the input field
- button : "f_trigger_c", // trigg=
er for the calendar (button ID)
+ inputField : "f_date_c<xsl:value-of s=
elect=3D"$sysAttName" />", // id of the input field
+ ifFormat : "%Y-%m-%d", // form=
at of the input field
+ button : "f_trigger_c<xsl:value-o=
f select=3D"$sysAttName" />", // trigger for the calendar (button ID)
align : "Tl", // align=
ment (defaults to "Bl")
singleClick : true
});
@@ -88,19 +56,19 @@
<table cellspacing=3D"0" cellpadding=3D"0" style=3D"=
border-collapse: collapse">
<tr>
<td>
- <input type=3D"text" id=3D"f_date_c" na=
me=3D"{$sysAttName}" value=3D"{$data}" readonly=3D"1" />
+ <input type=3D"text" id=3D"f_date_c{$sys=
AttName}" name=3D"{$sysAttName}" value=3D"{$data}" readonly=3D"1" />
</td>
<td>
- <img src=3D"js/calendar/img.gif" id=3D"f=
_trigger_c" style=3D"cursor: pointer; border: 1px solid red;" title=3D"Da=
te selector"
+ <img src=3D"js/calendar/img.gif" id=3D"f=
_trigger_c{$sysAttName}" style=3D"cursor: pointer; border: 1px solid red;=
" title=3D"Date selector"
onmouseover=3D"this.style.background=
=3D'red';" onmouseout=3D"this.style.background=3D''" />
</td>
</tr>
</table>
<script type=3D"text/javascript">
Calendar.setup({
- inputField : "f_date_c", // id of=
the input field
- ifFormat : "%Y/%m/%d", // form=
at of the input field
- button : "f_trigger_c", // trigg=
er for the calendar (button ID)
+ inputField : "f_date_c<xsl:value-of s=
elect=3D"$sysAttName" />", // id of the input field
+ ifFormat : "%Y-%m-%d", // form=
at of the input field
+ button : "f_trigger_c<xsl:value-o=
f select=3D"$sysAttName" />", // trigger for the calendar (button ID)
align : "Tl", // align=
ment (defaults to "Bl")
singleClick : true
});
@@ -108,6 +76,5 @@
</xsl:if>
</xsl:when>
</xsl:choose>
-
</xsl:template>
</xsl:stylesheet>
|