Changeset 1481
- Timestamp:
- 07/31/07 15:54:58
- Files:
-
- trunk/deployment/webadmin/webapp/resources/default/default/default.xsl (modified) (4 diffs)
- trunk/deployment/webadmin/webapp/resources/resources/dynCalendarWidget.css (modified) (1 diff)
- trunk/deployment/webadmin/webapp/resources/resources/dynCalendarWidget.js (modified) (2 diffs)
- trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl (modified) (1 diff)
- trunk/deployment/webuser/webapp/resources/demoskins/resources/dynCalendarWidget.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/deployment/webadmin/webapp/resources/default/default/default.xsl
r1425 r1481 186 186 <!-- Other generally useful global variables --> 187 187 <xsl:variable name="publicCal">/cal</xsl:variable> 188 189 <!-- the following variable can be set to "true" or "false"; 190 to use dojo widgets and fancier UI features, set to false - these are 191 not guaranteed to work in portals --> 192 <xsl:variable name="portalFriendly">true</xsl:variable> 188 193 189 194 <!--==== MAIN TEMPLATE ====--> … … 202 207 <script type="text/javascript" src="/bedework-common/javascript/dojo/dojo.js"> </script> 203 208 <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkEventForm.js"> </script> 209 <xsl:if test="$portalFriendly = 'true'"> 210 <script type="text/javascript" src="{$resourcesRoot}/resources/dynCalendarWidget.js"> </script> 211 <link rel="stylesheet" href="{$resourcesRoot}/resources/dynCalendarWidget.css"/> 212 </xsl:if> 204 213 </xsl:if> 205 214 <xsl:if test="/bedeworkadmin/page='modCalendar'"> … … 928 937 <div class="dateFields"> 929 938 <span class="startDateLabel">Date </span> 930 <span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetStartDate" iconURL="{$resourcesRoot}/resources/calIcon.gif">931 <xsl:attribute name="value"><xsl:value-of select="form/start/rfc3339DateTime"/></xsl:attribute>932 <xsl:text> </xsl:text>933 </span>934 <input type="hidden" name="eventStartDate.year">935 <xsl:attribute name="value"><xsl:value-of select="form/start/yearText/input/@value"/></xsl:attribute>936 </input>937 <input type="hidden" name="eventStartDate.month">938 <xsl:attribute name="value"><xsl:value-of select="form/start/month/select/option[@selected = 'selected']/@value"/></xsl:attribute>939 </input>940 <input type="hidden" name="eventStartDate.day">941 <xsl:attribute name="value"><xsl:value-of select="form/start/day/select/option[@selected = 'selected']/@value"/></xsl:attribute>942 </input>943 <!--<xsl:copy-of select="form/start/month/*"/>944 <xsl:copy-of select="form/start/day/*"/>945 939 <xsl:choose> 946 <xsl:when test="/bedeworkadmin/creating = 'true'"> 947 <xsl:copy-of select="form/start/year/*"/> 940 <xsl:when test="$portalFriendly = 'true'"> 941 <xsl:copy-of select="form/start/month/*"/> 942 <xsl:copy-of select="form/start/day/*"/> 943 <xsl:choose> 944 <xsl:when test="/bedeworkadmin/creating = 'true'"> 945 <xsl:copy-of select="form/start/year/*"/> 946 </xsl:when> 947 <xsl:otherwise> 948 <xsl:copy-of select="form/start/yearText/*"/> 949 </xsl:otherwise> 950 </xsl:choose> 951 <script language="JavaScript" type="text/javascript"> 952 <xsl:comment> 953 startDateDynCalWidget = new dynCalendar('startDateDynCalWidget', <xsl:value-of select="number(form/start/yearText/input/@value)"/>, <xsl:value-of select="number(form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(form/start/day/select/option[@selected='selected']/@value)"/>, 'startDateCalWidgetCallback',true,'<xsl:value-of select="$resourcesRoot"/>/resources/'); 954 </xsl:comment> 955 </script> 948 956 </xsl:when> 949 957 <xsl:otherwise> 950 <xsl:copy-of select="form/start/yearText/*"/> 958 <span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetStartDate" iconURL="{$resourcesRoot}/resources/calIcon.gif"> 959 <xsl:attribute name="value"><xsl:value-of select="form/start/rfc3339DateTime"/></xsl:attribute> 960 <xsl:text> </xsl:text> 961 </span> 962 <input type="hidden" name="eventStartDate.year"> 963 <xsl:attribute name="value"><xsl:value-of select="form/start/yearText/input/@value"/></xsl:attribute> 964 </input> 965 <input type="hidden" name="eventStartDate.month"> 966 <xsl:attribute name="value"><xsl:value-of select="form/start/month/select/option[@selected = 'selected']/@value"/></xsl:attribute> 967 </input> 968 <input type="hidden" name="eventStartDate.day"> 969 <xsl:attribute name="value"><xsl:value-of select="form/start/day/select/option[@selected = 'selected']/@value"/></xsl:attribute> 970 </input> 951 971 </xsl:otherwise> 952 </xsl:choose> -->972 </xsl:choose> 953 973 </div> 954 <!--955 <script language="JavaScript" type="text/javascript">956 <xsl:comment>957 startDateDynCalWidget = new dynCalendar('startDateDynCalWidget', <xsl:value-of select="number(form/start/yearText/input/@value)"/>, <xsl:value-of select="number(form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(form/start/day/select/option[@selected='selected']/@value)"/>, 'startDateCalWidgetCallback',true,'<xsl:value-of select="$resourcesRoot"/>/resources/');958 </xsl:comment>959 </script>-->960 974 <div class="{$timeFieldsClass}" id="startTimeFields"> 961 975 <span id="calWidgetStartTimeHider" class="show"> … … 1002 1016 <div class="{$endDateTimeClass}" id="endDateTime"> 1003 1017 <div class="dateFields"> 1004 <span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetEndDate" iconURL="{$resourcesRoot}/resources/calIcon.gif">1005 <xsl:attribute name="value"><xsl:value-of select="form/end/rfc3339DateTime"/></xsl:attribute>1006 <xsl:text> </xsl:text>1007 </span>1008 <input type="hidden" name="eventEndDate.year">1009 <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/yearText/input/@value"/></xsl:attribute>1010 </input>1011 <input type="hidden" name="eventEndDate.month">1012 <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/month/select/option[@selected = 'selected']/@value"/></xsl:attribute>1013 </input>1014 <input type="hidden" name="eventEndDate.day">1015 <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/day/select/option[@selected = 'selected']/@value"/></xsl:attribute>1016 </input>1017 <!--<xsl:copy-of select="form/end/dateTime/month/*"/>1018 <xsl:copy-of select="form/end/dateTime/day/*"/>1019 1018 <xsl:choose> 1020 <xsl:when test="/bedeworkadmin/creating = 'true'"> 1021 <xsl:copy-of select="form/end/dateTime/year/*"/> 1019 <xsl:when test="$portalFriendly = 'true'"> 1020 <xsl:copy-of select="form/end/dateTime/month/*"/> 1021 <xsl:copy-of select="form/end/dateTime/day/*"/> 1022 <xsl:choose> 1023 <xsl:when test="/bedeworkadmin/creating = 'true'"> 1024 <xsl:copy-of select="form/end/dateTime/year/*"/> 1025 </xsl:when> 1026 <xsl:otherwise> 1027 <xsl:copy-of select="form/end/dateTime/yearText/*"/> 1028 </xsl:otherwise> 1029 </xsl:choose> 1030 <script language="JavaScript" type="text/javascript"> 1031 <xsl:comment> 1032 endDateDynCalWidget = new dynCalendar('endDateDynCalWidget', <xsl:value-of select="number(form/start/yearText/input/@value)"/>, <xsl:value-of select="number(form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(form/start/day/select/option[@selected='selected']/@value)"/>, 'endDateCalWidgetCallback',true,'<xsl:value-of select="$resourcesRoot"/>/resources/'); 1033 </xsl:comment> 1034 </script> 1022 1035 </xsl:when> 1023 1036 <xsl:otherwise> 1024 <xsl:copy-of select="form/end/dateTime/yearText/*"/> 1037 <span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetEndDate" iconURL="{$resourcesRoot}/resources/calIcon.gif"> 1038 <xsl:attribute name="value"><xsl:value-of select="form/end/rfc3339DateTime"/></xsl:attribute> 1039 <xsl:text> </xsl:text> 1040 </span> 1041 <input type="hidden" name="eventEndDate.year"> 1042 <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/yearText/input/@value"/></xsl:attribute> 1043 </input> 1044 <input type="hidden" name="eventEndDate.month"> 1045 <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/month/select/option[@selected = 'selected']/@value"/></xsl:attribute> 1046 </input> 1047 <input type="hidden" name="eventEndDate.day"> 1048 <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/day/select/option[@selected = 'selected']/@value"/></xsl:attribute> 1049 </input> 1025 1050 </xsl:otherwise> 1026 </xsl:choose> -->1051 </xsl:choose> 1027 1052 </div> 1028 <!--<script language="JavaScript" type="text/javascript">1029 <xsl:comment>1030 endDateDynCalWidget = new dynCalendar('endDateDynCalWidget', <xsl:value-of select="number(form/start/yearText/input/@value)"/>, <xsl:value-of select="number(form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(form/start/day/select/option[@selected='selected']/@value)"/>, 'endDateCalWidgetCallback',true,'<xsl:value-of select="$resourcesRoot"/>/resources/');1031 </xsl:comment>1032 </script>-->1033 1053 <div class="{$timeFieldsClass}" id="endTimeFields"> 1034 1054 <span id="calWidgetEndTimeHider" class="show"> trunk/deployment/webadmin/webapp/resources/resources/dynCalendarWidget.css
r952 r1481 21 21 height: 15px; 22 22 } 23 .dynCalendar_header a { 23 .dynCalendar_header a:link, 24 .dynCalendar_header a:active, 25 .dynCalendar_header a:visited, 26 .dynCalendar_header a:hover { 24 27 background-color: #00a; 25 color: white; 26 } 27 .dynCalendar_header a { 28 background-color: #00a; 29 color: white; 28 color: white !important; 29 text-decoration: none !important; 30 30 } 31 31 .dynCalendar_dayname { trunk/deployment/webadmin/webapp/resources/resources/dynCalendarWidget.js
r1157 r1481 236 236 function dynCalendar_writeHTML() 237 237 { 238 if (is_ie5up || is_nav6up || is_gecko) { 239 document.write('<a href="javascript: ' + this.objName + '.show()"><img src="' + this.imagesPath + 'calIcon.gif" border="0" width="16" height="15" /></a>'); 240 document.write('<div class="dynCalendar" id="' + this.layerID + '" onmouseover="' + this.objName + '._mouseover(true)" onmouseout="' + this.objName + '._mouseover(false)"></div>'); 241 } 238 document.write('<a href="javascript: ' + this.objName + '.show()"><img src="' + this.imagesPath + 'calIcon.gif" border="0" width="16" height="15" /></a>'); 239 document.write('<div class="dynCalendar" id="' + this.layerID + '" onmouseover="' + this.objName + '._mouseover(true)" onmouseout="' + this.objName + '._mouseover(false)"></div>'); 242 240 } 243 241 … … 461 459 document.onmousemove = function () 462 460 { 463 if (is_ie5up || is_nav6up || is_gecko) { 464 if (arguments[0]) { 465 dynCalendar_mouseX = arguments[0].pageX; 466 dynCalendar_mouseY = arguments[0].pageY; 467 } else { 468 dynCalendar_mouseX = event.clientX + document.body.scrollLeft; 469 dynCalendar_mouseY = event.clientY + document.body.scrollTop; 470 arguments[0] = null; 461 if (arguments[0]) { 462 dynCalendar_mouseX = arguments[0].pageX; 463 dynCalendar_mouseY = arguments[0].pageY; 464 } else { 465 dynCalendar_mouseX = event.clientX + document.body.scrollLeft; 466 dynCalendar_mouseY = event.clientY + document.body.scrollTop; 467 arguments[0] = null; 468 } 469 470 dynCalendar_oldOnmousemove(); 471 } 472 473 /** 474 * Callbacks for document.onclick 475 */ 476 dynCalendar_oldOnclick = document.onclick ? document.onclick : new Function; 477 478 document.onclick = function () 479 { 480 if(!dynCalendar_mouseoverStatus){ 481 for(i=0; i<dynCalendar_layers.length; ++i){ 482 dynCalendar_layers[i]._hideLayer(); 471 483 } 472 473 dynCalendar_oldOnmousemove(); 474 } 475 } 476 477 /** 478 * Callbacks for document.onclick 479 */ 480 dynCalendar_oldOnclick = document.onclick ? document.onclick : new Function; 481 482 document.onclick = function () 483 { 484 if (is_ie5up || is_nav6up || is_gecko) { 485 if(!dynCalendar_mouseoverStatus){ 486 for(i=0; i<dynCalendar_layers.length; ++i){ 487 dynCalendar_layers[i]._hideLayer(); 488 } 489 } 490 491 dynCalendar_oldOnclick(arguments[0] ? arguments[0] : null); 492 } 493 } 484 } 485 486 dynCalendar_oldOnclick(arguments[0] ? arguments[0] : null); 487 } 488 489 /** 490 * Bedework specific callbacks 491 */ 492 function startDateCalWidgetCallback(date, month, year) { 493 document.eventForm['eventStartDate.month'].value = month; 494 document.eventForm['eventStartDate.day'].value = date; 495 document.eventForm['eventStartDate.year'].value = year; 496 } 497 function endDateCalWidgetCallback(date, month, year) { 498 document.eventForm['eventEndDate.month'].value = month; 499 document.eventForm['eventEndDate.day'].value = date; 500 document.eventForm['eventEndDate.year'].value = year; 501 } trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl
r1480 r1481 171 171 to use dojo widgets and fancier UI features, set to false - these are 172 172 not guaranteed to work in portals --> 173 <xsl:variable name="portalFriendly"> false</xsl:variable>173 <xsl:variable name="portalFriendly">true</xsl:variable> 174 174 175 175 <!-- BEGIN MAIN TEMPLATE --> trunk/deployment/webuser/webapp/resources/demoskins/resources/dynCalendarWidget.js
r1480 r1481 236 236 function dynCalendar_writeHTML() 237 237 { 238 //if (is_ie5up || is_ie6up || is_nav6up || is_gecko) { 239 document.write('<a href="javascript: ' + this.objName + '.show()"><img src="' + this.imagesPath + 'calIcon.gif" border="0" width="16" height="15" /></a>'); 240 document.write('<div class="dynCalendar" id="' + this.layerID + '" onmouseover="' + this.objName + '._mouseover(true)" onmouseout="' + this.objName + '._mouseover(false)"></div>'); 241 //} 238 document.write('<a href="javascript: ' + this.objName + '.show()"><img src="' + this.imagesPath + 'calIcon.gif" border="0" width="16" height="15" /></a>'); 239 document.write('<div class="dynCalendar" id="' + this.layerID + '" onmouseover="' + this.objName + '._mouseover(true)" onmouseout="' + this.objName + '._mouseover(false)"></div>'); 242 240 } 243 241 … … 461 459 document.onmousemove = function () 462 460 { 463 //if (is_ie5up || is_nav6up || is_gecko) { 464 if (arguments[0]) { 465 dynCalendar_mouseX = arguments[0].pageX; 466 dynCalendar_mouseY = arguments[0].pageY; 467 } else { 468 dynCalendar_mouseX = event.clientX + document.body.scrollLeft; 469 dynCalendar_mouseY = event.clientY + document.body.scrollTop; 470 arguments[0] = null; 461 if (arguments[0]) { 462 dynCalendar_mouseX = arguments[0].pageX; 463 dynCalendar_mouseY = arguments[0].pageY; 464 } else { 465 dynCalendar_mouseX = event.clientX + document.body.scrollLeft; 466 dynCalendar_mouseY = event.clientY + document.body.scrollTop; 467 arguments[0] = null; 468 } 469 470 dynCalendar_oldOnmousemove(); 471 } 472 473 /** 474 * Callbacks for document.onclick 475 */ 476 dynCalendar_oldOnclick = document.onclick ? document.onclick : new Function; 477 478 document.onclick = function () 479 { 480 if(!dynCalendar_mouseoverStatus){ 481 for(i=0; i<dynCalendar_layers.length; ++i){ 482 dynCalendar_layers[i]._hideLayer(); 471 483 } 472 473 dynCalendar_oldOnmousemove(); 474 //} 475 } 476 477 /** 478 * Callbacks for document.onclick 479 */ 480 dynCalendar_oldOnclick = document.onclick ? document.onclick : new Function; 481 482 document.onclick = function () 483 { 484 //if (is_ie5up || is_nav6up || is_gecko) { 485 if(!dynCalendar_mouseoverStatus){ 486 for(i=0; i<dynCalendar_layers.length; ++i){ 487 dynCalendar_layers[i]._hideLayer(); 488 } 489 } 490 491 dynCalendar_oldOnclick(arguments[0] ? arguments[0] : null); 492 //} 484 } 485 486 dynCalendar_oldOnclick(arguments[0] ? arguments[0] : null); 493 487 } 494 488 … … 497 491 */ 498 492 function startDateCalWidgetCallback(date, month, year) { 499 if (String(month).length == 1) {500 month = '0' + month;501 }502 if (String(date).length == 1) {503 date = '0' + date;504 }505 493 document.eventForm['eventStartDate.month'].value = month; 506 494 document.eventForm['eventStartDate.day'].value = date; … … 508 496 } 509 497 function endDateCalWidgetCallback(date, month, year) { 510 if (String(month).length == 1) {511 month = '0' + month;512 }513 if (String(date).length == 1) {514 date = '0' + date;515 }516 498 document.eventForm['eventEndDate.month'].value = month; 517 499 document.eventForm['eventEndDate.day'].value = date;
