Changeset 1445
- Timestamp:
- 06/28/07 18:00:02
- Files:
-
- trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl (modified) (20 diffs)
- trunk/deployment/webuser/webapp/resources/demoskins/resources/bedeworkAccess.js (modified) (5 diffs)
- trunk/deployment/webuser/webapp/resources/demoskins/resources/bedeworkEventForm.js (modified) (1 diff)
- trunk/deployment/webuser/webapp/resources/demoskins/resources/bedeworkPrefs.js (modified) (1 diff)
- trunk/deployment/webuser/webapp/resources/demoskins/resources/bwClock.css (modified) (2 diffs)
- trunk/deployment/webuser/webapp/resources/demoskins/resources/bwClock.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl
r1444 r1445 3 3 <xsl:output 4 4 method="xhtml" 5 indent=" no"5 indent="yes" 6 6 media-type="text/html" 7 7 doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" … … 170 170 </head> 171 171 <body> 172 <xsl:if test="/bedework/page!='inbox'"> 173 <xsl:attribute name="onload">checkStatus(<xsl:value-of select="/bedework/inboxState/numActive"/>,<xsl:value-of select="/bedework/inboxState/changed"/>,'<xsl:value-of select="$showInbox"/>')</xsl:attribute> 174 </xsl:if> 172 <xsl:choose> 173 <xsl:when test="/bedework/page != 'inbox'"> 174 <xsl:attribute name="onload">checkStatus(<xsl:value-of select="/bedework/inboxState/numActive"/>,<xsl:value-of select="/bedework/inboxState/changed"/>,'<xsl:value-of select="$showInbox"/>')</xsl:attribute> 175 </xsl:when> 176 </xsl:choose> 175 177 <div id="bedework"><!-- main wrapper div to keep styles encapsulated within portals --> 176 178 <xsl:choose> … … 342 344 343 345 <!--==== HEAD SECTION ====--> 344 345 346 <xsl:template name="headSection"> 346 347 <title>Bedework: Personal Calendar Client</title> … … 355 356 <script type="text/javascript" src="{$resourcesRoot}/resources/bedework.js"> </script> 356 357 <xsl:if test="/bedework/page='modSchedulingPrefs' or 357 /bedework/page='modPrefs'"> 358 /bedework/page='modPrefs' or 359 /bedework/page='attendeeRespond'"> 358 360 <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkPrefs.js"> </script> 359 361 </xsl:if> … … 371 373 <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkEventForm.js"> </script> 372 374 <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkAccess.js"> </script> 375 </xsl:if> 376 <xsl:if test="/bedework/editableAccess/access/acl/ace"> 377 <script type="text/javascript"> 378 <xsl:apply-templates select="/bedework/editableAccess/access/acl/ace" mode="initJS"/> 379 </script> 373 380 </xsl:if> 374 381 <script type="text/javascript"> … … 718 725 <tr> 719 726 <td class="leftCell"> 720 <input type="button" value="add..." on mouseover="toggleActionIcons('bwActionIcons-0','bwActionIcons')" onclick="toggleActionIcons('bwActionIcons-0','bwActionIcons')"/>727 <input type="button" value="add..." onclick="toggleActionIcons('bwActionIcons-0','bwActionIcons')"/> 721 728 <xsl:call-template name="actionIcons"> 722 729 <xsl:with-param name="actionIconsId">bwActionIcons-0</xsl:with-param> … … 3015 3022 <div id="bwEventTab-Access" class="invisible"> 3016 3023 <div id="sharingBox"> 3017 <xsl:apply-templates select="/bedework/eventAccess/access/acl" mode="currentAccess"> 3018 <xsl:with-param name="action" select="$event-setAccess"/> 3019 <xsl:with-param name="calPathEncoded" select="$calPathEncoded"/> 3020 <xsl:with-param name="guid" select="$guid"/> 3021 <xsl:with-param name="recurrenceId" select="$recurrenceId"/> 3022 </xsl:apply-templates> 3024 <xsl:choose> 3025 <xsl:when test="/bedework/editableAccess/access/acl"> 3026 <xsl:apply-templates select="/bedework/editableAccess/access/acl" mode="currentAccess"> 3027 <xsl:with-param name="action" select="$event-setAccess"/> 3028 <xsl:with-param name="calPathEncoded" select="$calPathEncoded"/> 3029 <xsl:with-param name="guid" select="$guid"/> 3030 <xsl:with-param name="recurrenceId" select="$recurrenceId"/> 3031 <xsl:with-param name="method">2</xsl:with-param> 3032 </xsl:apply-templates> 3033 </xsl:when> 3034 <xsl:otherwise> 3035 <h3>Current Access:</h3> 3036 <table class="common scheduling" id="bwCurrentAccess"> 3037 <thead> 3038 <tr> 3039 <th>Entry</th> 3040 <th>Access</th> 3041 <th>Inherited from</th> 3042 <td></td> 3043 </tr> 3044 </thead> 3045 <tbody> 3046 <tr id="bwEventNoAcl"> 3047 <td colspan="4">no access defined</td> 3048 </tr> 3049 </tbody> 3050 </table> 3051 </xsl:otherwise> 3052 </xsl:choose> 3023 3053 <xsl:call-template name="entityAccessForm"> 3024 3054 <xsl:with-param name="method">2</xsl:with-param> … … 3426 3456 3427 3457 <div id="recipientsAndAttendees"> 3428 <h4> Add recipients and attendees</h4>3458 <h4> Add attendees and recipients</h4> 3429 3459 <form name="raForm" id="recipientsAndAttendeesForm" action="{$event-attendeesForEvent}" method="post"> 3430 3460 <div id="raContent"> … … 3551 3581 </xsl:choose> 3552 3582 </xsl:attribute> 3553 <a href="{$updateEvent}&meetingStartdt={$startDate}&meetingDuration={$meetingDuration}&initDates=yes"> 3583 <xsl:variable name="action"> 3584 <xsl:choose> 3585 <xsl:when test="$aggregation = 'true'"><xsl:value-of select="$updateEvent"/></xsl:when> 3586 <xsl:otherwise><xsl:value-of select="$initEvent"/></xsl:otherwise> 3587 </xsl:choose> 3588 </xsl:variable> 3589 <a href="{$action}&meetingStartdt={$startDate}&meetingDuration={$meetingDuration}&initDates=yes"> 3554 3590 <xsl:choose> 3555 3591 <xsl:when test="((numBusy > 0) and (numBusy < 9)) or ((numTentative > 0) and (numTentative < 9)) and (number(numBusy) + number(numTentative) < 9)"> … … 5717 5753 <input type="hidden" name="updateEvent" value="true"/> 5718 5754 <input type="hidden" name="endType" value="date"/> 5719 <h2>Meeting Request</h2> 5755 <h2> 5756 <xsl:choose> 5757 <xsl:when test="form/status = 'CANCELLED'"> 5758 Meeting Cancelled 5759 </xsl:when> 5760 <xsl:otherwise> 5761 Meeting Request 5762 </xsl:otherwise> 5763 </xsl:choose> 5764 </h2> 5720 5765 <table class="common" cellspacing="0"> 5721 5766 <tr> … … 5802 5847 <td class="fieldname">Action:</td> 5803 5848 <td class="fieldval scheduleActions"> 5804 <input type="radio" name="method" value="REPLY" checked="checked" onclick="swapScheduleDisplay('hide');"/>reply as 5805 <select name="partstat"> 5806 <option value="ACCEPTED">accepted</option> 5807 <option value="DECLINED">declined</option> 5808 <option value="TENTATIVE">tentative</option> 5809 </select><br/> 5810 <input type="radio" name="method" value="REFRESH" onclick="swapScheduleDisplay('hide');"/>refresh this event<br/> 5811 <input type="radio" name="method" value="DELEGATE" onclick="swapScheduleDisplay('hide');"/>delegate to 5812 <input type="test" name="delegate" value=""/> (uri or account)<br/> 5813 <input type="radio" name="method" value="COUNTER" onclick="swapScheduleDisplay('show');"/>counter (suggest a different date, time, and/or location) 5849 <xsl:choose> 5850 <xsl:when test="form/status = 'CANCELLED' or form/scheduleMethod = '8'"> 5851 <!-- respond to a cancel --> 5852 <input type="hidden" name="method" value="REPLY"/> 5853 <select name="cancelAction"> 5854 <option value="mark">mark event as deleted</option> 5855 <option value="delete">delete event</option> 5856 </select> 5857 </xsl:when> 5858 <xsl:otherwise> 5859 <!-- respond to a request --> 5860 <input type="radio" name="method" value="REPLY" checked="checked" onclick="swapScheduleDisplay('hide');"/>reply as 5861 <select name="partstat"> 5862 <option value="ACCEPTED">accepted</option> 5863 <option value="DECLINED">declined</option> 5864 <option value="TENTATIVE">tentative</option> 5865 </select><br/> 5866 <input type="radio" name="method" value="REFRESH" onclick="swapScheduleDisplay('hide');"/>refresh this event<br/> 5867 <input type="radio" name="method" value="DELEGATE" onclick="swapScheduleDisplay('hide');"/>delegate to 5868 <input type="test" name="delegate" value=""/> (uri or account)<br/> 5869 <input type="radio" name="method" value="COUNTER" onclick="swapScheduleDisplay('show');"/>counter (suggest a different date, time, and/or location) 5870 </xsl:otherwise> 5871 </xsl:choose> 5872 </td> 5873 </tr> 5874 <tr id="scheduleDateEdit" class="invisible"> 5875 <td class="fieldname">New Date/Time:</td> 5876 <td class="fieldval scheduleActions"> 5877 <!-- Set the timefields class for the first load of the page; 5878 subsequent changes will take place using javascript without a 5879 page reload. --> 5880 <xsl:variable name="timeFieldsClass"> 5881 <xsl:choose> 5882 <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 5883 <xsl:otherwise>timeFields</xsl:otherwise> 5884 </xsl:choose> 5885 </xsl:variable> 5886 <xsl:choose> 5887 <xsl:when test="form/allDay/input/@checked='checked'"> 5888 <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="on" checked="checked"/> 5889 <input type="hidden" name="eventStartDate.dateOnly" value="on" id="allDayStartDateField"/> 5890 <input type="hidden" name="eventEndDate.dateOnly" value="on" id="allDayEndDateField"/> 5891 </xsl:when> 5892 <xsl:otherwise> 5893 <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="off"/> 5894 <input type="hidden" name="eventStartDate.dateOnly" value="off" id="allDayStartDateField"/> 5895 <input type="hidden" name="eventEndDate.dateOnly" value="off" id="allDayEndDateField"/> 5896 </xsl:otherwise> 5897 </xsl:choose> 5898 all day event<br/> 5899 <div class="dateStartEndBox"> 5900 <strong>Start:</strong> 5901 <div class="dateFields"> 5902 <span class="startDateLabel">Date </span> 5903 <xsl:copy-of select="form/start/month/*"/> 5904 <xsl:copy-of select="form/start/day/*"/> 5905 <xsl:choose> 5906 <xsl:when test="/bedework/creating = 'true'"> 5907 <xsl:copy-of select="form/start/year/*"/> 5908 </xsl:when> 5909 <xsl:otherwise> 5910 <xsl:copy-of select="form/start/yearText/*"/> 5911 </xsl:otherwise> 5912 </xsl:choose> 5913 </div> 5914 <!--<script language="JavaScript" type="text/javascript"> 5915 <xsl:comment> 5916 startDateDynCalWidget = new dynCalendar('startDateDynCalWidget', <xsl:value-of select="number(/bedework/formElements/form/start/yearText/input/@value)"/>, <xsl:value-of select="number(/bedework/formElements/form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(/bedework/formElements/form/start/day/select/option[@selected='selected']/@value)"/>, 'startDateCalWidgetCallback'); 5917 </xsl:comment> 5918 </script>--> 5919 <!--<img src="{$resourcesRoot}/resources/calIcon.gif" width="16" height="15" border="0"/>--> 5920 <div class="{$timeFieldsClass}" id="startTimeFields"> 5921 <span id="calWidgetStartTimeHider" class="show"> 5922 <xsl:copy-of select="form/start/hour/*"/> 5923 <xsl:copy-of select="form/start/minute/*"/> 5924 <xsl:if test="form/start/ampm"> 5925 <xsl:copy-of select="form/start/ampm/*"/> 5926 </xsl:if> 5927 <xsl:text> </xsl:text> 5928 <!--<a href="javascript:bwClockLaunch('eventStartDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a>--> 5929 </span> 5930 </div> 5931 </div> 5932 <div class="dateStartEndBox"> 5933 <strong>End:</strong> 5934 <xsl:choose> 5935 <xsl:when test="form/end/type='E'"> 5936 <input type="radio" name="eventEndType" value="E" checked="checked" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 5937 </xsl:when> 5938 <xsl:otherwise> 5939 <input type="radio" name="eventEndType" value="E" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 5940 </xsl:otherwise> 5941 </xsl:choose> 5942 Date 5943 <xsl:variable name="endDateTimeClass"> 5944 <xsl:choose> 5945 <xsl:when test="form/end/type='E'">shown</xsl:when> 5946 <xsl:otherwise>invisible</xsl:otherwise> 5947 </xsl:choose> 5948 </xsl:variable> 5949 <div class="{$endDateTimeClass}" id="endDateTime"> 5950 <div class="dateFields"> 5951 <xsl:copy-of select="form/end/dateTime/month/*"/> 5952 <xsl:copy-of select="form/end/dateTime/day/*"/> 5953 <xsl:choose> 5954 <xsl:when test="/bedework/creating = 'true'"> 5955 <xsl:copy-of select="form/end/dateTime/year/*"/> 5956 </xsl:when> 5957 <xsl:otherwise> 5958 <xsl:copy-of select="form/end/dateTime/yearText/*"/> 5959 </xsl:otherwise> 5960 </xsl:choose> 5961 </div> 5962 <!--<script language="JavaScript" type="text/javascript"> 5963 <xsl:comment> 5964 endDateDynCalWidget = new dynCalendar('endDateDynCalWidget', <xsl:value-of select="number(/bedework/formElements/form/start/yearText/input/@value)"/>, <xsl:value-of select="number(/bedework/formElements/form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(/bedework/formElements/form/start/day/select/option[@selected='selected']/@value)"/>, 'endDateCalWidgetCallback'); 5965 </xsl:comment> 5966 </script>--> 5967 <div class="{$timeFieldsClass}" id="endTimeFields"> 5968 <span id="calWidgetEndTimeHider" class="show"> 5969 <xsl:copy-of select="form/end/dateTime/hour/*"/> 5970 <xsl:copy-of select="form/end/dateTime/minute/*"/> 5971 <xsl:if test="form/end/dateTime/ampm"> 5972 <xsl:copy-of select="form/end/dateTime/ampm/*"/> 5973 </xsl:if> 5974 <xsl:text> </xsl:text> 5975 <!--<a href="javascript:bwClockLaunch('eventEndDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a>--> 5976 </span> 5977 </div> 5978 </div><br/> 5979 <div id="clock" class="invisible"> 5980 <xsl:call-template name="clock"/> 5981 </div> 5982 <div class="dateFields"> 5983 <xsl:choose> 5984 <xsl:when test="form/end/type='D'"> 5985 <input type="radio" name="eventEndType" value="D" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 5986 </xsl:when> 5987 <xsl:otherwise> 5988 <input type="radio" name="eventEndType" value="D" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 5989 </xsl:otherwise> 5990 </xsl:choose> 5991 Duration 5992 <xsl:variable name="endDurationClass"> 5993 <xsl:choose> 5994 <xsl:when test="form/end/type='D'">shown</xsl:when> 5995 <xsl:otherwise>invisible</xsl:otherwise> 5996 </xsl:choose> 5997 </xsl:variable> 5998 <xsl:variable name="durationHrMinClass"> 5999 <xsl:choose> 6000 <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 6001 <xsl:otherwise>shown</xsl:otherwise> 6002 </xsl:choose> 6003 </xsl:variable> 6004 <div class="{$endDurationClass}" id="endDuration"> 6005 <xsl:choose> 6006 <xsl:when test="form/end/duration/weeks/input/@value = '0'"> 6007 <!-- we are using day, hour, minute format --> 6008 <!-- must send either no week value or week value of 0 (zero) --> 6009 <div class="durationBox"> 6010 <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')" checked="checked"/> 6011 <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 6012 <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays"/>days 6013 <span id="durationHrMin" class="{$durationHrMinClass}"> 6014 <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 6015 <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours"/>hours 6016 <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 6017 <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes"/>minutes 6018 </span> 6019 </div> 6020 <span class="durationSpacerText">or</span> 6021 <div class="durationBox"> 6022 <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')"/> 6023 <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 6024 <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="disabled"/>weeks 6025 </div> 6026 </xsl:when> 6027 <xsl:otherwise> 6028 <!-- we are using week format --> 6029 <div class="durationBox"> 6030 <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')"/> 6031 <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 6032 <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="disabled"/>days 6033 <span id="durationHrMin" class="{$durationHrMinClass}"> 6034 <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 6035 <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="disabled"/>hours 6036 <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 6037 <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="disabled"/>minutes 6038 </span> 6039 </div> 6040 <span class="durationSpacerText">or</span> 6041 <div class="durationBox"> 6042 <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')" checked="checked"/> 6043 <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 6044 <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks"/>weeks 6045 </div> 6046 </xsl:otherwise> 6047 </xsl:choose> 6048 </div> 6049 </div><br/> 6050 <div class="dateFields" id="noDuration"> 6051 <xsl:choose> 6052 <xsl:when test="form/end/type='N'"> 6053 <input type="radio" name="eventEndType" value="N" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 6054 </xsl:when> 6055 <xsl:otherwise> 6056 <input type="radio" name="eventEndType" value="N" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 6057 </xsl:otherwise> 6058 </xsl:choose> 6059 This event has no duration / end date 6060 </div> 6061 </div> 6062 </td> 6063 </tr> 6064 <tr id="scheduleLocationEdit" class="invisible"> 6065 <td class="fieldname">New Location:</td> 6066 <td class="fieldval scheduleActions"> 6067 <span class="std-text">choose: </span> 6068 <span id="eventFormLocationList"> 6069 <select name="eventLocationUid"> 6070 <option value="-1">select...</option> 6071 <xsl:copy-of select="/bedework/formElements/form/location/locationmenu/select/*"/> 6072 </select> 6073 </span> 6074 <span class="std-text"> or add new: </span> 6075 <input type="text" name="locationAddress.value" value="" /> 5814 6076 </td> 5815 6077 </tr> … … 5848 6110 </td> 5849 6111 <td class="fieldval"> 5850 <div id="scheduleDateDisplay"> 5851 <xsl:value-of select="form/start/month/select/option[@selected='selected']"/> 6112 <xsl:value-of select="form/start/month/select/option[@selected='selected']"/> 6113 <xsl:text> </xsl:text> 6114 <xsl:value-of select="form/start/day/select/option[@selected='selected']"/>, 6115 <xsl:value-of select="form/start/yearText/input/@value"/> 6116 <xsl:text> </xsl:text> 6117 <xsl:value-of select="form/start/hour/select/option[@selected='selected']"/>:<xsl:value-of select="form/start/minute/select/option[@selected='selected']"/> 6118 - 6119 <xsl:value-of select="form/end/dateTime/month/select/option[@selected='selected']"/> 6120 <xsl:text> </xsl:text> 6121 <xsl:value-of select="form/end/dateTime/day/select/option[@selected='selected']"/>, 6122 <xsl:value-of select="form/end/dateTime/yearText/input/@value"/> 6123 <xsl:text> </xsl:text> 6124 <xsl:value-of select="form/end/dateTime/hour/select/option[@selected='selected']"/>:<xsl:value-of select="form/end/dateTime/minute/select/option[@selected='selected']"/> 6125 <xsl:if test="form/allDay/input/@checked='checked'"> 5852 6126 <xsl:text> </xsl:text> 5853 <xsl:value-of select="form/start/day/select/option[@selected='selected']"/>, 5854 <xsl:value-of select="form/start/yearText/input/@value"/> 5855 <xsl:text> </xsl:text> 5856 <xsl:value-of select="form/start/hour/select/option[@selected='selected']"/>:<xsl:value-of select="form/start/minute/select/option[@selected='selected']"/> 5857 - 5858 <xsl:value-of select="form/end/dateTime/month/select/option[@selected='selected']"/> 5859 <xsl:text> </xsl:text> 5860 <xsl:value-of select="form/end/dateTime/day/select/option[@selected='selected']"/>, 5861 <xsl:value-of select="form/end/dateTime/yearText/input/@value"/> 5862 <xsl:text> </xsl:text> 5863 <xsl:value-of select="form/end/dateTime/hour/select/option[@selected='selected']"/>:<xsl:value-of select="form/end/dateTime/minute/select/option[@selected='selected']"/> 5864 <xsl:if test="form/allDay/input/@checked='checked'"> 5865 <xsl:text> </xsl:text> 5866 (all day) 5867 </xsl:if> 5868 </div> 5869 <div id="scheduleDateEdit" class="invisible"> 5870 <!-- Set the timefields class for the first load of the page; 5871 subsequent changes will take place using javascript without a 5872 page reload. --> 5873 <xsl:variable name="timeFieldsClass"> 5874 <xsl:choose> 5875 <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 5876 <xsl:otherwise>timeFields</xsl:otherwise> 5877 </xsl:choose> 5878 </xsl:variable> 5879 <xsl:choose> 5880 <xsl:when test="form/allDay/input/@checked='checked'"> 5881 <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="on" checked="checked"/> 5882 <input type="hidden" name="eventStartDate.dateOnly" value="on" id="allDayStartDateField"/> 5883 <input type="hidden" name="eventEndDate.dateOnly" value="on" id="allDayEndDateField"/> 5884 </xsl:when> 5885 <xsl:otherwise> 5886 <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="off"/> 5887 <input type="hidden" name="eventStartDate.dateOnly" value="off" id="allDayStartDateField"/> 5888 <input type="hidden" name="eventEndDate.dateOnly" value="off" id="allDayEndDateField"/> 5889 </xsl:otherwise> 5890 </xsl:choose> 5891 all day event<br/> 5892 <div class="dateStartEndBox"> 5893 <strong>Start:</strong> 5894 <div class="dateFields"> 5895 <span class="startDateLabel">Date </span> 5896 <xsl:copy-of select="form/start/month/*"/> 5897 <xsl:copy-of select="form/start/day/*"/> 5898 <xsl:choose> 5899 <xsl:when test="/bedework/creating = 'true'"> 5900 <xsl:copy-of select="form/start/year/*"/> 5901 </xsl:when> 5902 <xsl:otherwise> 5903 <xsl:copy-of select="form/start/yearText/*"/> 5904 </xsl:otherwise> 5905 </xsl:choose> 5906 </div> 5907 <!--<script language="JavaScript" type="text/javascript"> 5908 <xsl:comment> 5909 startDateDynCalWidget = new dynCalendar('startDateDynCalWidget', <xsl:value-of select="number(/bedework/formElements/form/start/yearText/input/@value)"/>, <xsl:value-of select="number(/bedework/formElements/form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(/bedework/formElements/form/start/day/select/option[@selected='selected']/@value)"/>, 'startDateCalWidgetCallback'); 5910 </xsl:comment> 5911 </script>--> 5912 <!--<img src="{$resourcesRoot}/resources/calIcon.gif" width="16" height="15" border="0"/>--> 5913 <div class="{$timeFieldsClass}" id="startTimeFields"> 5914 <span id="calWidgetStartTimeHider" class="show"> 5915 <xsl:copy-of select="form/start/hour/*"/> 5916 <xsl:copy-of select="form/start/minute/*"/> 5917 <xsl:if test="form/start/ampm"> 5918 <xsl:copy-of select="form/start/ampm/*"/> 5919 </xsl:if> 5920 <xsl:text> </xsl:text> 5921 <!--<a href="javascript:bwClockLaunch('eventStartDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a>--> 5922 </span> 5923 </div> 5924 </div> 5925 <div class="dateStartEndBox"> 5926 <strong>End:</strong> 5927 <xsl:choose> 5928 <xsl:when test="form/end/type='E'"> 5929 <input type="radio" name="eventEndType" value="E" checked="checked" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 5930 </xsl:when> 5931 <xsl:otherwise> 5932 <input type="radio" name="eventEndType" value="E" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 5933 </xsl:otherwise> 5934 </xsl:choose> 5935 Date 5936 <xsl:variable name="endDateTimeClass"> 5937 <xsl:choose> 5938 <xsl:when test="form/end/type='E'">shown</xsl:when> 5939 <xsl:otherwise>invisible</xsl:otherwise> 5940 </xsl:choose> 5941 </xsl:variable> 5942 <div class="{$endDateTimeClass}" id="endDateTime"> 5943 <div class="dateFields"> 5944 <xsl:copy-of select="form/end/dateTime/month/*"/> 5945 <xsl:copy-of select="form/end/dateTime/day/*"/> 5946 <xsl:choose> 5947 <xsl:when test="/bedework/creating = 'true'"> 5948 <xsl:copy-of select="form/end/dateTime/year/*"/> 5949 </xsl:when> 5950 <xsl:otherwise> 5951 <xsl:copy-of select="form/end/dateTime/yearText/*"/> 5952 </xsl:otherwise> 5953 </xsl:choose> 5954 </div> 5955 <!--<script language="JavaScript" type="text/javascript"> 5956 <xsl:comment> 5957 endDateDynCalWidget = new dynCalendar('endDateDynCalWidget', <xsl:value-of select="number(/bedework/formElements/form/start/yearText/input/@value)"/>, <xsl:value-of select="number(/bedework/formElements/form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(/bedework/formElements/form/start/day/select/option[@selected='selected']/@value)"/>, 'endDateCalWidgetCallback'); 5958 </xsl:comment> 5959 </script>--> 5960 <div class="{$timeFieldsClass}" id="endTimeFields"> 5961 <span id="calWidgetEndTimeHider" class="show"> 5962 <xsl:copy-of select="form/end/dateTime/hour/*"/> 5963 <xsl:copy-of select="form/end/dateTime/minute/*"/> 5964 <xsl:if test="form/end/dateTime/ampm"> 5965 <xsl:copy-of select="form/end/dateTime/ampm/*"/> 5966 </xsl:if> 5967 <xsl:text> </xsl:text> 5968 <!--<a href="javascript:bwClockLaunch('eventEndDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a>--> 5969 </span> 5970 </div> 5971 </div><br/> 5972 <div id="clock" class="invisible"> 5973 <xsl:call-template name="clock"/> 5974 </div> 5975 <div class="dateFields"> 5976 <xsl:choose> 5977 <xsl:when test="form/end/type='D'"> 5978 <input type="radio" name="eventEndType" value="D" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 5979 </xsl:when> 5980 <xsl:otherwise> 5981 <input type="radio" name="eventEndType" value="D" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 5982 </xsl:otherwise> 5983 </xsl:choose> 5984 Duration 5985 <xsl:variable name="endDurationClass"> 5986 <xsl:choose> 5987 <xsl:when test="form/end/type='D'">shown</xsl:when> 5988 <xsl:otherwise>invisible</xsl:otherwise> 5989 </xsl:choose> 5990 </xsl:variable> 5991 <xsl:variable name="durationHrMinClass"> 5992 <xsl:choose> 5993 <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 5994 <xsl:otherwise>shown</xsl:otherwise> 5995 </xsl:choose> 5996 </xsl:variable> 5997 <div class="{$endDurationClass}" id="endDuration"> 5998 <xsl:choose> 5999 <xsl:when test="form/end/duration/weeks/input/@value = '0'"> 6000 <!-- we are using day, hour, minute format --> 6001 <!-- must send either no week value or week value of 0 (zero) --> 6002 <div class="durationBox"> 6003 <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')" checked="checked"/> 6004 <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 6005 <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays"/>days 6006 <span id="durationHrMin" class="{$durationHrMinClass}"> 6007 <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 6008 <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours"/>hours 6009 <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 6010 <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes"/>minutes 6011 </span> 6012 </div> 6013 <span class="durationSpacerText">or</span> 6014 <div class="durationBox"> 6015 <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')"/> 6016 <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 6017 <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="disabled"/>weeks 6018 </div> 6019 </xsl:when> 6020 <xsl:otherwise> 6021 <!-- we are using week format --> 6022 <div class="durationBox"> 6023 <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')"/> 6024 <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 6025 <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="disabled"/>days 6026 <span id="durationHrMin" class="{$durationHrMinClass}"> 6027 <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 6028 <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="disabled"/>hours 6029 <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 6030 <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="disabled"/>minutes 6031 </span> 6032 </div> 6033 <span class="durationSpacerText">or</span> 6034 <div class="durationBox"> 6035 <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')" checked="checked"/> 6036 <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 6037 <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks"/>weeks 6038 </div> 6039 </xsl:otherwise> 6040 </xsl:choose> 6041 </div> 6042 </div><br/> 6043 <div class="dateFields" id="noDuration"> 6044 <xsl:choose> 6045 <xsl:when test="form/end/type='N'"> 6046 <input type="radio" name="eventEndType" value="N" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 6047 </xsl:when> 6048 <xsl:otherwise> 6049 <input type="radio" name="eventEndType" value="N" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 6050 </xsl:otherwise> 6051 </xsl:choose> 6052 This event has no duration / end date 6053 </div> 6054 </div> 6055 </div> 6127 (all day) 6128 </xsl:if> 6056 6129 </td> 6057 6130 </tr> … … 6059 6132 <td class="fieldname">Location:</td> 6060 6133 <td class="fieldval" align="left"> 6061 <div id="scheduleLocationDisplay"> 6062 <xsl:if test="location/address = ''"> 6063 <em>not specified</em> 6064 </xsl:if> 6065 <xsl:value-of select="location/address"/> 6066 </div> 6067 <div id="scheduleLocationEdit" class="invisible"> 6068 <span class="std-text">choose: </span> 6069 <span id="eventFormLocationList"> 6070 <select name="eventLocationUid"> 6071 <option value="-1">select...</option> 6072 <xsl:copy-of select="/bedework/formElements/form/location/locationmenu/select/*"/> 6073 </select> 6074 </span> 6075 <span class="std-text"> or add new: </span> 6076 <input type="text" name="locationAddress.value" value="" /> 6077 </div> 6134 <xsl:if test="location/address = ''"> 6135 <em>not specified</em> 6136 </xsl:if> 6137 <xsl:value-of select="location/address"/> 6078 6138 </td> 6079 6139 </tr> … … 6916 6976 javascript object. Required for method two. --> 6917 6977 6918 <xsl:if test="$method = '2' and $acl != ''">6919 <!-- do some initialization here -->6920 </xsl:if>6921 6978 <table cellpadding="0" id="shareFormTable" class="common"> 6922 6979 <tr> … … 6956 7013 </h5> 6957 7014 <input type="hidden" name="how" value=""/> 7015 <!-- field 'acl' will receive xml for method 2 --> 7016 <input type="hidden" name="acl" value=""/> 6958 7017 <!-- Advanced Access Rights: --> 6959 7018 <!-- the "how" field is set by iterating over the howItems below --> … … 7191 7250 <xsl:choose> 7192 7251 <xsl:when test="$method = '2'"> 7193 <input type="button" name="updateACLs" value="update access" onclick=" updateAccessAcl(this.form)"/>7252 <input type="button" name="updateACLs" value="update access" onclick="bwAcl.update(this.form)"/> 7194 7253 </xsl:when> 7195 7254 <xsl:otherwise> … … 7205 7264 <xsl:param name="recurrenceId"/> <!-- optional (for entities) --> 7206 7265 <xsl:param name="what"/> <!-- optional (for scheduling only) --> 7266 <xsl:param name="method">1</xsl:param> <!-- which method of access control 7267 are we using: 1 (one request per pricipal) or 2 (set all with 7268 javascript and send entire ACL to server) --> 7207 7269 <h3>Current Access:</h3> 7208 <table class="common scheduling"> 7270 <table class="common scheduling" id="bwCurrentAccess"> 7271 <thead> 7209 7272 <tr> 7210 7273 <th>Entry</th> … … 7213 7276 <td></td> 7214 7277 </tr> 7278 </thead> 7279 <tbody> 7215 7280 <xsl:for-each select="ace"> 7216 <xsl:variable name="who"> 7217 <xsl:choose> 7218 <xsl:when test="invert"> 7219 <xsl:choose> 7220 <xsl:when test="invert/principal/href"><xsl:value-of select="normalize-space(invert/principal/href)"/></xsl:when> 7221 <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 7222 <xsl:otherwise><xsl:value-of select="name(invert/principal/*)"/></xsl:otherwise> 7223 </xsl:choose> 7224 </xsl:when> 7225 <xsl:otherwise> 7226 <xsl:choose> 7227 <xsl:when test="principal/href"><xsl:value-of select="normalize-space(principal/href)"/></xsl:when> 7228 <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 7229 <xsl:otherwise><xsl:value-of select="name(principal/*)"/></xsl:otherwise> 7230 </xsl:choose> 7231 </xsl:otherwise> 7232 </xsl:choose> 7233 </xsl:variable> 7234 <xsl:variable name="whoType"> 7235 <xsl:choose> 7236 <xsl:when test="contains($who,/bedework/syspars/userPrincipalRoot)">user</xsl:when> 7237 <xsl:when test="contains($who,/bedework/syspars/groupPrincipalRoot)">group</xsl:when> 7238 <xsl:when test="$who='authenticated'">auth</xsl:when> 7239 <xsl:when test="$who='unauthenticated'">unauth</xsl:when> 7240 <xsl:when test="invert/principal/property/owner">other</xsl:when> 7241 <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 7242 <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 7243 <xsl:otherwise></xsl:otherwise> 7244 </xsl:choose> 7245 </xsl:variable> 7246 <xsl:variable name="shortWho"> 7247 <xsl:choose> 7248 <xsl:when test="$whoType='user'"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedework/syspars/userPrincipalRoot)),'/')"/></xsl:when> 7249 <xsl:when test="$whoType='group'"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedework/syspars/groupPrincipalRoot)),'/')"/></xsl:when> 7250 <xsl:otherwise></xsl:otherwise> <!-- if not user or group, send no who --> 7251 </xsl:choose> 7252 </xsl:variable> 7253 <tr> 7254 <td> 7281 <xsl:variable name="who"> 7255 7282 <xsl:choose> 7256 <xsl:when test="$whoType = 'user' or ($who = 'owner' and $whoType != 'other')"> 7257 <img src="{$resourcesRoot}/resources/userIcon.gif" width="13" height="13" border="0" alt="user"/> 7283 <xsl:when test="invert"> 7284 <xsl:choose> 7285 <xsl:when test="invert/principal/href"><xsl:value-of select="normalize-space(invert/principal/href)"/></xsl:when> 7286 <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 7287 <xsl:otherwise><xsl:value-of select="name(invert/principal/*)"/></xsl:otherwise> 7288 </xsl:choose> 7258 7289 </xsl:when> 7259 7290 <xsl:otherwise> 7260 <img src="{$resourcesRoot}/resources/groupIcon.gif" width="13" height="13" border="0" alt="group"/> 7291 <xsl:choose> 7292 <xsl:when test="principal/href"><xsl:value-of select="normalize-space(principal/href)"/></xsl:when> 7293 <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 7294 <xsl:otherwise><xsl:value-of select="name(principal/*)"/></xsl:otherwise> 7295 </xsl:choose> 7261 7296 </xsl:otherwise> 7262 7297 </xsl:choose> 7263 <xsl:text> </xsl:text> 7298 </xsl:variable> 7299 <xsl:variable name="whoType"> 7264 7300 <xsl:choose> 7265 <xsl:when test="$whoType = 'other'"> 7266 anyone (other) 7267 </xsl:when> 7268 <xsl:when test="$shortWho != ''"> 7269 <xsl:value-of select="$shortWho"/> 7270 </xsl:when> 7271 <xsl:otherwise> 7272 <xsl:value-of select="$who"/> 7273 </xsl:otherwise> 7301 <xsl:when test="contains($who,/bedework/syspars/userPrincipalRoot)">user</xsl:when> 7302 <xsl:when test="contains($who,/bedework/syspars/groupPrincipalRoot)">group</xsl:when> 7303 <xsl:when test="$who='authenticated'">auth</xsl:when> 7304 <xsl:when test="$who='unauthenticated'">unauth</xsl:when> 7305 <xsl:when test="invert/principal/property/owner">other</xsl:when> 7306 <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 7307 <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 7308 <xsl:otherwise></xsl:otherwise> 7274 7309 </xsl:choose> 7275 </td> 7276 <td class="acls"> 7277 <xsl:if test="grant"> 7278 grant: 7279 <span class="grant"> 7280 <xsl:for-each select="grant/*"> 7281 <xsl:value-of select="name(.)"/> 7282 <xsl:if test="position() != last()">, </xsl:if> 7283 </xsl:for-each> 7284 </span><br/> 7285 </xsl:if> 7286 <xsl:if test="deny"> 7287 deny: 7288 <span class="deny"> 7289 <xsl:for-each select="deny/*"> 7290 <xsl:value-of select="name(.)"/> 7291 <xsl:if test="position() != last()">, </xsl:if> 7292 </xsl:for-each> 7293 </span> 7294 </xsl:if> 7295 </td> 7296 <td> 7310 </xsl:variable> 7311 <xsl:variable name="shortWho"> 7297 7312 <xsl:choose> 7298 <xsl:when test="inherited"> 7299 <xsl:value-of select="inherited/href"/> 7300 </xsl:when> 7301 <xsl:otherwise> 7302 local 7303 </xsl:otherwise> 7313 <xsl:when test="$whoType='user'"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedework/syspars/userPrincipalRoot)),'/')"/></xsl:when> 7314 <xsl:when test="$whoType='group'"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedework/syspars/groupPrincipalRoot)),'/')"/></xsl:when> 7315 <xsl:otherwise></xsl:otherwise> <!-- if not user or group, send no who --> 7304 7316 </xsl:choose> 7305 </td> 7306 <td> 7307 <xsl:if test="not(inherited)"> 7308 <a href="{$action}&how=default&what={$what}&who={$shortWho}&whoType={$whoType}&calPath={$calPathEncoded}&guid={$guid}&recurrenceId={$recurrenceId}" title="reset to default"> 7309 <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="reset to default"/> 7310 </a> 7311 </xsl:if> 7312 </td> 7313 </tr> 7314 </xsl:for-each> 7317 </xsl:variable> 7318 <tr> 7319 <td> 7320 <xsl:choose> 7321 <xsl:when test="$whoType = 'user' or ($who = 'owner' and $whoType != 'other')"> 7322 <img src="{$resourcesRoot}/resources/userIcon.gif" width="13" height="13" border="0" alt="user"/> 7323 </xsl:when> 7324 <xsl:otherwise> 7325 <img src="{$resourcesRoot}/resources/groupIcon.gif" width="13" height="13" border="0" alt="group"/> 7326 </xsl:otherwise> 7327 </xsl:choose> 7328 <xsl:text> </xsl:text> 7329 <xsl:choose> 7330 <xsl:when test="$whoType = 'other'"> 7331 anyone (other) 7332 </xsl:when> 7333 <xsl:when test="$shortWho != ''"> 7334 <xsl:value-of select="$shortWho"/> 7335 </xsl:when> 7336 <xsl:otherwise> 7337 <xsl:value-of select="$who"/> 7338 </xsl:otherwise> 7339 </xsl:choose> 7340 </td> 7341 <td class="acls"> 7342 <xsl:if test="grant"> 7343 grant: 7344 <span class="grant"> 7345 <xsl:for-each select="grant/*"> 7346 <xsl:value-of select="name(.)"/> 7347 <xsl:if test="position() != last()">, </xsl:if> 7348 </xsl:for-each> 7349 </span><br/> 7350 </xsl:if> 7351 <xsl:if test="deny"> 7352 deny: 7353 <span class="deny"> 7354 <xsl:for-each select="deny/*"> 7355 <xsl:value-of select="name(.)"/> 7356 <xsl:if test="position() != last()">, </xsl:if> 7357 </xsl:for-each> 7358 </span> 7359 </xsl:if> 7360 </td> 7361 <td> 7362 <xsl:choose> 7363 <xsl:when test="inherited"> 7364 <xsl:value-of select="inherited/href"/> 7365 </xsl:when> 7366 <xsl:otherwise> 7367 local 7368 </xsl:otherwise> 7369 </xsl:choose> 7370 </td> 7371 <td> 7372 <xsl:if test="not(inherited)"> 7373 <xsl:choose> 7374 <xsl:when test="$method = '2'"> 7375 <!-- we are using javascript to update the form --> 7376 <xsl:variable name="rowPos" select="position()-1"/> 7377 <a href="javascript:bwAcl.deleteAce({$rowPos})" title="reset to default"> 7378 remove 7379 </a> 7380 </xsl:when> 7381 <xsl:otherwise> 7382 <a href="{$action}&how=default&what={$what}&who={$shortWho}&whoType={$whoType}&calPath={$calPathEncoded}&guid={$guid}&recurrenceId={$recurrenceId}" title="reset to default"> 7383 <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="reset to default"/> 7384 </a> 7385 </xsl:otherwise> 7386 </xsl:choose> 7387 </xsl:if> 7388 </td> 7389 </tr> 7390 </xsl:for-each> 7391 </tbody> 7315 7392 </table> 7316 7393 </xsl:template> 7317 7394 7318 7395 <!--==== SEARCH RESULT ====--> 7319 7396 <xsl:template name="searchResult"> … … 7555 7632 </xsl:template> 7556 7633 7634 <!-- return string values to be loaded into javascript for access control 7635 forms, method 2 --> 7636 <xsl:template match="ace" mode="initJS"><!-- 7637 --><xsl:variable name="who"><!-- 7638 --><xsl:choose> 7639 <xsl:when test="invert"> 7640 <xsl:choose> 7641 <xsl:when test="invert/principal/href"><xsl:value-of select="normalize-space(invert/principal/href)"/></xsl:when> 7642 <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 7643 <xsl:otherwise><xsl:value-of select="name(invert/principal/*)"/></xsl:otherwise> 7644 </xsl:choose> 7645 </xsl:when> 7646 <xsl:otherwise> 7647 <xsl:choose> 7648 <xsl:when test="principal/href"><xsl:value-of select="normalize-space(principal/href)"/></xsl:when> 7649 <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 7650 <xsl:otherwise><xsl:value-of select="name(principal/*)"/></xsl:otherwise> 7651 </xsl:choose> 7652 </xsl:otherwise> 7653 </xsl:choose><!-- 7654 --></xsl:variable><!-- 7655 --><xsl:variable name="whoType"><!-- 7656 --><xsl:choose> 7657 <xsl:when test="contains($who,/bedework/syspars/userPrincipalRoot)">user</xsl:when> 7658 <xsl:when test="contains($who,/bedework/syspars/groupPrincipalRoot)">group</xsl:when> 7659 <xsl:when test="$who='authenticated'">auth</xsl:when> 7660 <xsl:when test="$who='unauthenticated'">unauth</xsl:when> 7661 <xsl:when test="invert/principal/property/owner">other</xsl:when> 7662 <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 7663 <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 7664 <xsl:otherwise></xsl:otherwise> 7665 </xsl:choose><!-- 7666 --></xsl:variable><!-- 7667 --><xsl:variable name="aclString"><!-- 7668 --><xsl:if test="grant"><!-- 7669 --><xsl:for-each select="grant/*"><xsl:call-template name="grantDenyToInternal"><xsl:with-param name="name"><xsl:value-of select="name(.)"/></xsl:with-param></xsl:call-template></xsl:for-each><!-- 7670 --></xsl:if><!-- 7671 --><xsl:if test="deny"><!-- 7672 --><xsl:for-each select="deny/*">-<xsl:call-template name="grantDenyToInternal"><xsl:with-param name="name"><xsl:value-of select="name(.)"/></xsl:with-param></xsl:call-template></xsl:for-each><!-- 7673 --></xsl:if><!-- 7674 --></xsl:variable><!-- 7675 --><xsl:variable name="inherited"><!-- 7676 --><xsl:choose> 7677 <xsl:when test="inherited"><xsl:value-of select="inherited/href"/></xsl:when> 7678 <xsl:otherwise>local</xsl:otherwise> 7679 </xsl:choose><!-- 7680 --></xsl:variable><!-- 7681 --><xsl:variable name="invert"><!-- 7682 --><xsl:choose> 7683 <xsl:when test="invert">true</xsl:when> 7684 <xsl:otherwise>false</xsl:otherwise> 7685 </xsl:choose><!-- 7686 --></xsl:variable> 7687 <!-- now initialize the object:--> 7688 bwAcl.init('<xsl:value-of select="$who"/>','<xsl:value-of select="$whoType"/>','<xsl:value-of select="$aclString"/>','<xsl:value-of select="$inherited"/>','<xsl:value-of select="$invert"/>'); 7689 </xsl:template> 7690 7691 <xsl:template name="grantDenyToInternal"><!-- 7692 --><xsl:param name="name"/><!-- 7693 --><xsl:choose> 7694 <xsl:when test="$name = 'all'">A</xsl:when> 7695 <xsl:when test="$name = 'read'">R</xsl:when> 7696 <xsl:when test="$name = 'read-acl'">r</xsl:when> 7697 <xsl:when test="$name = 'read-cuurrent-user-privilege-set'">P</xsl:when> 7698 <xsl:when test="$name = 'read-free-busy'">F</xsl:when> 7699 <xsl:when test="$name = 'write'">W</xsl:when> 7700 <xsl:when test="$name = 'write-acl'">a</xsl:when> 7701 <xsl:when test="$name = 'write-properties'">p</xsl:when> 7702 <xsl:when test="$name = 'write-content'">c</xsl:when> 7703 <xsl:when test="$name = 'bind'">b</xsl:when> 7704 <xsl:when test="$name = 'schedule'">S</xsl:when> 7705 <xsl:when test="$name = 'schedule-request'">t</xsl:when> 7706 <xsl:when test="$name = 'schedule-reply'">y</xsl:when> 7707 <xsl:when test="$name = 'schedule-free-busy'">s</xsl:when> 7708 <xsl:when test="$name = 'unbind'">u</xsl:when> 7709 <xsl:when test="$name = 'unlock'">U</xsl:when> 7710 <xsl:when test="$name = 'none'">N</xsl:when> 7711 </xsl:choose><!-- 7712 --></xsl:template> 7713 7557 7714 <!-- search and replace template taken from 7558 7715 http://www.biglist.com/lists/xsl-list/archives/200211/msg00337.html --> … … 7576 7733 </xsl:choose> 7577 7734 </xsl:template> 7578 7735 7579 7736 <!--==== FOOTER ====--> 7580 7737 <xsl:template name="footer"> trunk/deployment/webuser/webapp/resources/demoskins/resources/bedeworkAccess.js
r1439 r1445 40 40 // named after the howItem's value (e.g. "A","R","F","N", etc). We enable 41 41 // and disable the corresponding radio buttons as well. 42 43 // ======================================================================== 44 // ======================================================================== 45 // Language and customization 46 47 var authenticatedStr = "authenticated"; 48 var unauthenticatedStr = "unauthenticated"; 49 var ownerStr = "owner"; 50 var otherStr = "other"; 51 var deleteStr = "remove"; 52 var grantStr = "grant"; 53 54 // ======================================================================== 55 // ======================================================================== 56 57 58 59 42 60 function setupAccessForm(chkBoxObj,formObj) { 43 61 switch (chkBoxObj.value) { 44 62 case "A": // All 45 if (chkBoxObj.checked == true) {63 if (chkBoxObj.checked) { 46 64 for (i = 0; i < formObj.howItem.length; i++) { 47 65 if (formObj.howItem[i].value != "A") { … … 61 79 break; 62 80 case "R": // Read 63 if (chkBoxObj.checked == true) {81 if (chkBoxObj.checked) { 64 82 for (i = 0; i < formObj.howItem.length; i++) { 65 83 if (formObj.howItem[i].value == "r" || … … 205 223 } 206 224 } 207 // Gather up the how values on access form submission and set the how field .208 // This is used for the non-javasscript widget approach to setting access.225 // Gather up the how values on access form submission and set the how field 226 // (method 1) or return the value (method 2). 209 227 // If in "basic" mode: 210 228 // Set the value of how to the value of the basicHowItem radio button. … … 214 232 // The allow/deny flag contains the final values to be returned with 215 233 // the "-" switch if we set the value to deny (e.g. "A" or "-A", "R" or "-R"). 216 function setAccessHow(formObj) { 234 // Method: there are two methods used with this function; method one sets 235 // the "how" field in the form used to update a single principal. Method 236 // two returns the assembled how string to the calling function. 237 function setAccessHow(formObj,method) { 217 238 var howString = ""; 218 239 if (formObj.setappvar[0].checked == true) { // "basic" mode is selected … … 234 255 } 235 256 } 236 // alert("Setting how to: " + howString); 237 formObj.how.value = howString; 257 if (method == 2) { 258 return howString; 259 } else { 260 formObj.how.value = howString; 261 } 238 262 } 239 263 240 264 241 265 /* METHOD TWO FUNCTIONS*/ 242 // An array of bwAcl objects are initialized at the point of the XSLT transform. 243 // This is defined in the XSLT file as "bwAclArray" and is used here. 244 245 // ACL Object 246 function bwAcl() { 247 this.who; 248 this.whoType; 249 this.how; 266 // Acces Control Entry (ACE) object 267 268 269 function bwAce(who,whoType,how,inherited,invert) { 270 this.who = who; 271 this.whoType = whoType; 272 this.how = how; 273 this.inherited = inherited; 274 this.invert = invert; // boolean 275 276 this.equals = function(ace) { 277 if (this.whoType != ace.whoType) { 278 return false; 279 } 280 281 return (this.formatWho() == ace.formatWho()); 282 } 283 284 // format the who string for on-screen display 285 this.formatWho = function() { 286 if (whoType == "user" || whoType == "group") { 287 return who; 288 } 289 290 if (whoType == "auth") { 291 return authenticatedStr; 292 } 293 294 if (whoType == "unauth") { 295 return unauthenticatedStr; 296 } 297 298 if (whoType == "owner") { 299 return ownerStr; 300 } 301 302 if (whoType == "other") { 303 return otherStr; 304 } 305 306 return "***************" + whoType; 307 } 308 309 this.toXml = function() { 310 var res = "<ace><principal>\n"; 311 312 if (whoType == "user" || whoType == "group") { 313 res += "<href>" + who + "</href>"; 314 } else if (whoType == "auth") { 315 res += "<property>" + who + "</property>"; 316 }else if (whoType == "unauth") { 317 res += "<property>" + who + "</property>"; 318 } if (whoType == "owner") { 319 res += "<property>" + who + "</property>"; 320 } if (whoType == "other") { 321 res += "<invert><principal>" + who + "</principal></invert>"; 322 } 323 res += "</principal>"; 324 res += "<grant>"; 325 res += "<read/>"; 326 res += "</grant>"; 327 328 if (this.inherited != '') { 329 res += "<inherited><href>" + this.inherited + "</href></inherited>"; 330 } 331 332 return res + "</ace>"; 333 } 250 334 } 251 // Update the bwACL object 252 function updateAccessAcl(formObj) { 253 335 336 // Access Control List (ACL) object - an array of ACEs 337 // The bwAcl object is initialized during the XSLT transform. 338 var bwAcl = new function() { 339 var aces = new Array(); 340 341 // Initialize the list. 342 // The function expects a comma-separated list of arguments grouped 343 // into the five ACE properties. 344 this.init = function(who,whoType,how,inherited,invert) { 345 aces.push(new bwAce(who,whoType,how,inherited,invert)); 346 } 347 348 // Add or update an ace 349 this.addAce = function(newAce) { 350 // expects a bwAce object as parameter 351 for (i = 0; i < aces.length; i++) { 352 if (aces[i].equals(newAce)) { 353 // replace an existing ace 354 aces[i] = newAce; 355 return; 356 } 357 } 358 // not found: add ace to end of array 359 aces.push(newAce); 360 } 361 362 // Update the list - expects the browser form object 363 this.update = function(formObj) { 364 // get the type of ace being set 365 var type; 366 for (i = 0; i < formObj.whoType.length; i++) { 367 if (formObj.whoType[i].checked == true) { 368 type = formObj.whoType[i].value; 369 } 370 } 371 // validate for user or group 372 if ((type == 'user' || type == 'group') && formObj.who.value == '') { 373 alert("you must enter a user or group name"); 374 formObj.who.focus(); 375 return; 376 } 377 // return the how string from the form 378 var how = setAccessHow(formObj,2); 379 // update the bwAcl 380 bwAcl.addAce(new bwAce(formObj.who.value,type,how,"local",false)); 381 382 // update the acl form field 383 formObj.acl = this.toXml(); 384 385 // redraw the display 386 this.display(); 387 } 388 389 this.deleteAce = function(index) { 390 bwAcl.aces.splice(index, 1); 391 392 // redraw the display 393 this.display(); 394 } 395 396 // update the ACL table displayed on screen 397 this.display = function() { 398 try { 399 // get the table body 400 var aclTableBody = document.getElementById("bwCurrentAccess").tBodies[0]; 401 402 // remove existing rows 403 for (i = aclTableBody.rows.length - 1; i >= 0; i--) { 404 aclTableBody.deleteRow(i); 405 } 406 407 // recreate the table rows 408 for (var j = 0; j < aces.length; j++) { 409 var formattedWho = aces[j].formatWho(); 410 var formattedHow = this.formatHow(aces[j].how); 411 var tr = aclTableBody.insertRow(j); 412 tr.insertCell(0).appendChild(document.createTextNode(formattedWho)); 413 var td_1 = tr.insertCell(1); 414 td_1.appendChild(document.createTextNode(formattedHow)); 415 var td_2 = tr.insertCell(2); 416 td_2.appendChild(document.createTextNode(aces[j].inherited)); 417 var td_3 = tr.insertCell(3); 418 td_3.appendChild(document.createTextNode('')); 419 //<a href="javascript:bwAcl.delete(' + j +')">' + deleteStr + '</a> 420 } 421 } catch (e) { 422 alert(e); 423 } 424 } 425 426 // format the how string for on-screen display 427 this.formatHow = function(how) { 428 var formattedHow = ""; 429 430 for (i = 0; i < how.length; i++) { 431 switch (how[i]) { 432 case "-": 433 formattedHow += "not-"; 434 break; 435 case "A": 436 formattedHow += "all "; 437 break; 438 case "R": 439 formattedHow += "read "; 440 break; 441 case "r": 442 formattedHow += "read-acl "; 443 break; 444 case "P": 445 formattedHow += "read-privSet "; 446 break; 447 case "F": 448 formattedHow += "read-freebusy "; 449 break; 450 case "W": 451 formattedHow += "write "; 452 break; 453 case "a": 454 formattedHow += "write-acl "; 455 break; 456 case "p": 457 formattedHow += "write-properties "; 458 break; 459 case "c": 460 formattedHow += "write-content "; 461 break; 462 case "b": 463 formattedHow += "create "; 464 break; 465 case "S": 466 formattedHow += "schedule "; 467 break; 468 case "t": 469 formattedHow += "schedule-request "; 470 break; 471 case "y": 472 formattedHow += "schedule-reply "; 473 break; 474 case "s": 475 formattedHow += "schedule-freebusy "; 476 break; 477 case "u": 478 formattedHow += "delete "; 479 break; 480 case "U": 481 formattedHow += "unlock "; 482 break; 483 case "N": 484 formattedHow += "none "; 485 break; 486 } 487 } 488 return formattedHow; 489 } 490 491 /* 'A', // privAll 492 493 'R', // privRead 494 'r', // privReadAcl 495 'P', // privReadCurrentUserPrivilegeSet 496 'F', // privReadFreeBusy 497 498 'W', // privWrite 499 'a', // privWriteAcl 500 'p', // privWriteProperties 501 'c', // privWriteContent 502 'b', // privBind 503 504 'S', // privSchedule 505 't', // privScheduleRequest 506 'y', // privScheduleReply 507 's', // privScheduleFreeBusy 508 509 'u', // privUnbind 510 // unbind and bind usually correspond to create and destroy 511 512 'U', // privUnlock 513 // not implemented 514 515 'N', // privNone 516 */ 517 // generate webDAV ACl XML output 518 this.toXml = function() { 519 var res = "<acl>\n"; 520 521 for (var j = 0; j < aces.length; j++) { 522 res += aces[j].toXml(); 523 } 524 525 return res + "</acl>"; 526 } 254 527 } 255 function displayAccessAcl() { 256 257 } 258 function setAccessHowMethodTwo() { 259 260 } 528 529 530 531 trunk/deployment/webuser/webapp/resources/demoskins/resources/bedeworkEventForm.js
r1439 r1445 34 34 setDates(formObj); 35 35 setRecurrence(formObj); 36 setAccessHow(formObj );36 setAccessHow(formObj,1); 37 37 setAccessAcl(formObj); 38 38 } trunk/deployment/webuser/webapp/resources/demoskins/resources/bedeworkPrefs.js
r1342 r1445 49 49 function swapScheduleDisplay(val) { 50 50 if (val == "show") { 51 changeClass('scheduleLocationDisplay','invisible');52 51 changeClass('scheduleLocationEdit','shown'); 53 changeClass('scheduleDateDisplay','invisible');54 52 changeClass('scheduleDateEdit','shown'); 55 53 } else { 56 changeClass('scheduleLocationDisplay','shown');57 54 changeClass('scheduleLocationEdit','invisible'); 58 changeClass('scheduleDateDisplay','shown');59 55 changeClass('scheduleDateEdit','invisible'); 60 56 } trunk/deployment/webuser/webapp/resources/demoskins/resources/bwClock.css
r1431 r1445 24 24 position: absolute; 25 25 top: 130px; 26 left: 3 50px;26 left: 340px; 27 27 z-index: -1; 28 width: 180px;28 width: 220px; 29 29 text-align: center; 30 30 color: black; … … 58 58 position: absolute; 59 59 bottom: 5px; 60 left: 15px;60 left: 25px; 61 61 margin: 0; 62 62 } trunk/deployment/webuser/webapp/resources/demoskins/resources/bwClock.js
r1308 r1445 17 17 bwClockHour = null; 18 18 bwClockMinute = null; 19 bwClockIndicator = document.getElementById("bwClockDateTypeIndicator");20 bwClockSwitch = document.getElementById("bwClockSwitch");19 var bwClockIndicator = document.getElementById("bwClockDateTypeIndicator"); 20 var bwClockSwitch = document.getElementById("bwClockSwitch"); 21 21 document.getElementById("bwClockTime").innerHTML = "select time"; 22 22 if (type == 'eventStartDate') {
