| 141 | | <xsl:variable name="inbox" select="/bedework/inbox/numActive"/> |
|---|
| 142 | | <xsl:variable name="outbox" select="/bedework/outbox/numActive"/> |
|---|
| 143 | | <xsl:variable name="inboxChanged" select="/bedework/inbox/changed"/> |
|---|
| 144 | | <xsl:variable name="outboxChanged" select="/bedework/outbox/changed"/> |
|---|
| 145 | | <xsl:variable name="inboxFlagged"> |
|---|
| 146 | | <xsl:choose> |
|---|
| 147 | | <xsl:when test="/bedework/appvar[key='inboxFlagged']/value='false'">false</xsl:when> |
|---|
| 148 | | <xsl:otherwise>true</xsl:otherwise> |
|---|
| 149 | | </xsl:choose> |
|---|
| 150 | | </xsl:variable> |
|---|
| 151 | | <xsl:variable name="outboxFlagged"> |
|---|
| 152 | | <xsl:choose> |
|---|
| 153 | | <xsl:when test="/bedework/appvar[key='outboxFlagged']/value='false'">false</xsl:when> |
|---|
| 154 | | <xsl:otherwise>true</xsl:otherwise> |
|---|
| 155 | | </xsl:choose> |
|---|
| 156 | | </xsl:variable> |
|---|
| 157 | | <body onload="checkStatus({$inbox},{$outbox},{$inboxChanged},{$outboxChanged},'{$calendar-inbox}','{$calendar-outbox}',{$inboxFlagged},{$outboxFlagged})"> |
|---|
| | 141 | <xsl:variable name="inboxNumActive" select="/bedework/inboxState/numActive"/> |
|---|
| | 142 | <xsl:variable name="inboxChanged" select="/bedework/inboxState/changed"/> |
|---|
| | 143 | <body onload="checkStatus({$inboxNumActive},{$inboxChanged},'{$showInbox}')"> |
|---|
| 321 | | function checkStatus(inbox,outbox,inboxChanged,outboxChanged,inboxUrl,outboxUrl,inboxFlagged,outboxFlagged) { |
|---|
| 322 | | if (inbox && (inboxFlagged || inboxChanged)) { |
|---|
| 323 | | alert("You have " + inbox + " pending meeting requests."); |
|---|
| 324 | | inboxUrl = "showMain.rdo?setappvar=inboxFlagged(false)"; //just refresh for now |
|---|
| 325 | | window.location.replace(inboxUrl); |
|---|
| | 313 | function checkStatus(inboxCount,changed,url) { |
|---|
| | 314 | if (inboxCount && changed) { |
|---|
| | 315 | alert("You have " + inboxCount + " pending meeting requests."); |
|---|
| | 316 | window.location.replace(url); |
|---|
| | 3799 | </xsl:template> |
|---|
| | 3800 | |
|---|
| | 3801 | <!--==== INBOX and OUTBOX ====--> |
|---|
| | 3802 | <xsl:template match="inbox"> |
|---|
| | 3803 | <h2 class="common">Inbox</h2> |
|---|
| | 3804 | <table id="inbox" class="common" cellspacing="0"> |
|---|
| | 3805 | <tr> |
|---|
| | 3806 | <th class="commonHeader">start</th> |
|---|
| | 3807 | <th class="commonHeader">end</th> |
|---|
| | 3808 | <th class="commonHeader">method</th> |
|---|
| | 3809 | <th class="commonHeader">title</th> |
|---|
| | 3810 | <th class="commonHeader">status</th> |
|---|
| | 3811 | </tr> |
|---|
| | 3812 | <xsl:for-each select="events/event"> |
|---|
| | 3813 | <tr> |
|---|
| | 3814 | <xsl:attribute name="class"> |
|---|
| | 3815 | <xsl:choose> |
|---|
| | 3816 | <xsl:when test="scheduleMethod=1">publish</xsl:when> |
|---|
| | 3817 | <xsl:when test="scheduleMethod=2">request</xsl:when> |
|---|
| | 3818 | <xsl:when test="scheduleMethod=5">cancel</xsl:when> |
|---|
| | 3819 | <xsl:when test="scheduleMethod=7 or scheduleMethod=8">counter</xsl:when> |
|---|
| | 3820 | </xsl:choose> |
|---|
| | 3821 | </xsl:attribute> |
|---|
| | 3822 | <td><xsl:value-of select="start/shortdate"/> <xsl:value-of select="start/time"/></td> |
|---|
| | 3823 | <td><xsl:value-of select="end/shortdate"/> <xsl:value-of select="end/time"/></td> |
|---|
| | 3824 | <td><xsl:apply-templates select="scheduleMethod"/></td> |
|---|
| | 3825 | <td><xsl:value-of select="title"/></td> |
|---|
| | 3826 | <td><xsl:value-of select="requestStatus"/></td> |
|---|
| | 3827 | </tr> |
|---|
| | 3828 | </xsl:for-each> |
|---|
| | 3829 | </table> |
|---|
| | 3830 | </xsl:template> |
|---|
| | 3831 | |
|---|
| | 3832 | <xsl:template match="Outbox"> |
|---|
| | 3833 | <h2>Outbox</h2> |
|---|
| | 3834 | </xsl:template> |
|---|
| | 3835 | |
|---|
| | 3836 | <xsl:template match="scheduleMethod"> |
|---|
| | 3837 | <xsl:choose> |
|---|
| | 3838 | <xsl:when test="node()=1">publish</xsl:when> |
|---|
| | 3839 | <xsl:when test="node()=2">request</xsl:when> |
|---|
| | 3840 | <xsl:when test="node()=3">reply</xsl:when> |
|---|
| | 3841 | <xsl:when test="node()=4">add</xsl:when> |
|---|
| | 3842 | <xsl:when test="node()=5">cancel</xsl:when> |
|---|
| | 3843 | <xsl:when test="node()=6">refresh</xsl:when> |
|---|
| | 3844 | <xsl:when test="node()=7">counter</xsl:when> |
|---|
| | 3845 | <xsl:when test="node()=8">declined</xsl:when><!-- declinecounter --> |
|---|
| | 3846 | <xsl:otherwise>unknown</xsl:otherwise> |
|---|
| | 3847 | </xsl:choose> |
|---|