[Bedework-commit] bedework r1690 - in trunk/deployment/webadmin/webapp/resources: default/default resources

svnadmin at bedework.org svnadmin at bedework.org
Fri Jan 4 17:04:55 EST 2008


Author: johnsa
Date: 2008-01-04 17:04:54 -0500 (Fri, 04 Jan 2008)
New Revision: 1690

Added:
   trunk/deployment/webadmin/webapp/resources/resources/closeIcon.gif
Modified:
   trunk/deployment/webadmin/webapp/resources/default/default/default.css
   trunk/deployment/webadmin/webapp/resources/default/default/default.xsl
   trunk/deployment/webadmin/webapp/resources/resources/bedeworkEventForm.js
Log:
admin client: force calendar selection upon publishing submitted event

Modified: trunk/deployment/webadmin/webapp/resources/default/default/default.css
===================================================================
--- trunk/deployment/webadmin/webapp/resources/default/default/default.css	2008-01-03 16:00:57 UTC (rev 1689)
+++ trunk/deployment/webadmin/webapp/resources/default/default/default.css	2008-01-04 22:04:54 UTC (rev 1690)
@@ -697,9 +697,26 @@
   height: 20px;
 }
 #submitTable {
+  position: relative; /* allows for absolute positioning within the table, e.g. #pubishBox */
   width: 96%; /* less than 100% helps avoid IE weirdness */
   margin-top: 1em;
 }
+#publishBox {
+  position: absolute;
+  padding: 1em;
+  background-color: #ffa;
+  color: black;
+  border: 1px solid #333;
+  width: 420px;
+  height: 60px;
+}
+#publishBoxCloseButton {
+  position: absolute;
+  top: 0;
+  right: 0;
+  margin: 0;
+  padding: 0;
+}
 #sharingBox {
   margin: 0;
   border-top: 1px solid #333;

Modified: trunk/deployment/webadmin/webapp/resources/default/default/default.xsl
===================================================================
--- trunk/deployment/webadmin/webapp/resources/default/default/default.xsl	2008-01-03 16:00:57 UTC (rev 1689)
+++ trunk/deployment/webadmin/webapp/resources/default/default/default.xsl	2008-01-04 22:04:54 UTC (rev 1690)
@@ -1026,63 +1026,65 @@
           <td>
             <xsl:copy-of select="form/title/*"/>
           </td>
-        </tr>
-        <tr>
-          <td class="fieldName">
-            Calendar:**
-          </td>
-          <td>
-            <xsl:if test="form/calendar/preferred/select/option">
-              <select name="prefCalendarId">
+        </tr>
+        <xsl:if test="not(starts-with(form/calendar/path,$submissionsRootUnencoded))">
+          <tr>
+            <td class="fieldName">
+              Calendar:**
+            </td>
+            <td>
+              <xsl:if test="form/calendar/preferred/select/option">
+                <select name="prefCalendarId">
+                  <option>
+                    <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute>
+                    Select preferred:
+                  </option>
+                  <xsl:for-each select="form/calendar/preferred/select/option">
+                    <xsl:sort select="." order="ascending"/>
+                    <option>
+                      <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute>
+                      <xsl:if test="@selected"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if>
+                      <xsl:choose>
+                        <xsl:when test="starts-with(node(),/bedework/submissionsRoot/unencoded)">
+                          submitted events
+                        </xsl:when>
+                        <xsl:otherwise>
+                          <xsl:value-of select="substring-after(node(),'/public/')"/>
+                        </xsl:otherwise>
+                      </xsl:choose>
+                    </option>
+                  </xsl:for-each>
+                </select><br/>
+                or Calendar (all):
+              </xsl:if>
+              <select name="calendarId">
                 <option>
                   <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute>
-                  Select preferred:
+                  Select:
                 </option>
-                <xsl:for-each select="form/calendar/preferred/select/option">
+                <xsl:for-each select="form/calendar/all/select/option">
                   <xsl:sort select="." order="ascending"/>
                   <option>
                     <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute>
-                    <xsl:if test="@selected"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if>
+                    <xsl:if test="@selected"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if>
                     <xsl:choose>
                       <xsl:when test="starts-with(node(),/bedework/submissionsRoot/unencoded)">
                         submitted events
                       </xsl:when>
-                      <xsl:otherwise>
+                      <xsl:otherwise>
                         <xsl:value-of select="substring-after(node(),'/public/')"/>
                       </xsl:otherwise>
                     </xsl:choose>
                   </option>
                 </xsl:for-each>
-              </select><br/>
-              or Calendar (all):
-            </xsl:if>
-            <select name="calendarId">
-              <option>
-                <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute>
-                Select:
-              </option>
-              <xsl:for-each select="form/calendar/all/select/option">
-                <xsl:sort select="." order="ascending"/>
-                <option>
-                  <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute>
-                  <xsl:if test="@selected"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if>
-                  <xsl:choose>
-                    <xsl:when test="starts-with(node(),/bedework/submissionsRoot/unencoded)">
-                      submitted events
-                    </xsl:when>
-                    <xsl:otherwise>
-                      <xsl:value-of select="substring-after(node(),'/public/')"/>
-                    </xsl:otherwise>
-                  </xsl:choose>
-                </option>
-              </xsl:for-each>
-            </select>
-            <xsl:text> </xsl:text>
-            <span id="calDescriptionsLink">
-              <a href="javascript:launchSimpleWindow('{$calendar-fetchDescriptions}')">calendar descriptions</a>
-            </span>
-          </td>
-        </tr>
+              </select>
+              <xsl:text> </xsl:text>
+              <span id="calDescriptionsLink">
+                <a href="javascript:launchSimpleWindow('{$calendar-fetchDescriptions}')">calendar descriptions</a>
+              </span>
+            </td>
+          </tr>
+        </xsl:if>
 
         <tr>
           <td class="fieldName">
@@ -2257,8 +2259,44 @@
         <xsl:choose>
           <xsl:when test="starts-with(form/calendar/path,$submissionsRootUnencoded)">
             <td>
+              <div id="publishBox" class="invisible">
+                <div id="publishBoxCloseButton">
+                  <a href="javascript:resetPublishBox('calendarId')">
+                    <img src="{$resourcesRoot}/resources/closeIcon.gif" width="20" height="20" alt="close" border="0"/>
+                  </a>
+                </div>
+                <strong>Select a calendar in which to publish this event:</strong><br/>
+                <select name="calendarId" id="calendarId">
+                  <option>
+                    <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute>
+                    Select:
+                  </option>
+                  <xsl:for-each select="form/calendar/all/select/option">
+                    <xsl:sort select="." order="ascending"/>
+                    <option>
+                      <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute>
+                      <xsl:if test="@selected"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if>
+                      <xsl:choose>
+                        <xsl:when test="starts-with(node(),/bedework/submissionsRoot/unencoded)">
+                          submitted events
+                        </xsl:when>
+                        <xsl:otherwise>
+                          <xsl:value-of select="substring-after(node(),'/public/')"/>
+                        </xsl:otherwise>
+                      </xsl:choose>
+                    </option>
+                  </xsl:for-each>
+                </select>
+                <input type="submit" name="publishEvent" value="Publish" onclick="changeClass('publishBox','invisible')"/>
+                <xsl:if test="$portalFriendly = 'false'">
+                  <br/>
+                  <span id="calDescriptionsLink">
+                    <a href="javascript:launchSimpleWindow('{$calendar-fetchDescriptions}')">calendar descriptions</a>
+                  </span>
+                </xsl:if>
+              </div>
               <input type="submit" name="updateSubmitEvent" value="Update Event"/>
-              <input type="submit" name="publishEvent" value="Publish Event"/>
+              <input type="button" name="publishEvent" value="Publish Event" onclick="changeClass('publishBox','visible')"/>
               <input type="submit" name="cancel" value="Cancel"/>
             </td>
             <td align="right">

Modified: trunk/deployment/webadmin/webapp/resources/resources/bedeworkEventForm.js
===================================================================
--- trunk/deployment/webadmin/webapp/resources/resources/bedeworkEventForm.js	2008-01-03 16:00:57 UTC (rev 1689)
+++ trunk/deployment/webadmin/webapp/resources/resources/bedeworkEventForm.js	2008-01-04 22:04:54 UTC (rev 1690)
@@ -661,6 +661,15 @@
    selectRecurCountUntil('recurUntil');
 }
 
+function resetPublishBox(calSelectId) {
+  // User has closed the publish box without publishing.
+  // Reset the calendar select box to default value and hide the publishBox.
+  var calSelect = document.getElementById(calSelectId);
+  calSelect.selectedIndex = 0;
+  changeClass('publishBox','invisible');
+}
+
+
 function init() {
   var untilHolder = dojo.byId("untilHolder");
   dojo.event.connect(untilHolder, "onclick", untilClickHandler);

Added: trunk/deployment/webadmin/webapp/resources/resources/closeIcon.gif
===================================================================
(Binary files differ)


Property changes on: trunk/deployment/webadmin/webapp/resources/resources/closeIcon.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream



More information about the Bedework-commit mailing list