Changeset 1690

Show
Ignore:
Timestamp:
01/04/08 17:04:54
Author:
johnsa
Message:

admin client: force calendar selection upon publishing submitted event

Files:

Legend:

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

    r1681 r1690  
    698698} 
    699699#submitTable { 
     700  position: relative; /* allows for absolute positioning within the table, e.g. #pubishBox */ 
    700701  width: 96%; /* less than 100% helps avoid IE weirdness */ 
    701702  margin-top: 1em; 
     703} 
     704#publishBox { 
     705  position: absolute; 
     706  padding: 1em; 
     707  background-color: #ffa; 
     708  color: black; 
     709  border: 1px solid #333; 
     710  width: 420px; 
     711  height: 60px; 
     712} 
     713#publishBoxCloseButton { 
     714  position: absolute; 
     715  top: 0; 
     716  right: 0; 
     717  margin: 0; 
     718  padding: 0; 
    702719} 
    703720#sharingBox { 
  • trunk/deployment/webadmin/webapp/resources/default/default/default.xsl

    r1682 r1690  
    10281028          </td> 
    10291029        </tr> 
    1030         <tr> 
    1031           <td class="fieldName"> 
    1032             Calendar:** 
    1033           </td> 
    1034           <td> 
    1035             <xsl:if test="form/calendar/preferred/select/option"> 
    1036               <select name="prefCalendarId"> 
     1030        <xsl:if test="not(starts-with(form/calendar/path,$submissionsRootUnencoded))"> 
     1031          <tr> 
     1032            <td class="fieldName"> 
     1033              Calendar:** 
     1034            </td> 
     1035            <td> 
     1036              <xsl:if test="form/calendar/preferred/select/option"> 
     1037                <select name="prefCalendarId"> 
     1038                  <option> 
     1039                    <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute> 
     1040                    Select preferred: 
     1041                  </option> 
     1042                  <xsl:for-each select="form/calendar/preferred/select/option"> 
     1043                    <xsl:sort select="." order="ascending"/> 
     1044                    <option> 
     1045                      <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> 
     1046                      <xsl:if test="@selected"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
     1047                      <xsl:choose> 
     1048                        <xsl:when test="starts-with(node(),/bedework/submissionsRoot/unencoded)"> 
     1049                          submitted events 
     1050                        </xsl:when> 
     1051                        <xsl:otherwise> 
     1052                          <xsl:value-of select="substring-after(node(),'/public/')"/> 
     1053                        </xsl:otherwise> 
     1054                      </xsl:choose> 
     1055                    </option> 
     1056                  </xsl:for-each> 
     1057                </select><br/> 
     1058                or Calendar (all): 
     1059              </xsl:if> 
     1060              <select name="calendarId"> 
    10371061                <option> 
    10381062                  <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute> 
    1039                   Select preferred
     1063                  Select
    10401064                </option> 
    1041                 <xsl:for-each select="form/calendar/preferred/select/option"> 
     1065                <xsl:for-each select="form/calendar/all/select/option"> 
    10421066                  <xsl:sort select="." order="ascending"/> 
    10431067                  <option> 
     
    10541078                  </option> 
    10551079                </xsl:for-each> 
    1056               </select><br/> 
    1057               or Calendar (all): 
    1058             </xsl:if> 
    1059             <select name="calendarId"> 
    1060               <option> 
    1061                 <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute> 
    1062                 Select: 
    1063               </option> 
    1064               <xsl:for-each select="form/calendar/all/select/option"> 
    1065                 <xsl:sort select="." order="ascending"/> 
    1066                 <option> 
    1067                   <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> 
    1068                   <xsl:if test="@selected"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
    1069                   <xsl:choose> 
    1070                     <xsl:when test="starts-with(node(),/bedework/submissionsRoot/unencoded)"> 
    1071                       submitted events 
    1072                     </xsl:when> 
    1073                     <xsl:otherwise> 
    1074                       <xsl:value-of select="substring-after(node(),'/public/')"/> 
    1075                     </xsl:otherwise> 
    1076                   </xsl:choose> 
    1077                 </option> 
    1078               </xsl:for-each> 
    1079             </select> 
    1080             <xsl:text> </xsl:text> 
    1081             <span id="calDescriptionsLink"> 
    1082               <a href="javascript:launchSimpleWindow('{$calendar-fetchDescriptions}')">calendar descriptions</a> 
    1083             </span> 
    1084           </td> 
    1085         </tr> 
     1080              </select> 
     1081              <xsl:text> </xsl:text> 
     1082              <span id="calDescriptionsLink"> 
     1083                <a href="javascript:launchSimpleWindow('{$calendar-fetchDescriptions}')">calendar descriptions</a> 
     1084              </span> 
     1085            </td> 
     1086          </tr> 
     1087        </xsl:if> 
    10861088 
    10871089        <tr> 
     
    22582260          <xsl:when test="starts-with(form/calendar/path,$submissionsRootUnencoded)"> 
    22592261            <td> 
     2262              <div id="publishBox" class="invisible"> 
     2263                <div id="publishBoxCloseButton"> 
     2264                  <a href="javascript:resetPublishBox('calendarId')"> 
     2265                    <img src="{$resourcesRoot}/resources/closeIcon.gif" width="20" height="20" alt="close" border="0"/> 
     2266                  </a> 
     2267                </div> 
     2268                <strong>Select a calendar in which to publish this event:</strong><br/> 
     2269                <select name="calendarId" id="calendarId"> 
     2270                  <option> 
     2271                    <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute> 
     2272                    Select: 
     2273                  </option> 
     2274                  <xsl:for-each select="form/calendar/all/select/option"> 
     2275                    <xsl:sort select="." order="ascending"/> 
     2276                    <option> 
     2277                      <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> 
     2278                      <xsl:if test="@selected"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
     2279                      <xsl:choose> 
     2280                        <xsl:when test="starts-with(node(),/bedework/submissionsRoot/unencoded)"> 
     2281                          submitted events 
     2282                        </xsl:when> 
     2283                        <xsl:otherwise> 
     2284                          <xsl:value-of select="substring-after(node(),'/public/')"/> 
     2285                        </xsl:otherwise> 
     2286                      </xsl:choose> 
     2287                    </option> 
     2288                  </xsl:for-each> 
     2289                </select> 
     2290                <input type="submit" name="publishEvent" value="Publish" onclick="changeClass('publishBox','invisible')"/> 
     2291                <xsl:if test="$portalFriendly = 'false'"> 
     2292                  <br/> 
     2293                  <span id="calDescriptionsLink"> 
     2294                    <a href="javascript:launchSimpleWindow('{$calendar-fetchDescriptions}')">calendar descriptions</a> 
     2295                  </span> 
     2296                </xsl:if> 
     2297              </div> 
    22602298              <input type="submit" name="updateSubmitEvent" value="Update Event"/> 
    2261               <input type="submit" name="publishEvent" value="Publish Event"/> 
     2299              <input type="button" name="publishEvent" value="Publish Event" onclick="changeClass('publishBox','visible')"/> 
    22622300              <input type="submit" name="cancel" value="Cancel"/> 
    22632301            </td> 
  • trunk/deployment/webadmin/webapp/resources/resources/bedeworkEventForm.js

    r1680 r1690  
    662662} 
    663663 
     664function resetPublishBox(calSelectId) { 
     665  // User has closed the publish box without publishing. 
     666  // Reset the calendar select box to default value and hide the publishBox. 
     667  var calSelect = document.getElementById(calSelectId); 
     668  calSelect.selectedIndex = 0; 
     669  changeClass('publishBox','invisible'); 
     670} 
     671 
     672 
    664673function init() { 
    665674  var untilHolder = dojo.byId("untilHolder");