Changeset 2163

Show
Ignore:
Timestamp:
05/08/09 17:15:50
Author:
johnsa
Message:

admin client: mail fields populated on event publish

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/deployment/webadmin/webapp/resources/default/default/default.css

    r2160 r2163  
    311311  float: right; 
    312312} 
    313 #bwSubmittedBy a
     313#bwSubmittedBy a.submitter
    314314  font-weight: bold; 
    315315} 
  • trunk/deployment/webadmin/webapp/resources/default/default/default.xsl

    r2162 r2163  
    10651065    <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    10661066    <xsl:variable name="eventTitle" select="form/title/input/@value"/> 
     1067    <xsl:variable name="eventUrl"><xsl:value-of select="$publicCal"/>/event/eventView.do?subid=<xsl:value-of select="$subscriptionId"/>&amp;calPath=<xsl:value-of select="$calPathEncoded"/>&amp;guid=<xsl:value-of select="$guid"/>&amp;recurrenceId=<xsl:value-of select="$recurrenceId"/></xsl:variable> 
    10671068 
    10681069    <h2>Event Information</h2> 
     
    10871088          Submitted by 
    10881089          <xsl:variable name="submitterEmail" select="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTER-EMAIL']/values/text"/> 
     1090          <a href="mailto:{$submitterEmail}?subject=[Event%20Submission] {$eventTitle}" title="Email {$submitterEmail}" class="submitter"> 
     1091            <xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTEDBY']/values/text"/> 
     1092          </a><br/> 
    10891093          <a href="mailto:{$submitterEmail}?subject=[Event%20Submission] {$eventTitle}" title="Email {$submitterEmail}"> 
    1090             <xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTEDBY']/values/text"/> 
     1094            <img src="{$resourcesRoot}/resources/email.gif" border="0"/> 
     1095            send message 
    10911096          </a> 
    10921097        </div> 
     
    11441149      <!-- Setup email notification fields --> 
    11451150      <input type="hidden" id="submitNotification" name="submitNotification" value="false"/> 
    1146       <input type="hidden" name="snsubject" value="Event Approved: {$eventTitle}"/> 
    1147       <input type="hidden" name="sntext"> 
    1148         <xsl:attribute name="value"> 
    1149            Your event has been approved. 
    1150  
    1151            EVENT DETAILS 
    1152            ------------- 
    1153            Title: <xsl:value-of select="$eventTitle"/> 
    1154            Dates: 
    1155            URL: <xsl:value-of select="$publicCal"/>/event/eventView.do?subid=<xsl:value-of select="$subscriptionId"/>&amp;calPath=<xsl:value-of select="$calPathEncoded"/>&amp;guid=<xsl:value-of select="$guid"/>&amp;recurrenceId=<xsl:value-of select="$recurrenceId"/> 
    1156         </xsl:attribute> 
    1157       </input> 
    1158  
    1159       <xsl:call-template name="submitEventButtons"/> 
     1151      <input type="hidden" id="snsubject" name="snsubject" value=""/> 
     1152      <input type="hidden" id="sntext" name="sntext" value=""/> 
     1153 
     1154      <xsl:call-template name="submitEventButtons"> 
     1155        <xsl:with-param name="eventTitle" select="$eventTitle"/> 
     1156        <xsl:with-param name="eventUrl" select="$eventUrl"/> 
     1157      </xsl:call-template> 
    11601158 
    11611159      <table class="eventFormTable"> 
     
    25322530        <!-- don't create two instances of the submit buttons on pending events; 
    25332531             the publishing buttons require numerous unique ids --> 
    2534         <xsl:call-template name="submitEventButtons"/> 
     2532        <xsl:call-template name="submitEventButtons">> 
     2533          <xsl:with-param name="eventTitle" select="$eventTitle"/> 
     2534          <xsl:with-param name="eventUrl" select="$eventUrl"/> 
     2535        </xsl:call-template> 
    25352536      </xsl:if> 
    25362537    </form> 
     
    25802581 
    25812582  <xsl:template name="submitEventButtons"> 
     2583    <xsl:param name="eventTitle"/> 
     2584    <xsl:param name="eventUrl"/> 
    25822585    <table border="0" id="submitTable"> 
    25832586      <tr> 
     
    26322635                  <input type="submit" name="updateSubmitEvent" value="Update Event"/> 
    26332636                  <input type="submit" name="publishEvent" value="Publish Event"> 
    2634                     <xsl:attribute name="onclick">doPublishEvent('<xsl:value-of select="form/calendar/all/select/option/@value"/>',this.form);</xsl:attribute> 
     2637                    <xsl:attribute name="onclick">doPublishEvent('<xsl:value-of select="form/calendar/all/select/option/@value"/>','<xsl:value-of select="$eventTitle"/>','<xsl:value-of select="$eventUrl"/>');</xsl:attribute> 
    26352638                  </input> 
    26362639                  <input type="submit" name="cancel" value="Cancel"/> 
  • trunk/deployment/webadmin/webapp/resources/resources/bedeworkEventForm.js

    r2161 r2163  
    694694} 
    695695 
    696 function doPublishEvent(publishingCal) { 
     696function doPublishEvent(publishingCal,eventTitle,eventUrl) { 
    697697  // User has submitted the event when there is only a single publishing calendar. 
    698698  // Update the newCalPath to reflect the publishing calendar: 
     
    704704  submitNotification = document.getElementById("submitNotification"); 
    705705  submitNotification.value = true; 
    706 
    707  
    708  
     706 
     707  // set the email field values 
     708  snsubject = document.getElementById("snsubject"); 
     709  snsubject.value = "Event Approved: " + eventTitle; 
     710  sntext = document.getElementById("sntext"); 
     711  sntext.value = "Your event has been approved and is now published.\n\nEVENT DETAILS\n-------------\n\nTitle: " + eventTitle + "\nURL: " + eventUrl; 
     712
     713function doRejectEvent(reason,eventTitle) { 
     714 
     715
     716 
     717