Changeset 1179
- Timestamp:
- 12/26/06 18:25:26
- Files:
-
- trunk/deployment/webadmin/webapp/resources/default/default/default.css (modified) (4 diffs)
- trunk/deployment/webadmin/webapp/resources/default/default/default.xsl (modified) (50 diffs)
- trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.css (modified) (2 diffs)
- trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl (modified) (3 diffs)
- trunk/deployment/webuser/webapp/resources/demoskins/resources/includes.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/deployment/webadmin/webapp/resources/default/default/default.css
r1161 r1179 253 253 background-color: #eee; 254 254 } 255 .recurrenceEditLinks { 256 font-style: italic; 257 font-size: 0.9em; 258 margin-top: 0.5em; 259 } 255 260 table.eventFormTable { 256 261 margin: 1em 0; … … 425 430 position: relative; 426 431 } 427 428 432 #tztable { 429 433 margin-top: 1em; … … 431 435 #tztable td { 432 436 padding: 2px 4px; 437 } 438 #recurrenceInfo { 439 font-size: 0.9em; 440 font-style: italic; 441 margin-bottom: 0.5em; 433 442 } 434 443 #recurrenceFields #recurrenceTable strong { … … 445 454 width: 100%; 446 455 padding: 0.5em 0 0 1em; 447 border-top: 1px solid #ddd;448 456 border-left: 1px solid #ddd; 457 } 458 #recurrenceFields #recurrenceTable td.recurrenceRules #advancedRecurrenceRules { 459 display: block; 460 border-bottom: 1px solid #ddd; 449 461 } 450 462 #recurrenceFields #recurrenceTable td.recurrenceRules .rruleBlock { trunk/deployment/webadmin/webapp/resources/default/default/default.xsl
r1177 r1179 233 233 </xsl:when> 234 234 <xsl:when test="/bedeworkadmin/page='modEvent'"> 235 <xsl: call-template name="modEvent"/>235 <xsl:apply-templates select="/bedeworkadmin/formElements" mode="modEvent"/> 236 236 </xsl:when> 237 237 <xsl:when test="/bedeworkadmin/page='displayEvent' or /bedeworkadmin/page='deleteEventConfirm'"> … … 621 621 <td> 622 622 <xsl:value-of select="description"/> 623 <xsl:if test="recurring = 'true'"> 624 <div class="recurrenceEditLinks"> 625 Recurring event. 626 Edit: 627 <a href="{$event-fetchForUpdate}&subid={$subscriptionId}&calPath={$calPath}&guid={$guid}"> 628 master 629 </a> | 630 <a href="{$event-fetchForUpdate}&subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> 631 instance 632 </a> 633 </div> 634 </xsl:if> 623 635 </td> 624 636 </tr> … … 627 639 </xsl:template> 628 640 629 <xsl:template name="modEvent"> 641 <xsl:template match="formElements" mode="modEvent"> 642 <xsl:variable name="subscriptionId" select="subscriptionId"/> 643 <xsl:variable name="calPathEncoded" select="form/calendar/encodedPath"/> 644 <xsl:variable name="calPath" select="form/calendar/path"/> 645 <xsl:variable name="guid" select="guid"/> 646 <xsl:variable name="recurrenceId" select="recurrenceId"/> 647 630 648 <h2>Event Information</h2> 631 649 632 <xsl:variable name="modEventAction" select=" /bedeworkadmin/formElements/form/@action"/>650 <xsl:variable name="modEventAction" select="form/@action"/> 633 651 <form name="peForm" method="post" action="{$modEventAction}" onsubmit="setRecurrence(this)"> 634 652 <table class="eventFormTable"> … … 638 656 </td> 639 657 <td> 640 <xsl:copy-of select=" /bedeworkadmin/formElements/form/title/*"/>658 <xsl:copy-of select="form/title/*"/> 641 659 </td> 642 660 </tr> … … 646 664 </td> 647 665 <td> 648 <xsl:if test=" /bedeworkadmin/formElements/form/calendar/preferred/select/option">666 <xsl:if test="form/calendar/preferred/select/option"> 649 667 <select name="prefCalendarId"> 650 668 <option value="-1"> 651 669 Select preferred: 652 670 </option> 653 <xsl:copy-of select=" /bedeworkadmin/formElements/form/calendar/preferred/select/*"/>671 <xsl:copy-of select="form/calendar/preferred/select/*"/> 654 672 </select> 655 673 or Calendar (all): … … 659 677 Select: 660 678 </option> 661 <xsl:copy-of select=" /bedeworkadmin/formElements/form/calendar/all/select/*"/>679 <xsl:copy-of select="form/calendar/all/select/*"/> 662 680 </select> 663 681 <xsl:text> </xsl:text> … … 678 696 <xsl:variable name="timeFieldsClass"> 679 697 <xsl:choose> 680 <xsl:when test=" /bedeworkadmin/formElements/form/allDay/input/@checked='checked'">invisible</xsl:when>698 <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 681 699 <xsl:otherwise>timeFields</xsl:otherwise> 682 700 </xsl:choose> 683 701 </xsl:variable> 684 702 <xsl:choose> 685 <xsl:when test=" /bedeworkadmin/formElements/form/allDay/input/@checked='checked'">703 <xsl:when test="form/allDay/input/@checked='checked'"> 686 704 <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="on" checked="checked"/> 687 705 <input type="hidden" name="eventStartDate.dateOnly" value="on" id="allDayStartDateField"/> … … 698 716 <!-- floating event: no timezone (and not UTC) --> 699 717 <xsl:choose> 700 <xsl:when test=" /bedeworkadmin/formElements/form/floating/input/@checked='checked'">718 <xsl:when test="form/floating/input/@checked='checked'"> 701 719 <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="on" checked="checked"/> 702 720 <input type="hidden" name="eventStartDate.floating" value="on" id="startFloating"/> … … 713 731 <!-- store time as coordinated universal time (UTC) --> 714 732 <xsl:choose> 715 <xsl:when test=" /bedeworkadmin/formElements/form/storeUTC/input/@checked='checked'">733 <xsl:when test="form/storeUTC/input/@checked='checked'"> 716 734 <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="on" checked="checked"/> 717 735 <input type="hidden" name="eventStartDate.storeUTC" value="on" id="startStoreUTC"/> … … 731 749 <div class="dateFields"> 732 750 <span class="startDateLabel">Date </span> 733 <xsl:copy-of select=" /bedeworkadmin/formElements/form/start/month/*"/>734 <xsl:copy-of select=" /bedeworkadmin/formElements/form/start/day/*"/>751 <xsl:copy-of select="form/start/month/*"/> 752 <xsl:copy-of select="form/start/day/*"/> 735 753 <xsl:choose> 736 754 <xsl:when test="/bedeworkadmin/creating = 'true'"> 737 <xsl:copy-of select=" /bedeworkadmin/formElements/form/start/year/*"/>755 <xsl:copy-of select="form/start/year/*"/> 738 756 </xsl:when> 739 757 <xsl:otherwise> 740 <xsl:copy-of select=" /bedeworkadmin/formElements/form/start/yearText/*"/>758 <xsl:copy-of select="form/start/yearText/*"/> 741 759 </xsl:otherwise> 742 760 </xsl:choose> … … 744 762 <script language="JavaScript" type="text/javascript"> 745 763 <xsl:comment> 746 startDateDynCalWidget = new dynCalendar('startDateDynCalWidget', <xsl:value-of select="number( /bedeworkadmin/formElements/form/start/yearText/input/@value)"/>, <xsl:value-of select="number(/bedeworkadmin/formElements/form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(/bedeworkadmin/formElements/form/start/day/select/option[@selected='selected']/@value)"/>, 'startDateCalWidgetCallback',true,'<xsl:value-of select="$resourcesRoot"/>/resources/');764 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/'); 747 765 </xsl:comment> 748 766 </script> … … 750 768 <div class="{$timeFieldsClass}" id="startTimeFields"> 751 769 <span id="calWidgetStartTimeHider" class="show"> 752 <xsl:copy-of select=" /bedeworkadmin/formElements/form/start/hour/*"/>753 <xsl:copy-of select=" /bedeworkadmin/formElements/form/start/minute/*"/>754 <xsl:if test=" /bedeworkadmin/formElements/form/start/ampm">755 <xsl:copy-of select=" /bedeworkadmin/formElements/form/start/ampm/*"/>770 <xsl:copy-of select="form/start/hour/*"/> 771 <xsl:copy-of select="form/start/minute/*"/> 772 <xsl:if test="form/start/ampm"> 773 <xsl:copy-of select="form/start/ampm/*"/> 756 774 </xsl:if> 757 775 <xsl:text> </xsl:text> … … 764 782 <option> 765 783 <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute> 766 <xsl:if test=" /bedeworkadmin/formElements/form/start/tzid = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if>784 <xsl:if test="form/start/tzid = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 767 785 <xsl:value-of select="name"/> 768 786 </option> … … 775 793 <strong>End:</strong> 776 794 <xsl:choose> 777 <xsl:when test=" /bedeworkadmin/formElements/form/end/type='E'">795 <xsl:when test="form/end/type='E'"> 778 796 <input type="radio" name="eventEndType" value="E" checked="checked" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 779 797 </xsl:when> … … 785 803 <xsl:variable name="endDateTimeClass"> 786 804 <xsl:choose> 787 <xsl:when test=" /bedeworkadmin/formElements/form/end/type='E'">shown</xsl:when>805 <xsl:when test="form/end/type='E'">shown</xsl:when> 788 806 <xsl:otherwise>invisible</xsl:otherwise> 789 807 </xsl:choose> … … 791 809 <div class="{$endDateTimeClass}" id="endDateTime"> 792 810 <div class="dateFields"> 793 <xsl:copy-of select=" /bedeworkadmin/formElements/form/end/dateTime/month/*"/>794 <xsl:copy-of select=" /bedeworkadmin/formElements/form/end/dateTime/day/*"/>811 <xsl:copy-of select="form/end/dateTime/month/*"/> 812 <xsl:copy-of select="form/end/dateTime/day/*"/> 795 813 <xsl:choose> 796 814 <xsl:when test="/bedeworkadmin/creating = 'true'"> 797 <xsl:copy-of select=" /bedeworkadmin/formElements/form/end/dateTime/year/*"/>815 <xsl:copy-of select="form/end/dateTime/year/*"/> 798 816 </xsl:when> 799 817 <xsl:otherwise> 800 <xsl:copy-of select=" /bedeworkadmin/formElements/form/end/dateTime/yearText/*"/>818 <xsl:copy-of select="form/end/dateTime/yearText/*"/> 801 819 </xsl:otherwise> 802 820 </xsl:choose> … … 804 822 <script language="JavaScript" type="text/javascript"> 805 823 <xsl:comment> 806 endDateDynCalWidget = new dynCalendar('endDateDynCalWidget', <xsl:value-of select="number( /bedeworkadmin/formElements/form/start/yearText/input/@value)"/>, <xsl:value-of select="number(/bedeworkadmin/formElements/form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(/bedeworkadmin/formElements/form/start/day/select/option[@selected='selected']/@value)"/>, 'endDateCalWidgetCallback',true,'<xsl:value-of select="$resourcesRoot"/>/resources/');824 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/'); 807 825 </xsl:comment> 808 826 </script> … … 810 828 <div class="{$timeFieldsClass}" id="endTimeFields"> 811 829 <span id="calWidgetEndTimeHider" class="show"> 812 <xsl:copy-of select=" /bedeworkadmin/formElements/form/end/dateTime/hour/*"/>813 <xsl:copy-of select=" /bedeworkadmin/formElements/form/end/dateTime/minute/*"/>814 <xsl:if test=" /bedeworkadmin/formElements/form/end/dateTime/ampm">815 <xsl:copy-of select=" /bedeworkadmin/formElements/form/end/dateTime/ampm/*"/>830 <xsl:copy-of select="form/end/dateTime/hour/*"/> 831 <xsl:copy-of select="form/end/dateTime/minute/*"/> 832 <xsl:if test="form/end/dateTime/ampm"> 833 <xsl:copy-of select="form/end/dateTime/ampm/*"/> 816 834 </xsl:if> 817 835 <xsl:text> </xsl:text> … … 819 837 820 838 <select name="eventEndDate.tzid" id="endTzid" class="timezones"> 821 <xsl:if test=" /bedeworkadmin/formElements/form/floating/input/@checked='checked'"><xsl:attribute name="disabled">true</xsl:attribute></xsl:if>839 <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">true</xsl:attribute></xsl:if> 822 840 <option value="-1">select timezone...</option> 823 841 <xsl:for-each select="/bedeworkadmin/timezones/timezone"> 824 842 <option> 825 843 <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute> 826 <xsl:if test=" /bedeworkadmin/formElements/form/end/dateTime/tzid = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if>844 <xsl:if test="form/end/dateTime/tzid = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 827 845 <xsl:value-of select="name"/> 828 846 </option> … … 838 856 <div class="dateFields"> 839 857 <xsl:choose> 840 <xsl:when test=" /bedeworkadmin/formElements/form/end/type='D'">858 <xsl:when test="form/end/type='D'"> 841 859 <input type="radio" name="eventEndType" value="D" checked="checked" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 842 860 </xsl:when> … … 848 866 <xsl:variable name="endDurationClass"> 849 867 <xsl:choose> 850 <xsl:when test=" /bedeworkadmin/formElements/form/end/type='D'">shown</xsl:when>868 <xsl:when test="form/end/type='D'">shown</xsl:when> 851 869 <xsl:otherwise>invisible</xsl:otherwise> 852 870 </xsl:choose> … … 854 872 <xsl:variable name="durationHrMinClass"> 855 873 <xsl:choose> 856 <xsl:when test=" /bedeworkadmin/formElements/form/allDay/input/@checked='checked'">invisible</xsl:when>874 <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 857 875 <xsl:otherwise>shown</xsl:otherwise> 858 876 </xsl:choose> … … 860 878 <div class="{$endDurationClass}" id="endDuration"> 861 879 <xsl:choose> 862 <xsl:when test=" /bedeworkadmin/formElements/form/end/duration/weeks/input/@value = '0'">880 <xsl:when test="form/end/duration/weeks/input/@value = '0'"> 863 881 <!-- we are using day, hour, minute format --> 864 882 <!-- must send either no week value or week value of 0 (zero) --> 865 883 <div class="durationBox"> 866 884 <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')" checked="checked"/> 867 <xsl:variable name="daysStr" select=" /bedeworkadmin/formElements/form/end/duration/days/input/@value"/>885 <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 868 886 <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays"/>days 869 887 <span id="durationHrMin" class="{$durationHrMinClass}"> 870 <xsl:variable name="hoursStr" select=" /bedeworkadmin/formElements/form/end/duration/hours/input/@value"/>888 <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 871 889 <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours"/>hours 872 <xsl:variable name="minutesStr" select=" /bedeworkadmin/formElements/form/end/duration/minutes/input/@value"/>890 <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 873 891 <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes"/>minutes 874 892 </span> … … 877 895 <div class="durationBox"> 878 896 <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')"/> 879 <xsl:variable name="weeksStr" select=" /bedeworkadmin/formElements/form/end/duration/weeks/input/@value"/>897 <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 880 898 <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="true"/>weeks 881 899 </div> … … 885 903 <div class="durationBox"> 886 904 <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')"/> 887 <xsl:variable name="daysStr" select=" /bedeworkadmin/formElements/form/end/duration/days/input/@value"/>905 <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 888 906 <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="true"/>days 889 907 <span id="durationHrMin" class="{$durationHrMinClass}"> 890 <xsl:variable name="hoursStr" select=" /bedeworkadmin/formElements/form/end/duration/hours/input/@value"/>908 <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 891 909 <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="true"/>hours 892 <xsl:variable name="minutesStr" select=" /bedeworkadmin/formElements/form/end/duration/minutes/input/@value"/>910 <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 893 911 <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="true"/>minutes 894 912 </span> … … 897 915 <div class="durationBox"> 898 916 <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')" checked="checked"/> 899 <xsl:variable name="weeksStr" select=" /bedeworkadmin/formElements/form/end/duration/weeks/input/@value"/>917 <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 900 918 <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks"/>weeks 901 919 </div> … … 907 925 <div class="dateFields" id="noDuration"> 908 926 <xsl:choose> 909 <xsl:when test=" /bedeworkadmin/formElements/form/end/type='N'">927 <xsl:when test="form/end/type='N'"> 910 928 <input type="radio" name="eventEndType" value="N" checked="checked" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 911 929 </xsl:when> … … 919 937 </td> 920 938 </tr> 939 <!-- Recurrence fields --> 940 <!-- ================= --> 921 941 <tr> 922 942 <td class="fieldName"> … … 924 944 </td> 925 945 <td> 926 <!-- Recurrence fields --> 927 <!-- ================= --> 928 <xsl:if test="/bedeworkadmin/formElements/recurrenceId = ''"> 929 <!-- existing recurrence instances can not themselves recur, 930 so block this whole section if this event is an instance 931 (has a recurrenceId) --> 932 <input type="checkbox" name="recurrenceFlag" onclick="swapRecurrence(this)" value="on"/> 933 <xsl:if test="/bedeworkadmin/formElements/form/recurring='true'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 946 <!-- Output descriptive recurrence information. Probably not 947 complete yet. Replace all freq strings so can be internationalized. --> 948 <xsl:if test="form/recurrence"> 949 <div id="recurrenceInfo"> 950 Every 934 951 <xsl:choose> 935 <xsl:when test="/bedeworkadmin/creating = 'true'"> 936 set recurrence rules 952 <xsl:when test="form/recurrence/interval > 1"> 953 <xsl:value-of select="form/recurrence/interval"/> 954 </xsl:when> 955 </xsl:choose> 956 <xsl:text> </xsl:text> 957 <xsl:choose> 958 <xsl:when test="form/recurrence/freq = 'HOURLY'">hour</xsl:when> 959 <xsl:when test="form/recurrence/freq = 'DAILY'">day</xsl:when> 960 <xsl:when test="form/recurrence/freq = 'WEEKLY'">week</xsl:when> 961 <xsl:when test="form/recurrence/freq = 'MONTHLY'">month</xsl:when> 962 <xsl:when test="form/recurrence/freq = 'YEARLY'">year</xsl:when> 963 </xsl:choose><xsl:if test="form/recurrence/interval > 1">s</xsl:if> 964 <xsl:text> </xsl:text> 965 966 <xsl:if test="form/recurrence/byday"> 967 <xsl:for-each select="form/recurrence/byday/pos"> 968 <xsl:if test="position() != 1"> and </xsl:if> 969 on 970 <xsl:choose> 971 <xsl:when test="@val='1'"> 972 the first 973 </xsl:when> 974 <xsl:when test="@val='2'"> 975 the second 976 </xsl:when> 977 <xsl:when test="@val='3'"> 978 the third 979 </xsl:when> 980 <xsl:when test="@val='4'"> 981 the fourth 982 </xsl:when> 983 <xsl:when test="@val='5'"> 984 the fifth 985 </xsl:when> 986 <xsl:when test="@val='-1'"> 987 the last 988 </xsl:when> 989 <!-- don't output "every" --> 990 <!--<xsl:otherwise> 991 every 992 </xsl:otherwise>--> 993 </xsl:choose> 994 <xsl:for-each select="day"> 995 <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 996 <xsl:variable name="dayVal" select="."/> 997 <xsl:variable name="dayPos"> 998 <xsl:for-each select="/bedeworkadmin/recurdayvals/val"> 999 <xsl:if test="node() = $dayVal"><xsl:value-of select="position()"/></xsl:if> 1000 </xsl:for-each> 1001 </xsl:variable> 1002 <xsl:value-of select="/bedeworkadmin/shortdaynames/val[position() = $dayPos]"/> 1003 <xsl:if test="position() != last()">, </xsl:if> 1004 </xsl:for-each> 1005 </xsl:for-each> 1006 </xsl:if> 1007 1008 <xsl:if test="form/recurrence/bymonth"> 1009 in 1010 <xsl:for-each select="form/recurrence/bymonth/val"> 1011 <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 1012 <xsl:variable name="monthNum" select="number(.)"/> 1013 <xsl:value-of select="/bedeworkadmin/monthlabels/val[position() = $monthNum]"/> 1014 <xsl:if test="position() != last()">, </xsl:if> 1015 </xsl:for-each> 1016 </xsl:if> 1017 1018 <xsl:if test="form/recurrence/bymonthday"> 1019 on the 1020 <xsl:for-each select="form/recurrence/bymonthday/val"> 1021 <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 1022 <xsl:value-of select="."/><xsl:choose> 1023 <xsl:when test=". = '11' or . = '12' or . = '13'">th</xsl:when> 1024 <xsl:when test="substring(., string-length(.), 1) = '1'">st</xsl:when> 1025 <xsl:when test="substring(., string-length(.), 1) = '2'">nd</xsl:when> 1026 <xsl:when test="substring(., string-length(.), 1) = '3'">rd</xsl:when> 1027 <xsl:otherwise>th</xsl:otherwise> 1028 </xsl:choose> 1029 <xsl:if test="position() != last()">, </xsl:if> 1030 </xsl:for-each> 1031 day<xsl:if test="form/recurrence/bymonthday/val[position()=2]">s</xsl:if> of the month 1032 </xsl:if> 1033 1034 <xsl:if test="form/recurrence/byyearday"> 1035 on the 1036 <xsl:for-each select="form/recurrence/byyearday/val"> 1037 <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 1038 <xsl:value-of select="."/><xsl:choose> 1039 <xsl:when test=". = '11' or . = '12' or . = '13'">th</xsl:when> 1040 <xsl:when test="substring(., string-length(.), 1) = '1'">st</xsl:when> 1041 <xsl:when test="substring(., string-length(.), 1) = '2'">nd</xsl:when> 1042 <xsl:when test="substring(., string-length(.), 1) = '3'">rd</xsl:when> 1043 <xsl:otherwise>th</xsl:otherwise> 1044 </xsl:choose> 1045 <xsl:if test="position() != last()">, </xsl:if> 1046 </xsl:for-each> 1047 day<xsl:if test="form/recurrence/byyearday/val[position()=2]">s</xsl:if> of the year 1048 </xsl:if> 1049 1050 <xsl:if test="form/recurrence/byweekno"> 1051 in the 1052 <xsl:for-each select="form/recurrence/byweekno/val"> 1053 <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 1054 <xsl:value-of select="."/><xsl:choose> 1055 <xsl:when test=". = '11' or . = '12' or . = '13'">th</xsl:when> 1056 <xsl:when test="substring(., string-length(.), 1) = '1'">st</xsl:when> 1057 <xsl:when test="substring(., string-length(.), 1) = '2'">nd</xsl:when> 1058 <xsl:when test="substring(., string-length(.), 1) = '3'">rd</xsl:when> 1059 <xsl:otherwise>th</xsl:otherwise> 1060 </xsl:choose> 1061 <xsl:if test="position() != last()">, </xsl:if> 1062 </xsl:for-each> 1063 week<xsl:if test="form/recurrence/byweekno/val[position()=2]">s</xsl:if> of the year 1064 </xsl:if> 1065 1066 repeating 1067 <xsl:choose> 1068 <xsl:when test="form/recurrence/count = '-1'">forever</xsl:when> 1069 <xsl:when test="form/recurrence/until"> 1070 <xsl:value-of select="form/recurrence/until"/> 937 1071 </xsl:when> 938 1072 <xsl:otherwise> 939 change recurrence 1073 <xsl:value-of select="form/recurrence/count"/> 1074 time<xsl:if test="form/recurrence/count > 1">s</xsl:if> 940 1075 </xsl:otherwise> 941 1076 </xsl:choose> 942 <span id="recurrenceUiSwitch" class="invisible"> 943 <input type="checkbox" name="recurrenceUiSwitch" value="simple" onchange="swapVisible(this,'advancedRecurrenceRules')"/>show advanced recurrence rules 944 </span> 945 946 <!-- set these dynamically when form is submitted --> 947 <input type="hidden" name="interval" value=""/> 948 <input type="hidden" name="count" value=""/> 949 <input type="hidden" name="until" value=""/> 950 <input type="hidden" name="byday" value=""/> 951 <input type="hidden" name="bymonthday" value=""/> 952 <input type="hidden" name="bymonth" value=""/> 953 <input type="hidden" name="byweekno" value=""/> 954 <input type="hidden" name="byyearday" value=""/> 955 <input type="hidden" name="wkst" value=""/> 956 <input type="hidden" name="setpos" value=""/> 957 958 <div id="recurrenceFields" class="invisible"> 959 <table id="recurrenceTable" cellspacing="0"> 960 <tr> 961 <td class="recurrenceFrequency" rowspan="2"> 962 <strong>Frequency:</strong><br/> 963 <!-- "freq" is used to determine if a recurrence should be created; test for "NONE" --> 964 <input type="radio" name="freq" value="NONE" onclick="showRecurrence(this.value)" checked="checked"/>none<br/> 965 <!--<input type="radio" name="freq" value="HOURLY" onclick="showRecurrence(this.value)"/>hourly<br/>--> 966 <input type="radio" name="freq" value="DAILY" onclick="showRecurrence(this.value)"/>daily<br/> 967 <input type="radio" name="freq" value="WEEKLY" onclick="showRecurrence(this.value)"/>weekly<br/> 968 <input type="radio" name="freq" value="MONTHLY" onclick="showRecurrence(this.value)"/>monthly<br/> 969 <input type="radio" name="freq" value="YEARLY" onclick="showRecurrence(this.value)"/>yearly 970 </td> 971 <td class="recurrenceRules"> 972 <!-- none --> 973 <div id="noneRecurrenceRules"> 974 <p>does not recur</p> 975 </div> 976 <span id="advancedRecurrenceRules" class="invisible"> 977 <!-- hourly --> 978 <div id="hourlyRecurrenceRules" class="invisible"> 979 <strong>Interval:</strong> 980 every <input type="text" name="hourlyInterval" size="2" value="1"/> hour(s) 1077 </div> 1078 </xsl:if> 1079 1080 1081 <!-- recurrence rules --> 1082 <xsl:choose> 1083 <xsl:when test="recurrenceId != ''"> 1084 <!-- recurrence instances can not themselves recur, 1085 so provide access to master event --> 1086 <em>This event is a recurrence instance.</em><br/> 1087 <a href="{$event-fetchForUpdate}&subid={$subscriptionId}&calPath={$calPath}&guid={$guid}" title="edit master (recurring event)">edit master event</a> 1088 </xsl:when> 1089 <xsl:otherwise> 1090 <!-- has recurrenceId, so is master --> 1091 <input type="checkbox" name="recurrenceFlag" onclick="swapRecurrence(this)" value="on"/> 1092 <xsl:choose> 1093 <xsl:when test="/bedeworkadmin/creating = 'true'"> 1094 set recurrence rules 1095 </xsl:when> 1096 <xsl:otherwise> 1097 change recurrence 1098 </xsl:otherwise> 1099 </xsl:choose> 1100 <span id="recurrenceUiSwitch" class="invisible"> 1101 <input type="checkbox" name="recurrenceUiSwitch" value="simple" onchange="swapVisible(this,'advancedRecurrenceRules')"/> 1102 show advanced recurrence rules 1103 </span> 1104 1105 <!-- set these dynamically when form is submitted --> 1106 <input type="hidden" name="interval" value=""/> 1107 <input type="hidden" name="count" value=""/> 1108 <input type="hidden" name="until" value=""/> 1109 <input type="hidden" name="byday" value=""/> 1110 <input type="hidden" name="bymonthday" value=""/> 1111 <input type="hidden" name="bymonth" value=""/> 1112 <input type="hidden" name="byweekno" value=""/> 1113 <input type="hidden" name="byyearday" value=""/> 1114 <input type="hidden" name="wkst" value=""/> 1115 <input type="hidden" name="setpos" value=""/> 1116 1117 <div id="recurrenceFields" class="invisible"> 1118 <table id="recurrenceTable" cellspacing="0"> 1119 <tr> 1120 <td class="recurrenceFrequency" rowspan="2"> 1121 <strong>Frequency:</strong><br/> 1122 <!-- "freq" is used to determine if a recurrence should be created; test for "NONE" --> 1123 <input type="radio" name="freq" value="NONE" onclick="showRecurrence(this.value)" checked="checked"/>none<br/> 1124 <!--<input type="radio" name="freq" value="HOURLY" onclick="showRecurrence(this.value)"/>hourly<br/>--> 1125 <input type="radio" name="freq" value="DAILY" onclick="showRecurrence(this.value)"/>daily<br/> 1126 <input type="radio" name="freq" value="WEEKLY" onclick="showRecurrence(this.value)"/>weekly<br/> 1127 <input type="radio" name="freq" value="MONTHLY" onclick="showRecurrence(this.value)"/>monthly<br/> 1128 <input type="radio" name="freq" value="YEARLY" onclick="showRecurrence(this.value)"/>yearly 1129 </td> 1130 <td class="recurrenceRules"> 1131 <!-- none --> 1132 <div id="noneRecurrenceRules"> 1133 <p>does not recur</p> 981 1134 </div> 982 <!-- daily --> 983 <div id="dailyRecurrenceRules" class="invisible"> 984 <p> 985 <strong>Interval:</strong> 986 every <input type="text" name="dailyInterval" size="2" value="1"/> day(s) 987 </p> 988 <p> 989 <input type="checkbox" name="swapDayMonthCheckBoxList" value="" onclick="swapVisible(this,'dayMonthCheckBoxList')"/> 990 in these months: 991 <div id="dayMonthCheckBoxList" class="invisible"> 992 <xsl:for-each select="/bedeworkadmin/monthlabels/val"> 993 <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 994 <span class="chkBoxListItem"> 995 <input type="checkbox" name="dayMonths"> 996 <xsl:attribute name="value"><xsl:value-of select="/bedeworkadmin/monthvalues/val[position() = $pos]"/></xsl:attribute> 997 </input> 998 <xsl:value-of select="."/> 999 </span> 1000 <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 1001 </xsl:for-each> 1002 </div> 1003 </p> 1004 </div> 1005 <!-- weekly --> 1006 <div id="weeklyRecurrenceRules" class="invisible"> 1007 <p> 1008 <strong>Interval:</strong> 1009 every <input type="text" name="weeklyInterval" size="2" value="1"/> week(s) on:<br/> 1010 </p> 1011 <p> 1012 <div id="weekRecurFields"> 1013 <xsl:call-template name="byDayChkBoxList"> 1014 <xsl:with-param name="name">byDayWeek</xsl:with-param> 1135 <span id="advancedRecurrenceRules" class="invisible"> 1136 <!-- hourly --> 1137 <div id="hourlyRecurrenceRules" class="invisible"> 1138 <p> 1139 <strong>Interval:</strong> 1140 every 1141 <input type="text" name="hourlyInterval" size="2" value="1"> 1142 <xsl:if test="form/recurrence/interval"> 1143 <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 1144 </xsl:if> 1145 </input> 1146 hour(s) 1147 </p> 1148 </div> 1149 <!-- daily --> 1150 <div id="dailyRecurrenceRules" class="invisible"> 1151 <p> 1152 <strong>Interval:</strong> 1153 every 1154 <input type="text" name="dailyInterval" size="2" value="1"> 1155 <xsl:if test="form/recurrence/interval"> 1156 <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 1157 </xsl:if> 1158 </input> 1159 day(s) 1160 </p> 1161 <p> 1162 <input type="checkbox" name="swapDayMonthCheckBoxList" value="" onclick="swapVisible(this,'dayMonthCheckBoxList')"/> 1163 in these months: 1164 <div id="dayMonthCheckBoxList" class="invisible"> 1165 <xsl:for-each select="/bedeworkadmin/monthlabels/val"> 1166 <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 1167 <span class="chkBoxListItem"> 1168 <input type="checkbox" name="dayMonths"> 1169 <xsl:attribute name="value"><xsl:value-of select="/bedeworkadmin/monthvalues/val[position() = $pos]"/></xsl:attribute> 1170 </input> 1171 <xsl:value-of select="."/> 1172 </span> 1173 <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 1174 </xsl:for-each> 1175 </div> 1176 </p> 1177 </div> 1178 <!-- weekly --> 1179 <div id="weeklyRecurrenceRules" class="invisible"> 1180 <p> 1181 <strong>Interval:</strong> 1182 every 1183 <input type="text" name="weeklyInterval" size="2" value="1"> 1184 <xsl:if test="form/recurrence/interval"> 1185 <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 1186 </xsl:if> 1187 </input> 1188 week(s) on: 1189 </p> 1190 <p> 1191 <div id="weekRecurFields"> 1192 <xsl:call-template name="byDayChkBoxList"> 1193 <xsl:with-param name="name">byDayWeek</xsl:with-param> 1194 </xsl:call-template> 1195 </div> 1196 </p> 1197 <p class="weekRecurLinks"> 1198 <a href="javascript:recurSelectWeekdays('weekRecurFields')">select weekdays</a> | 1199 <a href="javascript:recurSelectWeekends('weekRecurFields')">select weekends</a> 1200 </p> 1201 <p> 1202 Week start: 1203 <select name="weekWkst"> 1204 <xsl:for-each select="/bedeworkadmin/shortdaynames/val"> 1205 <xsl:variable name="pos" select="position()"/> 1206 <option> 1207 <xsl:attribute name="value"><xsl:value-of select="/bedeworkadmin/recurdayvals/val[position() = $pos]"/></xsl:attribute> 1208 <xsl:value-of select="."/> 1209 </option> 1210 </xsl:for-each> 1211 </select> 1212 </p> 1213 </div> 1214 <!-- monthly --> 1215 <div id="monthlyRecurrenceRules" class="invisible"> 1216 <p> 1217 <strong>Interval:</strong> 1218 every 1219 <input type="text" name="monthlyInterval" size="2" value="1"> 1220 <xsl:if test="form/recurrence/interval"> 1221 <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 1222 </xsl:if> 1223 </input> 1224 month(s) 1225 </p> 1226 <div id="monthRecurFields"> 1227 <div id="monthRecurFields1"> 1228 on 1229 <select name="bymonthposPos1" width="7em" onchange="changeClass('monthRecurFields2','shown')"> 1230 <xsl:call-template name="recurrenceDayPosOptions"/> 1231 </select> 1232 <xsl:call-template name="byDayChkBoxList"/> 1233 </div> 1234 <xsl:call-template name="buildRecurFields"> 1235 <xsl:with-param name="current">2</xsl:with-param> 1236 <xsl:with-param name="total">10</xsl:with-param> 1237 <xsl:with-param name="name">month</xsl:with-param> 1015 1238 </xsl:call-template> 1016 1239 </div> 1017 </p> 1018 <p class="weekRecurLinks"> 1019 <a href="javascript:recurSelectWeekdays('weekRecurFields')">select weekdays</a> | 1020 <a href="javascript:recurSelectWeekends('weekRecurFields')">select weekends</a> 1021 </p> 1022 <p> 1023 Week start: 1024 <select name="weekWkst"> 1025 <xsl:for-each select="/bedeworkadmin/shortdaynames/val"> 1026 <xsl:variable name="pos" select="position()"/> 1027 <option> 1028 <xsl:attribute name="value"><xsl:value-of select="/bedeworkadmin/recurdayvals/val[position() = $pos]"/></xsl:attribute> 1029 <xsl:value-of select="."/> 1030 </option> 1031 </xsl:for-each> 1032 </select> 1033 </p> 1034 </div> 1035 <!-- monthly --> 1036 <div id="monthlyRecurrenceRules" class="invisible"> 1037 <p> 1038 <strong>Interval:</strong> 1039 every <input type="text" name="monthlyInterval" size="2" value="1"/> month(s) 1040 </p> 1041 <div id="monthRecurFields"> 1042 <div id="monthRecurFields1"> 1043 on 1044 <select name="bymonthposPos1" width="7em" onchange="changeClass('monthRecurFields2','shown')"> 1045 <xsl:call-template name="recurrenceDayPosOptions"/> 1046 </select> 1047 <xsl:call-template name="byDayChkBoxList"/> 1048 </div> 1049 <xsl:call-template name="buildRecurFields"> 1050 <xsl:with-param name="current">2</xsl:with-param> 1051 <xsl:with-param name="total">10</xsl:with-param> 1052 <xsl:with-param name="name">month</xsl:with-param> 1053 </xsl:call-template> 1240 <p> 1241 <input type="checkbox" name="swapMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'monthDaysCheckBoxList')"/> 1242 on these days:<br/> 1243 <div id="monthDaysCheckBoxList" class="invisible"> 1244 <xsl:call-template name="buildCheckboxList"> 1245 <xsl:with-param name="current">1</xsl:with-param> 1246 <xsl:with-param name="end">31</xsl:with-param> 1247 <xsl:with-param name="name">monthDayBoxes</xsl:with-param> 1248 </xsl:call-template> 1249 </div> 1250 </p> 1054 1251 </div> 1055 <p> 1056 <input type="checkbox" name="swapMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'monthDaysCheckBoxList')"/> 1057 on these days:<br/> 1058 <div id="monthDaysCheckBoxList" class="invisible"> 1059 <xsl:call-template name="buildCheckboxList"> 1060 <xsl:with-param name="current">1</xsl:with-param> 1061 <xsl:with-param name="end">31</xsl:with-param> 1062 <xsl:with-param name="name">monthDayBoxes</xsl:with-param> 1252 <!-- yearly --> 1253 <div id="yearlyRecurrenceRules" class="invisible"> 1254 <p> 1255 <strong>Interval:</strong> 1256 every 1257 <input type="text" name="yearlyInterval" size="2" value="1"> 1258 <xsl:if test="form/recurrence/interval"> 1259 <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 1260 </xsl:if> 1261 </input> 1262 years(s) 1263 </p> 1264 <div id="yearRecurFields"> 1265 <div id="yearRecurFields1"> 1266 on 1267 <select name="byyearposPos1" width="7em" onchange="changeClass('yearRecurFields2','shown')"> 1268 <xsl:call-template name="recurrenceDayPosOptions"/> 1269 </select> 1270 <xsl:call-template name="byDayChkBoxList"/> 1271 </div> 1272 <xsl:call-template name="buildRecurFields"> 1273 <xsl:with-param name="current">2</xsl:with-param> 1274 <xsl:with-param name="total">10</xsl:with-param> 1275 <xsl:with-param name="name">year</xsl:with-param> 1063 1276 </xsl:call-template> 1064 1277 </div> 1065 </p> 1066 </div> 1067 <!-- yearly --> 1068 <div id="yearlyRecurrenceRules" class="invisible"> 1069 <strong>Interval:</strong> 1070 every <input type="text" name="yearlyInterval" size="2" value="1"/> years(s)<br/> 1071 <div id="yearRecurFields"> 1072 <div id="yearRecurFields1"> 1073 on 1074 <select name="byyearposPos1" width="7em" onchange="changeClass('yearRecurFields2','shown')"> 1075 <xsl:call-template name="recurrenceDayPosOptions"/> 1278 <p> 1279 <input type="checkbox" name="swapYearMonthCheckBoxList" value="" onclick="swapVisible(this,'yearMonthCheckBoxList')"/> 1280 in these months: 1281 <div id="yearMonthCheckBoxList" class="invisible"> 1282 <xsl:for-each select="/bedeworkadmin/monthlabels/val"> 1283 <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 1284 <span class="chkBoxListItem"> 1285 <input type="checkbox" name="yearMonths"> 1286 <xsl:attribute name="value"><xsl:value-of select="/bedeworkadmin/monthvalues/val[position() = $pos]"/></xsl:attribute> 1287 </input> 1288 <xsl:value-of select="."/> 1289 </span> 1290 <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 1291 </xsl:for-each> 1292 </div> 1293 </p> 1294 <p> 1295 <input type="checkbox" name="swapYearMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'yearMonthDaysCheckBoxList')"/> 1296 on these days of the month:<br/> 1297 <div id="yearMonthDaysCheckBoxList" class="invisible"> 1298 <xsl:call-template name="buildCheckboxList"> 1299 <xsl:with-param name="current">1</xsl:with-param> 1300 <xsl:with-param name="end">31</xsl:with-param> 1301 <xsl:with-param name="name">yearMonthDayBoxes</xsl:with-param> 1302 </xsl:call-template> 1303 </div> 1304 </p> 1305 <p> 1306 <input type="checkbox" name="swapYearWeeksCheckBoxList" value="" onclick="swapVisible(this,'yearWeeksCheckBoxList')"/> 1307 in these weeks of the year:<br/> 1308 <div id="yearWeeksCheckBoxList" class="invisible"> 1309 <xsl:call-template name="buildCheckboxList"> 1310 <xsl:with-param name="current">1</xsl:with-param> 1311 <xsl:with-param name="end">53</xsl:with-param> 1312 <xsl:with-param name="name">yearWeekBoxes</xsl:with-param> 1313 </xsl:call-template> 1314 </div> 1315 </p> 1316 <p> 1317 <input type="checkbox" name="swapYearDaysCheckBoxList" value="" onclick="swapVisible(this,'yearDaysCheckBoxList')"/> 1318 on these days of the year:<br/> 1319 <div id="yearDaysCheckBoxList" class="invisible"> 1320 <xsl:call-template name="buildCheckboxList"> 1321 <xsl:with-param name="current">1</xsl:with-param> 1322 <xsl:with-param name="end">366</xsl:with-param> 1323 <xsl:with-param name="name">yearDayBoxes</xsl:with-param> 1324 </xsl:call-template> 1325 </div> 1326 </p> 1327 <p> 1328 Week start: 1329 <select name="yearWkst"> 1330 <xsl:for-each select="/bedeworkadmin/shortdaynames/val"> 1331 <xsl:variable name="pos" select="position()"/> 1332 <option> 1333 <xsl:attribute name="value"><xsl:value-of select="/bedeworkadmin/recurdayvals/val[position() = $pos]"/></xsl:attribute> 1334 <xsl:value-of select="."/> 1335 </option> 1336 </xsl:for-each> 1076 1337 </select> 1077 <xsl:call-template name="byDayChkBoxList"/> 1078 </div> 1079 <xsl:call-template name="buildRecurFields"> 1080 <xsl:with-param name="current">2</xsl:with-param> 1081 <xsl:with-param name="total">10</xsl:with-param> 1082 <xsl:with-param name="name">year</xsl:with-param> 1083 </xsl:call-template> 1338 </p> 1084 1339 </div> 1085 <p> 1086 <input type="checkbox" name="swapYearMonthCheckBoxList" value="" onclick="swapVisible(this,'yearMonthCheckBoxList')"/> 1087 in these months: 1088 <div id="yearMonthCheckBoxList" class="invisible"> 1089 <xsl:for-each select="/bedeworkadmin/monthlabels/val"> 1090 <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 1091 <span class="chkBoxListItem"> 1092 <input type="checkbox" name="yearMonths"> 1093 <xsl:attribute name="value"><xsl:value-of select="/bedeworkadmin/monthvalues/val[position() = $pos]"/></xsl:attribute> 1094 </input> 1095 <xsl:value-of select="."/> 1096 </span> 1097 <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 1098 </xsl:for-each> 1099 </div> 1100 </p> 1101 <p> 1102 <input type="checkbox" name="swapYearMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'yearMonthDaysCheckBoxList')"/> 1103 on these days of the month:<br/> 1104 <div id="yearMonthDaysCheckBoxList" class="invisible"> 1105 <xsl:call-template name="buildCheckboxList"> 1106 <xsl:with-param name="current">1</xsl:with-param> 1107 <xsl:with-param name="end">31</xsl:with-param> 1108 <xsl:with-param name="name">yearMonthDayBoxes</xsl:with-param> 1109 </xsl:call-template> 1110 </div> 1111 </p> 1112 <p> 1113 <input type="checkbox" name="swapYearWeeksCheckBoxList" value="" onclick="swapVisible(this,'yearWeeksCheckBoxList')"/> 1114 in these weeks of the year:<br/> 1115 <div id="yearWeeksCheckBoxList" class="invisible"> 1116 <xsl:call-template name="buildCheckboxList"> 1117 <xsl:with-param name="current">1</xsl:with-param> 1118 <xsl:with-param name="end">53</xsl:with-param> 1119 <xsl:with-param name="name">yearWeekBoxes</xsl:with-param> 1120 </xsl:call-template> 1121 </div> 1122 </p> 1123 <p> 1124 <input type="checkbox" name="swapYearDaysCheckBoxList" value="" onclick="swapVisible(this,'yearDaysCheckBoxList')"/> 1125 on these days of the year:<br/> 1126 <div id="yearDaysCheckBoxList" class="invisible"> 1127 <xsl:call-template name="buildCheckboxList"> 1128 <xsl:with-param name="current">1</xsl:with-param> 1129 <xsl:with-param name="end">366</xsl:with-param> 1130 <xsl:with-param name="name">yearDayBoxes</xsl:with-param> 1131 </xsl:call-template> 1132 </div> 1133 </p> 1134 <p> 1135 Week start: 1136 <select name="yearWkst"> 1137 <xsl:for-each select="/bedeworkadmin/shortdaynames/val"> 1138 <xsl:variable name="pos" select="position()"/> 1139 <option> 1140 <xsl:attribute name="value"><xsl:value-of select="/bedeworkadmin/recurdayvals/val[position() = $pos]"/></xsl:attribute> 1141 <xsl:value-of select="."/> 1142 </option> 1143 </xsl:for-each> 1144 </select> 1145 </p> 1146 </div> 1147 </span> 1148 </td> 1149 </tr> 1150 <!-- recurrence count, until, forever --> 1151 <tr> 1152 <td class="recurrenceUntil"> 1153 <div id="recurrenceUntilRules" class="invisible"> 1154 <strong>Repeat:</strong> 1155 <p> 1156 <div class="dateFields"> 1157 <input type="radio" name="recurCountUntil" value="until" id="recurUntil"/> 1158 until 1159 <select name="untilMonth" onfocus="selectRecurCountUntil('recurUntil')"> 1160 <xsl:for-each select="/bedeworkadmin/formElements/form/start/month/select/option"> 1161 <xsl:copy-of select="."/> 1162 </xsl:for-each> 1163 </select> 1164 <select name="untilDay" onfocus="selectRecurCountUntil('recurUntil')"> 1165 <xsl:for-each select="/bedeworkadmin/formElements/form/start/day/select/option"> 1166 <xsl:copy-of select="."/> 1167 </xsl:for-each> 1168 </select> 1169 <xsl:choose> 1170 <xsl:when test="/bedeworkadmin/creating = 'true'"> 1171 <select name="untilYear" onfocus="selectRecurCountUntil('recurUntil')"> 1172 <xsl:for-each select="/bedeworkadmin/formElements/form/start/year/select/option"> 1173 <xsl:copy-of select="."/> 1174 </xsl:for-each> 1175 </select> 1176 </xsl:when> 1177 <xsl:otherwise> 1178 <input type="text" name="untilYear" size="4" onfocus="selectRecurCountUntil('recurUntil')"> 1179 <xsl:attribute name="value"><xsl:value-of select="/bedeworkadmin/formElements/form/start/yearText/input/@value"/></xsl:attribute> 1180 </input> 1181 </xsl:otherwise> 1182 </xsl:choose> 1183 </div> 1184 <script language="JavaScript" type="text/javascript"> 1185 <xsl:comment> 1186 untilDateDynCalWidget = new dynCalendar('untilDateDynCalWidget', <xsl:value-of select="number(/bedeworkadmin/formElements/form/start/yearText/input/@value)"/>, <xsl:value-of select="number(/bedeworkadmin/formElements/form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(/bedeworkadmin/formElements/form/start/day/select/option[@selected='selected']/@value)"/>, 'untilDateCalWidgetCallback',false,'<xsl:value-of select="$resourcesRoot"/>/resources/'); 1187 </xsl:comment> 1188 </script> 1189 </p> 1190 <p> 1191 <input type="radio" name="recurCountUntil" value="forever" checked="checked"/> 1192 forever 1193   1194 <input type="radio" name="recurCountUntil" value="count" id="recurCount"/> 1195 <input type="text" value="1" size="2" name="countHolder" onfocus="selectRecurCountUntil('recurCount')"/> times 1196 </p> 1197 </div> 1198 </td> 1199 </tr> 1200 </table> 1201 </div> 1202 </xsl:if> 1340 </span> 1341 </td> 1342 </tr> 1343 <!-- recurrence count, until, forever --> 1344 <tr> 1345 <td class="recurrenceUntil"> 1346 <div id="recurrenceUntilRules" class="invisible"> 1347 <strong>Repeat:</strong> 1348 <p> 1349 <div class="dateFields"> 1350 <input type="radio" name="recurCountUntil" value="until" id="recurUntil"> 1351 <xsl:if test="form/recurring/until"> 1352 <xsl:attribute name="checked">checked</xsl:attribute> 1353 </xsl:if> 1354 </input> 1355 until 1356 <select name="untilMonth" onfocus="selectRecurCountUntil('recurUntil')"> 1357 <xsl:for-each select="form/start/month/select/option"> 1358 <xsl:copy-of select="."/> 1359 </xsl:for-each> 1360 </select> 1361 <select name="untilDay" onfocus="selectRecurCountUntil('recurUntil')"> 1362 <xsl:for-each select="form/start/day/select/option"> 1363 <xsl:copy-of select="."/> 1364 </xsl:for-each> 1365 </select> 1366 <xsl:choose> 1367 <xsl:when test="/bedeworkadmin/creating = 'true'"> 1368 <select name="untilYear" onfocus="selectRecurCountUntil('recurUntil')"> 1369 <xsl:for-each select="form/start/year/select/option"> 1370 <xsl:copy-of select="."/> 1371 </xsl:for-each> 1372 </select> 1373 </xsl:when> 1374 <xsl:otherwise> 1375 <input type="text" name="untilYear" size="4" onfocus="selectRecurCountUntil('recurUntil')"> 1376 <xsl:attribute name="value"><xsl:value-of select="form/start/yearText/input/@value"/></xsl:attribute> 1377 </input> 1378 </xsl:otherwise> 1379 </xsl:choose> 1380 </div> 1381 <script language="JavaScript" type="text/javascript"> 1382 <xsl:comment> 1383 untilDateDynCalWidget = new dynCalendar('untilDateDynCalWidget', <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)"/>, 'untilDateCalWidgetCallback',false,'<xsl:value-of select="$resourcesRoot"/>/resources/'); 1384 </xsl:comment> 1385 </script> 1386 </p> 1387 <p> 1388 <input type="radio" name="recurCountUntil" value="forever"> 1389 <xsl:if test="not(form/recurring) or form/recurring/count = '-1'"> 1390 <xsl:attribute name="checked">checked</xsl:attribute> 1391 </xsl:if> 1392 </input> 1393 forever 1394   1395 <input type="radio" name="recurCountUntil" value="count" id="recurCount"> 1396 <xsl:if test="form/recurring/count != '-1'"> 1397 <xsl:attribute name="checked">checked</xsl:attribute> 1398 </xsl:if> 1399 </input> 1400 <input type="text" value="1" size="2" name="countHolder" onfocus="selectRecurCountUntil('recurCount')"> 1401 <xsl:if test="form/recurring/count and form/recurring/count != '-1'"> 1402 <xsl:attribute name="value"><xsl:value-of select="form/recurring/count"/></xsl:attribute> 1403 </xsl:if> 1404 </input> 1405 times 1406 </p> 1407 </div> 1408 </td> 1409 </tr> 1410 </table> 1411 </div> 1412 </xsl:otherwise> 1413 </xsl:choose> 1203 1414 </td> 1204 1415 </tr> … … 1210 1421 <td> 1211 1422 <xsl:choose> 1212 <xsl:when test=" /bedeworkadmin/formElements/form/status = 'TENTATIVE'">1423 <xsl:when test="form/status = 'TENTATIVE'"> 1213 1424 <input type="radio" name="event.status" value="CONFIRMED"/>confirmed <input type="radio" name="event.status" value="TENTATIVE" checked="checked"/>tentative <input type="radio" name="event.status" value="CANCELLED"/>cancelled 1214 1425 </xsl:when> 1215 <xsl:when test=" /bedeworkadmin/formElements/form/status = 'CANCELLED'">1426 <xsl:when test="form/status = 'CANCELLED'"> 1216 1427 <input type="radio" name="event.status" value="CONFIRMED"/>confirmed <input type="radio" name="event.status" value="TENTATIVE"/>tentative <input type="radio" name="event.status" value="CANCELLED" checked="checked"/>cancelled 1217 1428 </xsl:when> … … 1228 1439 </td> 1229 1440 <td> 1230 <xsl:copy-of select=" /bedeworkadmin/formElements/form/desc/*"/>1441 <xsl:copy-of select="form/desc/*"/> 1231 1442 <div class="fieldInfo"> 1232 1443 Enter all pertinent information, including the academic titles of 1233 1444 all speakers and/or participants. 1234 <span class="maxCharNotice">(<xsl:value-of select=" /bedeworkadmin/formElements/form/descLength"/> characters max.)</span>1445 <span class="maxCharNotice">(<xsl:value-of select="form/descLength"/> characters max.)</span> 1235 1446 </div> 1236 1447 </td> … … 1242 1453 </td> 1243 1454 <td> 1244 <xsl:copy-of select=" /bedeworkadmin/formElements/form/cost/*"/>1455 <xsl:copy-of select="form/cost/*"/> 1245 1456 <xsl:text> </xsl:text> 1246 1457 <span class="fieldInfo">(optional: if any, and place to purchase tickets)</span> … … 1253 1464 </td> 1254 1465 <td> 1255 <xsl:copy-of select=" /bedeworkadmin/formElements/form/link/*"/>1466 <xsl:copy-of select="form/link/*"/> 1256 1467 <xsl:text> </xsl:text> 1257 1468 <span class="fieldInfo">(optional: for more information about the event)</span> … … 1264 1475 </td> 1265 1476 <td> 1266 <xsl:if test=" /bedeworkadmin/formElements/form/location/preferred/select/option">1477 <xsl:if test="form/location/preferred/select/option"> 1267 1478 <select name="prefLocationId" id="eventFormPrefLocationList"> 1268 1479 <option value="-1"> 1269 1480 Select preferred: 1270 1481 </option> 1271 <xsl:copy-of select=" /bedeworkadmin/formElements/form/location/preferred/select/*"/>1482 <xsl:copy-of select="form/location/preferred/select/*"/> 1272 1483 </select> 1273 1484 or Location (all): … … 1277 1488 Select: 1278 1489 </option> 1279 <xsl:copy-of select=" /bedeworkadmin/formElements/form/location/all/select/*"/>1490 <xsl:copy-of select="form/location/all/select/*"/> 1280 1491 </select> 1281 1492 </td> 1282 1493 </tr> 1283 1494 1284 <xsl:if test=" /bedeworkadmin/formElements/form/location/address">1495 <xsl:if test="form/location/address"> 1285 1496 <tr> 1286 1497 <td class="fieldName" colspan="2"> … … 1294 1505 </td> 1295 1506 <td> 1296 <xsl:variable name="addressFieldName" select=" /bedeworkadmin/formElements/form/location/address/input/@name"/>1507 <xsl:variable name="addressFieldName" select="form/location/address/input/@name"/> 1297 1508 <xsl:variable name="calLocations"> 1298 <xsl:for-each select=" /bedeworkadmin/formElements/form/location/all/select/option">"<xsl:value-of select="."/>"<xsl:if test="position()!=last()">,</xsl:if>1509 <xsl:for-each select="form/location/all/select/option">"<xsl:value-of select="."/>"<xsl:if test="position()!=last()">,</xsl:if> 1299 1510 </xsl:for-each> 1300 1511 </xsl:variable> … … 1310 1521 </td> 1311 1522 <td> 1312 <xsl:copy-of select=" /bedeworkadmin/formElements/form/location/link/*"/>1523 <xsl:copy-of select="form/location/link/*"/> 1313 1524 <xsl:text> </xsl:text> 1314 1525 <span class="fieldInfo">(optional: for information about the location)</span> … … 1323 1534 </td> 1324 1535 <td> 1325 <xsl:if test=" /bedeworkadmin/formElements/form/contact/preferred/select/option">1536 <xsl:if test="form/contact/preferred/select/option"> 1326 1537 <select name="prefContactId" id="eventFormContactList"> 1327 1538 <option value="-1"> 1328 1539 Select preferred: 1329 1540 </option>option> 1330 <xsl:copy-of select=" /bedeworkadmin/formElements/form/contact/preferred/select/*"/>1541 <xsl:copy-of select="form/contact/preferred/select/*"/> 1331 1542 </select> 1332 1543 or Contact (all): … … 1336 1547 Select: 1337 1548 </option> 1338 <xsl:copy-of select=" /bedeworkadmin/formElements/form/contact/all/select/*"/>1549 <xsl:copy-of select="form/contact/all/select/*"/> 1339 1550 </select> 1340 1551 </td> … … 1348 1559 </td> 1349 1560 <td> 1350 <xsl:if test=" /bedeworkadmin/formElements/form/categories/preferred/category and /bedeworkadmin/creating='true'">1561 <xsl:if test="form/categories/preferred/category and /bedeworkadmin/creating='true'"> 1351 1562 <input type="radio" name="categoryCheckboxes" value="preferred" checked="checked" onclick="changeClass('preferredCategoryCheckboxes','shown');changeClass('allCategoryCheckboxes','invisible');"/>show preferred 1352 1563 <input type="radio" name="categoryCheckboxes" value="all" onclick="changeClass('preferredCategoryCheckboxes','invisible');changeClass('allCategoryCheckboxes','shown')"/>show all<br/> 1353 1564 <table cellpadding="0" id="preferredCategoryCheckboxes"> 1354 1565 <tr> 1355 <xsl:variable name="catCount" select="count( /bedeworkadmin/formElements/form/categories/preferred/category)"/>1566 <xsl:variable name="catCount" select="count(form/categories/preferred/category)"/> 1356 1567 <td> 1357 <xsl:for-each select=" /bedeworkadmin/formElements/form/categories/preferred/category[position() <= ceiling($catCount div 2)]">1568 <xsl:for-each select="form/categories/preferred/category[position() <= ceiling($catCount div 2)]"> 1358 1569 <input type="checkbox" name="categoryKey"> 1359 1570 <xsl:attribute name="value"><xsl:value-of select="keyword"/></xsl:attribute> 1360 1571 <xsl:attribute name="id">pref-<xsl:value-of select="keyword"/></xsl:attribute> 1361 1572 <xsl:attribute name="onchange">setCatChBx('pref-<xsl:value-of select="keyword"/>','all-<xsl:value-of select="keyword"/>')</xsl:attribute> 1362 <xsl:if test="keyword = /bedeworkadmin/formElements/form/categories/current//category/keyword"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>1573 <xsl:if test="keyword = form/categories/current//category/keyword"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 1363 1574 <xsl:value-of select="keyword"/> 1364 1575 </input><br/> … … 1366 1577 </td> 1367 1578 <td> 1368 <xsl:for-each select=" /bedeworkadmin/formElements/form/categories/preferred/category[position() > ceiling($catCount div 2)]">1579 <xsl:for-each select="form/categories/preferred/category[position() > ceiling($catCount div 2)]"> 1369 1580 <input type="checkbox" name="categoryKey"> 1370 1581 <xsl:attribute name="value"><xsl:value-of select="keyword"/></xsl:attribute> 1371 1582 <xsl:attribute name="id">pref-<xsl:value-of select="keyword"/></xsl:attribute> 1372 1583 <xsl:attribute name="onchange">setCatChBx('pref-<xsl:value-of select="keyword"/>','all-<xsl:value-of select="keyword"/>')</xsl:attribute> 1373 <xsl:if test="keyword = /bedeworkadmin/formElements/form/categories/current//category/keyword"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>1584 <xsl:if test="keyword = form/categories/current//category/keyword"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 1374 1585 <xsl:value-of select="keyword"/> 1375 1586 </input><br/> … … 1380 1591 </xsl:if> 1381 1592 <table cellpadding="0" id="allCategoryCheckboxes"> 1382 <xsl:if test=" /bedeworkadmin/formElements/form/categories/preferred/category and /bedeworkadmin/creating='true'">1593 <xsl:if test="form/categories/preferred/category and /bedeworkadmin/creating='true'"> 1383 1594 <xsl:attribute name="class">invisible</xsl:attribute> 1384 1595 </xsl:if> 1385 1596 <tr> 1386 <xsl:variable name="catCount" select="count( /bedeworkadmin/formElements/form/categories/all/category)"/>1597 <xsl:variable name="catCount" select="count(form/categories/all/category)"/> 1387 1598 <td> 1388 <xsl:for-each select=" /bedeworkadmin/formElements/form/categories/all/category[position() <= ceiling($catCount div 2)]">1599 <xsl:for-each select="form/categories/all/category[position() <= ceiling($catCount div 2)]"> 1389 1600 <input type="checkbox" name="categoryKey"> 1390 1601 <xsl:attribute name="value"><xsl:value-of select="keyword"/></xsl:attribute> … … 1393 1604 <xsl:attribute name="onchange">setCatChBx('all-<xsl:value-of select="keyword"/>','pref-<xsl:value-of select="keyword"/>')</xsl:attribute> 1394 1605 </xsl:if> 1395 <xsl:if test="keyword = /bedeworkadmin/formElements/form/categories/current//category/keyword">1606 <xsl:if test="keyword = form/categories/current//category/keyword"> 1396 1607 <xsl:attribute name="checked">checked</xsl:attribute> 1397 1608 </xsl:if> … … 1401 1612 </td> 1402 1613 <td> 1403 <xsl:for-each select=" /bedeworkadmin/formElements/form/categories/all/category[position() > ceiling($catCount div 2)]">1614 <xsl:for-each select="form/categories/all/category[position() > ceiling($catCount div 2)]"> 1404 1615 <input type="checkbox" name="categoryKey"> 1405 1616 <xsl:attribute name="value"><xsl:value-of select="keyword"/></xsl:attribute> … … 1408 1619 <xsl:attribute name="onchange">setCatChBx('all-<xsl:value-of select="keyword"/>','pref-<xsl:value-of select="keyword"/>')</xsl:attribute> 1409 1620 </xsl:if> 1410 <xsl:if test="keyword = /bedeworkadmin/formElements/form/categories/current//category/keyword">1621 <xsl:if test="keyword = form/categories/current//category/keyword"> 1411 1622 <xsl:attribute name="checked">checked</xsl:attribute> 1412 1623 </xsl:if> … … 1439 1650 </tr> 1440 1651 1441 <xsl:if test=" /bedeworkadmin/formElements/form/contact/name">1652 <xsl:if test="form/contact/name"> 1442 1653 <tr> 1443 1654 <td class="fieldName" colspan="2"> … … 1451 1662 </td> 1452 1663 <td> 1453 <xsl:copy-of select=" /bedeworkadmin/formElements/form/contact/name/*"/>1664 <xsl:copy-of select="form/contact/name/*"/> 1454 1665 </td> 1455 1666 </tr> … … 1459 1670 </td> 1460 1671 <td> 1461 <xsl:copy-of select=" /bedeworkadmin/formElements/form/contact/phone/*"/>1672 <xsl:copy-of select="form/contact/phone/*"/> 1462 1673 <xsl:text> </xsl:text> 1463 1674 <span class="fieldInfo">(optional)</span> … … 1469 1680 </td> 1470 1681 <td> 1471 <xsl:copy-of select=" /bedeworkadmin/formElements/form/contact/link/*"/>1682 <xsl:copy-of select="form/contact/link/*"/> 1472 1683 <xsl:text> </xsl:text> 1473 1684 <span class="fieldInfo">(optional)</span> … … 1479 1690 </td> 1480 1691 <td> 1481 <xsl:copy-of select=" /bedeworkadmin/formElements/form/contact/email/*"/>1692 <xsl:copy-of select="form/contact/email/*"/> 1482 1693 <xsl:text> </xsl:text> 1483 1694 <span class="fieldInfo">(optional)</span> test trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.css
r1177 r1179 655 655 padding: 2px 4px; 656 656 } 657 #recurrenceInfo { 658 font-size: 0.9em; 659 font-style: italic; 660 margin-bottom: 0.5em; 661 } 657 662 #recurrenceFields #recurrenceTable strong { 658 663 display: inline; … … 668 673 width: 100%; 669 674 padding: 0.5em 0 0 1em; 670 border-top: 1px solid #ddd;671 675 border-left: 1px solid #ddd; 676 } 677 #recurrenceFields #recurrenceTable td.recurrenceRules #advancedRecurrenceRules { 678 display: block; 679 border-bottom: 1px solid #ddd; 672 680 } 673 681 #recurrenceFields #recurrenceTable td.recurrenceRules .rruleBlock { trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl
r1177 r1179 1947 1947 </tr> 1948 1948 1949 <!-- Date , Time, and Recurrence-->1950 <!-- ============= =============-->1949 <!-- Date and Time --> 1950 <!-- ============= --> 1951 1951 <tr> 1952 1952 <td class="fieldname"> … … 2200 2200 </td> 2201 2201 </tr> 2202 <!-- Recurrence fields --> 2203 <!-- ================= --> 2202 2204 <tr> 2203 2205 <td class="fieldname"> … … 2205 2207 </td> 2206 2208 <td class="fieldval"> 2207 2208 <!-- Recurrence fields --> 2209 <!-- ================= --> 2210 <xsl:if test="recurrenceId = ''"> 2211 <!-- existing recurrence instances can not themselves recur, 2212 so block this whole section if this event is an instance 2213 (has a recurrenceId) --> 2214 <input type="checkbox" name="recurrenceFlag" onclick="swapRecurrence(this)" value="on"/> 2215 <xsl:if test="form/recurring='true'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 2216 <xsl:choose> 2217 <xsl:when test="/bedework/creating = 'true'"> 2218 set recurrence rules 2219 </xsl:when> 2220 <xsl:otherwise> 2221 change recurrence 2222 </xsl:otherwise> 2223 </xsl:choose> 2224 <span id="recurrenceUiSwitch" class="invisible"> 2225 <input type="checkbox" name="recurrenceUiSwitch" value="simple" onchange="swapVisible(this,'advancedRecurrenceRules')"/>show advanced recurrence rules 2226 </span> 2227 2228 <!-- set these dynamically when form is submitted --> 2229 <input type="hidden" name="interval" value=""/> 2230 <input type="hidden" name="count" value=""/> 2231 <input type="hidden" name="until" value=""/> 2232 <input type="hidden" name="byday" value=""/> 2233 <input type="hidden" name="bymonthday" value=""/> 2234 <input type="hidden" name="bymonth" value=""/> 2235 <input type="hidden" name="byweekno" value=""/> 2236 <input type="hidden" name="byyearday" value=""/> 2237 <input type="hidden" name="wkst" value=""/> 2238 <input type="hidden" name="setpos" value=""/> 2239 2240 <div id="recurrenceFields" class="invisible"> 2241 <table id="recurrenceTable" cellspacing="0"> 2242 <tr> 2243 <td class="recurrenceFrequency" rowspan="2"> 2244 <strong>Frequency:</strong><br/> 2245 <!-- "freq" is used to determine if a recurrence should be created; test for "NONE" --> 2246 <input type="radio" name="freq" value="NONE" onclick="showRecurrence(this.value)" checked="checked"/>none<br/> 2247 <!--<input type="radio" name="freq" value="HOURLY" onclick="showRecurrence(this.value)"/>hourly<br/>--> 2248 <input type="radio" name="freq" value="DAILY" onclick="showRecurrence(this.value)"/>daily<br/> 2249 <input type="radio" name="freq" value="WEEKLY" onclick="showRecurrence(this.value)"/>weekly<br/> 2250 <input type="radio" name="freq" value="MONTHLY" onclick="showRecurrence(this.value)"/>monthly<br/> 2251 <input type="radio" name="freq" value="YEARLY" onclick="showRecurrence(this.value)"/>yearly 2252 </td> 2253 <td class="recurrenceRules"> 2254 <!-- none --> 2255 <div id="noneRecurrenceRules"> 2256 <p>does not recur</p> 2257 </div> 2258 <span id="advancedRecurrenceRules" class="invisible"> 2259 <!-- hourly --> 2260 <div id="hourlyRecurrenceRules" class="invisible"> 2261 <strong>Interval:</strong> 2262 every <input type="text" name="hourlyInterval" size="2" value="1"/> hour(s) 2263 </div> 2264 <!-- daily --> 2265 <div id="dailyRecurrenceRules" class="invisible"> 2266 <p> 2267 <strong>Interval:</strong> 2268 every <input type="text" name="dailyInterval" size="2" value="1"/> day(s) 2269 </p> 2270 <p> 2271 <input type="checkbox" name="swapDayMonthCheckBoxList" value="" onclick="swapVisible(this,'dayMonthCheckBoxList')"/> 2272 in these months: 2273 <div id="dayMonthCheckBoxList" class="invisible"> 2274 <xsl:for-each select="/bedework/monthlabels/val"> 2275 <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 2276 <span class="chkBoxListItem"> 2277 <input type="checkbox" name="dayMonths"> 2278 <xsl:attribute name="value"><xsl:value-of select="/bedework/monthvalues/val[position() = $pos]"/></xsl:attribute> 2279 </input> 2280 <xsl:value-of select="."/> 2281 </span> 2282 <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 2283 </xsl:for-each> 2209 <!-- Output descriptive recurrence information. Probably not 2210 complete yet. Replace all freq strings so can be internationalized. --> 2211 <xsl:if test="form/recurrence"> 2212 <div id="recurrenceInfo"> 2213 Every 2214 <xsl:choose> 2215 <xsl:when test="form/recurrence/interval > 1"> 2216 <xsl:value-of select="form/recurrence/interval"/> 2217 </xsl:when> 2218 </xsl:choose> 2219 <xsl:text> </xsl:text> 2220 <xsl:choose> 2221 <xsl:when test="form/recurrence/freq = 'HOURLY'">hour</xsl:when> 2222 <xsl:when test="form/recurrence/freq = 'DAILY'">day</xsl:when> 2223 <xsl:when test="form/recurrence/freq = 'WEEKLY'">week</xsl:when> 2224 <xsl:when test="form/recurrence/freq = 'MONTHLY'">month</xsl:when> 2225 <xsl:when test="form/recurrence/freq = 'YEARLY'">year</xsl:when> 2226 </xsl:choose><xsl:if test="form/recurrence/interval > 1">s</xsl:if> 2227 <xsl:text> </xsl:text> 2228 2229 <xsl:if test="form/recurrence/byday"> 2230 <xsl:for-each select="form/recurrence/byday/pos"> 2231 <xsl:if test="position() != 1"> and </xsl:if> 2232 on 2233 <xsl:choose> 2234 <xsl:when test="@val='1'"> 2235 the first 2236 </xsl:when> 2237 <xsl:when test="@val='2'"> 2238 the second 2239 </xsl:when> 2240 <xsl:when test="@val='3'"> 2241 the third 2242 </xsl:when> 2243 <xsl:when test="@val='4'"> 2244 the fourth 2245 </xsl:when> 2246 <xsl:when test="@val='5'"> 2247 the fifth 2248 </xsl:when> 2249 <xsl:when test="@val='-1'"> 2250 the last 2251 </xsl:when> 2252 <!-- don't output "every" --> 2253 <!--<xsl:otherwise> 2254 every 2255 </xsl:otherwise>--> 2256 </xsl:choose> 2257 <xsl:for-each select="day"> 2258 <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 2259 <xsl:variable name="dayVal" select="."/> 2260 <xsl:variable name="dayPos"> 2261 <xsl:for-each select="/bedework/recurdayvals/val"> 2262 <xsl:if test="node() = $dayVal"><xsl:value-of select="position()"/></xsl:if> 2263 </xsl:for-each> 2264 </xsl:variable> 2265 <xsl:value-of select="/bedework/shortdaynames/val[position() = $dayPos]"/> 2266 <xsl:if test="position() != last()">, </xsl:if> 2267 </xsl:for-each> 2268 </xsl:for-each> 2269 </xsl:if> 2270 2271 <xsl:if test="form/recurrence/bymonth"> 2272 in 2273 <xsl:for-each select="form/recurrence/bymonth/val"> 2274 <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 2275 <xsl:variable name="monthNum" select="number(.)"/> 2276 <xsl:value-of select="/bedework/monthlabels/val[position() = $monthNum]"/> 2277 <xsl:if test="position() != last()">, </xsl:if> 2278 </xsl:for-each> 2279 </xsl:if> 2280 2281 <xsl:if test="form/recurrence/bymonthday"> 2282 on the 2283 <xsl:for-each select="form/recurrence/bymonthday/val"> 2284 <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 2285 <xsl:value-of select="."/><xsl:choose> 2286 <xsl:when test=". = '11' or . = '12' or . = '13'">th</xsl:when> 2287 <xsl:when test="substring(., string-length(.), 1) = '1'">st</xsl:when> 2288 <xsl:when test="substring(., string-length(.), 1) = '2'">nd</xsl:when> 2289 <xsl:when test="substring(., string-length(.), 1) = '3'">rd</xsl:when> 2290 <xsl:otherwise>th</xsl:otherwise> 2291 </xsl:choose> 2292 <xsl:if test="position() != last()">, </xsl:if> 2293 </xsl:for-each> 2294 day<xsl:if test="form/recurrence/bymonthday/val[position()=2]">s</xsl:if> of the month 2295 </xsl:if> 2296 2297 <xsl:if test="form/recurrence/byyearday"> 2298 on the 2299 <xsl:for-each select="form/recurrence/byyearday/val"> 2300 <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 2301 <xsl:value-of select="."/><xsl:choose> 2302 <xsl:when test=". = '11' or . = '12' or . = '13'">th</xsl:when> 2303 <xsl:when test="substring(., string-length(.), 1) = '1'">st</xsl:when> 2304 <xsl:when test="substring(., string-length(.), 1) = '2'">nd</xsl:when> 2305 <xsl:when test="substring(., string-length(.), 1) = '3'">rd</xsl:when> 2306 <xsl:otherwise>th</xsl:otherwise> 2307 </xsl:choose> 2308 <xsl:if test="position() != last()">, </xsl:if> 2309 </xsl:for-each> 2310 day<xsl:if test="form/recurrence/byyearday/val[position()=2]">s</xsl:if> of the year 2311 </xsl:if> 2312 2313 <xsl:if test="form/recurrence/byweekno"> 2314 in the 2315 <xsl:for-each select="form/recurrence/byweekno/val"> 2316 <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 2317 <xsl:value-of select="."/><xsl:choose> 2318 <xsl:when test=". = '11' or . = '12' or . = '13'">th</xsl:when> 2319 <xsl:when test="substring(., string-length(.), 1) = '1'">st</xsl:when> 2320 <xsl:when test="substring(., string-length(.), 1) = '2'">nd</xsl:when> 2321 <xsl:when test="substring(., string-length(.), 1) = '3'">rd</xsl:when> 2322 <xsl:otherwise>th</xsl:otherwise> 2323 </xsl:choose> 2324 <xsl:if test="position() != last()">, </xsl:if> 2325 </xsl:for-each> 2326 week<xsl:if test="form/recurrence/byweekno/val[position()=2]">s</xsl:if> of the year 2327 </xsl:if> 2328 2329 repeating 2330 <xsl:choose> 2331 <xsl:when test="form/recurrence/count = '-1'">forever</xsl:when> 2332 <xsl:when test="form/recurrence/until"> 2333 <xsl:value-of select="form/recurrence/until"/> 2334 </xsl:when> 2335 <xsl:otherwise> 2336 <xsl:value-of select="form/recurrence/count"/> 2337 time<xsl:if test="form/recurrence/count > 1">s</xsl:if> 2338 </xsl:otherwise> 2339 </xsl:choose> 2340 </div> 2341 </xsl:if> 2342 2343 <!-- recurrence rules --> 2344 <xsl:choose> 2345 <xsl:when test="recurrenceId != ''"> 2346 <!-- recurrence instances can not themselves recur, 2347 so provide access to master event --> 2348 <em>This event is a recurrence instance.</em><br/> 2349 <a href="{$editEvent}&subid={$subscriptionId}&calPath={$calPath}&guid={$guid}" title="edit master (recurring event)">edit master event</a> 2350 </xsl:when> 2351 <xsl:otherwise> 2352 <!-- has recurrenceId, so is master --> 2353 <input type="checkbox" name="recurrenceFlag" onclick="swapRecurrence(this)" value="on"/> 2354 <xsl:choose> 2355 <xsl:when test="/bedeworkadmin/creating = 'true'"> 2356 set recurrence rules 2357 </xsl:when> 2358 <xsl:otherwise> 2359 change recurrence 2360 </xsl:otherwise> 2361 </xsl:choose> 2362 <span id="recurrenceUiSwitch" class="invisible"> 2363 <input type="checkbox" name="recurrenceUiSwitch" value="simple" onchange="swapVisible(this,'advancedRecurrenceRules')"/> 2364 show advanced recurrence rules 2365 </span> 2366 2367 <!-- set these dynamically when form is submitted --> 2368 <input type="hidden" name="interval" value=""/> 2369 <input type="hidden" name="count" value=""/> 2370 <input type="hidden" name="until" value=""/> 2371 <input type="hidden" name="byday" value=""/> 2372 <input type="hidden" name="bymonthday" value=""/> 2373 <input type="hidden" name="bymonth" value=""/> 2374 <input type="hidden" name="byweekno" value=""/> 2375 <input type="hidden" name="byyearday" value=""/> 2376 <input type="hidden" name="wkst" value=""/> 2377 <input type="hidden" name="setpos" value=""/> 2378 2379 <div id="recurrenceFields" class="invisible"> 2380 <table id="recurrenceTable" cellspacing="0"> 2381 <tr> 2382 <td class="recurrenceFrequency" rowspan="2"> 2383 <strong>Frequency:</strong><br/> 2384 <!-- "freq" is used to determine if a recurrence should be created; test for "NONE" --> 2385 <input type="radio" name="freq" value="NONE" onclick="showRecurrence(this.value)" checked="checked"/>none<br/> 2386 <!--<input type="radio" name="freq" value="HOURLY" onclick="showRecurrence(this.value)"/>hourly<br/>--> 2387 <input type="radio" name="freq" value="DAILY" onclick="showRecurrence(this.value)"/>daily<br/> 2388 <input type="radio" name="freq" value="WEEKLY" onclick="showRecurrence(this.value)"/>weekly<br/> 2389 <input type="radio" name="freq" value="MONTHLY" onclick="showRecurrence(this.value)"/>monthly<br/> 2390 <input type="radio" name="freq" value="YEARLY" onclick="showRecurrence(this.value)"/>yearly 2391 </td> 2392 <td class="recurrenceRules"> 2393 <!-- none --> 2394 <div id="noneRecurrenceRules"> 2395 <p>does not recur</p> 2396 </div> 2397 <span id="advancedRecurrenceRules" class="invisible"> 2398 <!-- hourly --> 2399 <div id="hourlyRecurrenceRules" class="invisible"> 2400 <p> 2401 <strong>Interval:</strong> 2402 every 2403 <input type="text" name="hourlyInterval" size="2" value="1"> 2404 <xsl:if test="form/recurrence/interval"> 2405 <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 2406 </xsl:if> 2407 </input> 2408 hour(s) 2409 </p> 2284 2410 </div> 2285 </p> 2286 <p> 2287 <input type="checkbox" name="swapDaySetPos" value="" onclick="swapVisible(this,'daySetPos')"/> 2288 limit to: 2289 <div id="daySetPos" class="invisible"> 2411 <!-- daily --> 2412 <div id="dailyRecurrenceRules" class="invisible"> 2413 <p> 2414 <strong>Interval:</strong> 2415 every 2416 <input type="text" name="dailyInterval" size="2" value="1"> 2417 <xsl:if test="form/recurrence/interval"> 2418 <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 2419 </xsl:if> 2420 </input> 2421 day(s) 2422 </p> 2423 <p> 2424 <input type="checkbox" name="swapDayMonthCheckBoxList" value="" onclick="swapVisible(this,'dayMonthCheckBoxList')"/> 2425 in these months: 2426 <div id="dayMonthCheckBoxList" class="invisible"> 2427 <xsl:for-each select="/bedework/monthlabels/val"> 2428 <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 2429 <span class="chkBoxListItem"> 2430 <input type="checkbox" name="dayMonths"> 2431 <xsl:attribute name="value"><xsl:value-of select="/bedework/monthvalues/val[position() = $pos]"/></xsl:attribute> 2432 </input> 2433 <xsl:value-of select="."/> 2434 </span> 2435 <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 2436 </xsl:for-each> 2437 </div> 2438 </p> 2439 <!--<p> 2440 <input type="checkbox" name="swapDaySetPos" value="" onclick="swapVisible(this,'daySetPos')"/> 2441 limit to: 2442 <div id="daySetPos" class="invisible"> 2443 </div> 2444 </p>--> 2290 2445 </div> 2291 </p> 2292 </div> 2293 <!-- weekly --> 2294 <div id="weeklyRecurrenceRules" class="invisible"> 2295 <p> 2296 <strong>Interval:</strong> 2297 every <input type="text" name="weeklyInterval" size="2" value="1"/> week(s) on:<br/> 2298 </p> 2299 <p> 2300 <div id="weekRecurFields"> 2301 <xsl:call-template name="byDayChkBoxList"> 2302 <xsl:with-param name="name">byDayWeek</xsl:with-param> 2303 </xsl:call-template> 2446 <!-- weekly --> 2447 <div id="weeklyRecurrenceRules" class="invisible"> 2448 <p> 2449 <strong>Interval:</strong> 2450 every 2451 <input type="text" name="weeklyInterval" size="2" value="1"> 2452 <xsl:if test="form/recurrence/interval"> 2453 <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 2454 </xsl:if> 2455 </input> 2456 week(s) on: 2457 </p> 2458 <p> 2459 <div id="weekRecurFields"> 2460 <xsl:call-template name="byDayChkBoxList"> 2461 <xsl:with-param name="name">byDayWeek</xsl:with-param> 2462 </xsl:call-template> 2463 </div> 2464 </p> 2465 <p class="weekRecurLinks"> 2466 <a href="javascript:recurSelectWeekdays('weekRecurFields')">select weekdays</a> | 2467 <a href="javascript:recurSelectWeekends('weekRecurFields')">select weekends</a> 2468 </p> 2469 <p> 2470 Week start: 2471 <select name="weekWkst"> 2472 <xsl:for-each select="/bedework/shortdaynames/val"> 2473 <xsl:variable name="pos" select="position()"/> 2474 <option> 2475 <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute> 2476 <xsl:value-of select="."/> 2477 </option> 2478 </xsl:for-each> 2479 </select> 2480 </p> 2304 2481 </div> 2305 </p> 2306 <p class="weekRecurLinks"> 2307 <a href="javascript:recurSelectWeekdays('weekRecurFields')">select weekdays</a> | 2308 <a href="javascript:recurSelectWeekends('weekRecurFields')">select weekends</a> 2309 </p> 2310 <p> 2311 Week start: 2312 <select name="weekWkst"> 2313 <xsl:for-each select="/bedework/shortdaynames/val"> 2314 <xsl:variable name="pos" select="position()"/> 2315 <option> 2316 <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute> 2317 <xsl:value-of select="."/> 2318 </option> 2319 </xsl:for-each> 2320 </select> 2321 </p> 2322 </div> 2323 <!-- monthly --> 2324 <div id="monthlyRecurrenceRules" class="invisible"> 2325 <p> 2326 <strong>Interval:</strong> 2327 every <input type="text" name="monthlyInterval" size="2" value="1"/> month(s) 2328 </p> 2329 <div id="monthRecurFields"> 2330 <div id="monthRecurFields1"> 2331 on 2332 <select name="bymonthposPos1" width="7em" onchange="changeClass('monthRecurFields2','shown')"> 2333 <xsl:call-template name="recurrenceDayPosOptions"/> 2334 </select> 2335 <xsl:call-template name="byDayChkBoxList"/> 2482 <!-- monthly --> 2483 <div id="monthlyRecurrenceRules" class="invisible"> 2484 <p> 2485 <strong>Interval:</strong> 2486 every 2487 <input type="text" name="monthlyInterval" size="2" value="1"> 2488 <xsl:if test="form/recurrence/interval"> 2489 <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 2490 </xsl:if> 2491 </input> 2492 month(s) 2493 </p> 2494 <div id="monthRecurFields"> 2495 <div id="monthRecurFields1"> 2496 on 2497 <select name="bymonthposPos1" width="7em" onchange="changeClass('monthRecurFields2','shown')"> 2498 <xsl:call-template name="recurrenceDayPosOptions"/> 2499 </select> 2500 <xsl:call-template name="byDayChkBoxList"/> 2501 </div> 2502 <xsl:call-template name="buildRecurFields"> 2503 <xsl:with-param name="current">2</xsl:with-param> 2504 <xsl:with-param name="total">10</xsl:with-param> 2505 <xsl:with-param name="name">month</xsl:with-param> 2506 </xsl:call-template> 2507 </div> 2508 <p> 2509 <input type="checkbox" name="swapMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'monthDaysCheckBoxList')"/> 2510 on these days:<br/> 2511 <div id="monthDaysCheckBoxList" class="invisible"> 2512 <xsl:call-template name="buildCheckboxList"> 2513 <xsl:with-param name="current">1</xsl:with-param> 2514 <xsl:with-param name="end">31</xsl:with-param> 2515 <xsl:with-param name="name">monthDayBoxes</xsl:with-param> 2516 </xsl:call-template> 2517 </div> 2518 </p> 2336 2519 </div> 2337 <xsl:call-template name="buildRecurFields"> 2338 <xsl:with-param name="current">2</xsl:with-param> 2339 <xsl:with-param name="total">10</xsl:with-param> 2340 <xsl:with-param name="name">month</xsl:with-param> 2341 </xsl:call-template> 2342 </div> 2343 <p> 2344 <input type="checkbox" name="swapMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'monthDaysCheckBoxList')"/> 2345 on these days:<br/> 2346 <div id="monthDaysCheckBoxList" class="invisible"> 2347 <xsl:call-template name="buildCheckboxList"> 2348 <xsl:with-param name="current">1</xsl:with-param> 2349 <xsl:with-param name="end">31</xsl:with-param> 2350 <xsl:with-param name="name">monthDayBoxes</xsl:with-param> 2351 </xsl:call-template> 2520 <!-- yearly --> 2521 <div id="yearlyRecurrenceRules" class="invisible"> 2522 <p> 2523 <strong>Interval:</strong> 2524 every 2525 <input type="text" name="yearlyInterval" size="2" value="1"> 2526 <xsl:if test="form/recurrence/interval"> 2527 <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 2528 </xsl:if> 2529 </input> 2530 years(s) 2531 </p> 2532 <div id="yearRecurFields"> 2533 <div id="yearRecurFields1"> 2534 on 2535 <select name="byyearposPos1" width="7em" onchange="changeClass('yearRecurFields2','shown')"> 2536 <xsl:call-template name="recurrenceDayPosOptions"/> 2537 </select> 2538 <xsl:call-template name="byDayChkBoxList"/> 2539 </div> 2540 <xsl:call-template name="buildRecurFields"> 2541 <xsl:with-param name="current">2</xsl:with-param> 2542 <xsl:with-param name="total">10</xsl:with-param> 2543 <xsl:with-param name="name">year</xsl:with-param> 2544 </xsl:call-template> 2545 </div> 2546 <p> 2547 <input type="checkbox" name="swapYearMonthCheckBoxList" value="" onclick="swapVisible(this,'yearMonthCheckBoxList')"/> 2548 in these months: 2549 <div id="yearMonthCheckBoxList" class="invisible"> 2550 <xsl:for-each select="/bedework/monthlabels/val"> 2551 <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 2552 <span class="chkBoxListItem"> 2553 <input type="checkbox" name="yearMonths"> 2554 <xsl:attribute name="value"><xsl:value-of select="/bedework/monthvalues/val[position() = $pos]"/></xsl:attribute> 2555 </input> 2556 <xsl:value-of select="."/> 2557 </span> 2558 <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 2559 </xsl:for-each> 2560 </div> 2561 </p> 2562 <p> 2563 <input type="checkbox" name="swapYearMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'yearMonthDaysCheckBoxList')"/> 2564 on these days of the month:<br/> 2565 <div id="yearMonthDaysCheckBoxList" class="invisible"> 2566 <xsl:call-template name="buildCheckboxList"> 2567 <xsl:with-param name="current">1</xsl:with-param> 2568 <xsl:with-param name="end">31</xsl:with-param> 2569 <xsl:with-param name="name">yearMonthDayBoxes</xsl:with-param> 2570 </xsl:call-template> 2571 </div> 2572 </p> 2573 <p> 2574 <input type="checkbox" name="swapYearWeeksCheckBoxList" value="" onclick="swapVisible(this,'yearWeeksCheckBoxList')"/> 2575 in these weeks of the year:<br/> 2576 <div id="yearWeeksCheckBoxList" class="invisible"> 2577 <xsl:call-template name="buildCheckboxList"> 2578 <xsl:with-param name="current">1</xsl:with-param> 2579 <xsl:with-param name="end">53</xsl:with-param> 2580 <xsl:with-param name="name">yearWeekBoxes</xsl:with-param> 2581 </xsl:call-template> 2582 </div> 2583 </p> 2584 <p> 2585 <input type="checkbox" name="swapYearDaysCheckBoxList" value="" onclick="swapVisible(this,'yearDaysCheckBoxList')"/> 2586 on these days of the year:<br/> 2587 <div id="yearDaysCheckBoxList" class="invisible"> 2588 <xsl:call-template name="buildCheckboxList"> 2589 <xsl:with-param name="current">1</xsl:with-param> 2590 <xsl:with-param name="end">366</xsl:with-param> 2591 <xsl:with-param name="name">yearDayBoxes</xsl:with-param> 2592 </xsl:call-template> 2593 </div> 2594 </p> 2595 <p> 2596 Week start: 2597 <select name="yearWkst"> 2598 <xsl:for-each select="/bedework/shortdaynames/val"> 2599 <xsl:variable name="pos" select="position()"/> 2600 <option> 2601 <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute> 2602 <xsl:value-of select="."/> 2603 </option> 2604 </xsl:for-each> 2605 </select> 2606 </p> 2352 2607 </div> 2353 </p> 2354 </div> 2355 <!-- yearly --> 2356 <div id="yearlyRecurrenceRules" class="invisible"> 2357 <strong>Interval:</strong> 2358 every <input type="text" name="yearlyInterval" size="2" value="1"/> years(s)<br/> 2359 <div id="yearRecurFields"> 2360 <div id="yearRecurFields1"> 2361 on 2362 <select name="byyearposPos1" width="7em" onchange="changeClass('yearRecurFields2','shown')"> 2363 <xsl:call-template name="recurrenceDayPosOptions"/> 2364 </select> 2365 <xsl:call-template name="byDayChkBoxList"/> 2366 </div> 2367 <xsl:call-template name="buildRecurFields"> 2368 <xsl:with-param name="current">2</xsl:with-param> 2369 <xsl:with-param name="total">10</xsl:with-param> 2370 <xsl:with-param name="name">year</xsl:with-param> 2371 </xsl:call-template> 2372 </div> 2373 <p> 2374 <input type="checkbox" name="swapYearMonthCheckBoxList" value="" onclick="swapVisible(this,'yearMonthCheckBoxList')"/> 2375 in these months: 2376 <div id="yearMonthCheckBoxList" class="invisible"> 2377 <xsl:for-each select="/bedework/monthlabels/val"> 2378 <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 2379 <span class="chkBoxListItem"> 2380 <input type="checkbox" name="yearMonths"> 2381 <xsl:attribute name="value"><xsl:value-of select="/bedework/monthvalues/val[position() = $pos]"/></xsl:attribute> 2382 </input> 2383 <xsl:value-of select="."/> 2384 </span> 2385 <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 2386 </xsl:for-each> 2387 </div> 2388 </p> 2389 <p> 2390 <input type="checkbox" name="swapYearMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'yearMonthDaysCheckBoxList')"/> 2391 on these days of the month:<br/> 2392 <div id="yearMonthDaysCheckBoxList" class="invisible"> 2393 <xsl:call-template name="buildCheckboxList"> 2394 <xsl:with-param name="current">1</xsl:with-param> 2395 <xsl:with-param name="end">31</xsl:with-param> 2396 <xsl:with-param name="name">yearMonthDayBoxes</xsl:with-param> 2397 </xsl:call-template> 2398 </div> 2399 </p> 2400 <p> 2401 <input type="checkbox" name="swapYearWeeksCheckBoxList" value="" onclick="swapVisible(this,'yearWeeksCheckBoxList')"/> 2402 in these weeks of the year:<br/> 2403 <div id="yearWeeksCheckBoxList" class="invisible"> 2404 <xsl:call-template name="buildCheckboxList"> 2405 <xsl:with-param name="current">1</xsl:with-param> 2406 <xsl:with-param name="end">53</xsl:with-param> 2407 <xsl:with-param name="name">yearWeekBoxes</xsl:with-param> 2408 </xsl:call-template> 2409 </div> 2410 </p> 2411 <p> 2412 <input type="checkbox" name="swapYearDaysCheckBoxList" value="" onclick="swapVisible(this,'yearDaysCheckBoxList')"/> 2413 on these days of the year:<br/> 2414 <div id="yearDaysCheckBoxList" class="invisible"> 2415 <xsl:call-template name="buildCheckboxList"> 2416 <xsl:with-param name="current">1</xsl:with-param> 2417 <xsl:with-param name="end">366</xsl:with-param> 2418 <xsl:with-param name="name">yearDayBoxes</xsl:with-param> 2419 </xsl:call-template> 2420 </div> 2421 </p> 2422 <p> 2423 Week start: 2424 <select name="yearWkst"> 2425 <xsl:for-each select="/bedework/shortdaynames/val"> 2426 <xsl:variable name="pos" select="position()"/> 2427 <option> 2428 <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute> 2429 <xsl:value-of select="."/> 2430 </option> 2431 </xsl:for-each> 2432 </select> 2433 </p> 2434 </div> 2435 </span> 2436 </td> 2437 </tr> 2438 <!-- recurrence count, until, forever --> 2439 <tr> 2440 <td class="recurrenceUntil"> 2441 <div id="recurrenceUntilRules" class="invisible"> 2442 <strong>Repeat:</strong> 2443 <p> 2444 <div class="dateFields"> 2445 <input type="radio" name="recurCountUntil" value="until" id="recurUntil"/> 2446 until 2447 <select name="untilMonth" onfocus="selectRecurCountUntil('recurUntil')"> 2448 <xsl:for-each select="form/start/month/select/option"> 2449 <xsl:copy-of select="."/> 2450 </xsl:for-each> 2451 </select> 2452 <select name="untilDay" onfocus="selectRecurCountUntil('recurUntil')"> 2453 <xsl:for-each select="form/start/day/select/option"> 2454 <xsl:copy-of select="."/> 2455 </xsl:for-each> 2456 </select> 2457 <xsl:choose> 2458 <xsl:when test="/bedework/creating = 'true'"> 2459 <select name="untilYear" onfocus="selectRecurCountUntil('recurUntil')"> 2460 <xsl:for-each select="form/start/year/select/option"> 2608 </span> 2609 </td> 2610 </tr> 2611 <!-- recurrence count, until, forever --> 2612 <tr> 2613 <td class="recurrenceUntil"> 2614 <div id="recurrenceUntilRules" class="invisible"> 2615 <strong>Repeat:</strong> 2616 <p> 2617 <div class="dateFields"> 2618 <input type="radio" name="recurCountUntil" value="until" id="recurUntil"> 2619 <xsl:if test="form/recurring/until"> 2620 <xsl:attribute name="checked">checked</xsl:attribute> 2621 </xsl:if> 2622 </input> 2623 until 2624 <select name="untilMonth" onfocus="selectRecurCountUntil('recurUntil')"> 2625 <xsl:for-each select="form/start/month/select/option"> 2461 2626 <xsl:copy-of select="."/> 2462 2627 </xsl:for-each> 2463 2628 </select> 2464 </xsl:when> 2465 <xsl:otherwise> 2466 <input type="text" name="untilYear" size="4" onfocus="selectRecurCountUntil('recurUntil')"> 2467 <xsl:attribute name="value"><xsl:value-of select="form/start/yearText/input/@value"/></xsl:attribute> 2468 </input> 2469 </xsl:otherwise> 2470 </xsl:choose> 2629 <select name="untilDay" onfocus="selectRecurCountUntil('recurUntil')"> 2630 <xsl:for-each select="form/start/day/select/option"> 2631 <xsl:copy-of select="."/> 2632 </xsl:for-each> 2633 </select> 2634 <xsl:choose> 2635 <xsl:when test="/bedework/creating = 'true'"> 2636 <select name="untilYear" onfocus="selectRecurCountUntil('recurUntil')"> 2637 <xsl:for-each select="form/start/year/select/option"> 2638 <xsl:copy-of select="."/> 2639 </xsl:for-each> 2640 </select> 2641 </xsl:when> 2642 <xsl:otherwise> 2643 <input type="text" name="untilYear" size="4" onfocus="selectRecurCountUntil('recurUntil')"> 2644 <xsl:attribute name="value"><xsl:value-of select="form/start/yearText/input/@value"/></xsl:attribute> 2645 </input> 2646 </xsl:otherwise> 2647 </xsl:choose> 2648 </div> 2649 <script language="JavaScript" type="text/javascript"> 2650 <xsl:comment> 2651 untilDateDynCalWidget = new dynCalendar('untilDateDynCalWidget', <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)"/>, 'untilDateCalWidgetCallback',false,'<xsl:value-of select="$resourcesRoot"/>/resources/'); 2652 </xsl:comment> 2653 </script> 2654 </p> 2655 <p> 2656 <input type="radio" name="recurCountUntil" value="forever"> 2657 <xsl:if test="not(form/recurring) or form/recurring/count = '-1'"> 2658 <xsl:attribute name="checked">checked</xsl:attribute> 2659 </xsl:if> 2660 </input> 2661 forever 2662   2663 <input type="radio" name="recurCountUntil" value="count" id="recurCount"> 2664 <xsl:if test="form/recurring/count != '-1'"> 2665 <xsl:attribute name="checked">checked</xsl:attribute> 2666 </xsl:if> 2667 </input> 2668 <input type="text" value="1" size="2" name="countHolder" onfocus="selectRecurCountUntil('recurCount')"> 2669 <xsl:if test="form/recurring/count and form/recurring/count != '-1'"> 2670 <xsl:attribute name="value"><xsl:value-of select="form/recurring/count"/></xsl:attribute> 2671 </xsl:if> 2672 </input> 2673 times 2674 </p> 2471 2675 </div> 2472 <script language="JavaScript" type="text/javascript"> 2473 <xsl:comment> 2474 untilDateDynCalWidget = new dynCalendar('untilDateDynCalWidget', <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)"/>, 'untilDateCalWidgetCallback',false,'<xsl:value-of select="$resourcesRoot"/>/resources/'); 2475 </xsl:comment> 2476 </script> 2477 </p> 2478 <p> 2479 <input type="radio" name="recurCountUntil" value="forever" checked="checked"/> 2480 forever 2481   2482 <input type="radio" name="recurCountUntil" value="count" id="recurCount"/> 2483 <input type="text" value="1" size="2" name="countHolder" onfocus="selectRecurCountUntil('recurCount')"/> times 2484 </p> 2485 </div> 2486 </td> 2487 </tr> 2488 </table> 2489 </div> 2490 </xsl:if> 2491 2492 <!-- recurrence dates (rdates) --> 2493 <div dojoType="DateTimePicker" id="rdates"> 2494 </div> 2495 2676 </td> 2677 </tr> 2678 </table> 2679 </div> 2680 <!-- recurrence dates (rdates) --> 2681 <input type="button" value="add/remove recurrence dates" action="" class="small"/> 2682 </xsl:otherwise> 2683 </xsl:choose> 2496 2684 </td> 2497 2685 </tr> trunk/deployment/webuser/webapp/resources/demoskins/resources/includes.js
r1177 r1179 1 var debug = true; // very basic debugging for now1 var debug = false; // very basic debugging for now 2 2 3 3 function changeClass(id, newClass) { … … 271 271 if (debug) { 272 272 alert("frequency: " + freq + "\ninterval: " + formObj.interval.value + "\ncount: " + formObj.count.value + "\nuntil: " + formObj.until.value + "\nbyday: " + formObj.byday.value + "\nbymonthday: " + formObj.bymonthday.value + "\nbymonth: " + formObj.bymonth.value + "\nbyyearday: " + formObj.byyearday.value + "\nwkst: " + formObj.wkst.value); 273 var formFields = ''; 274 for (i = 0; i < formObj.length; i++) { 275 formFields += formObj[i].name + ": " + formObj[i].value + "\n"; 276 } 277 alert(formFields); 273 278 } 274 279 return true;
