Changeset 2170

Show
Ignore:
Timestamp:
05/13/09 14:15:47
Author:
johnsa
Message:

admin client: add claim event and release event button to pending events;

update xproperty handling to allow for removal of xprops

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/deployment/resources/javascript/bedework/bedeworkXProperties.js

    r2160 r2170  
    3939var bwXPropertySubmitStatus = "X-BEDEWORK-SUBMIT-STATUS"; 
    4040var bwXPropertySubmitterEmail = "X-BEDEWORK-SUBMITTER-EMAIL"; 
     41var bwXPropertySubmitterEmail = "X-BEDEWORK-SUBMITTER-EMAIL"; 
     42var bwXPropertySubmissionClaimant = "X-BEDEWORK-SUBMISSION-CLAIMANT"; 
    4143 
    4244var bwXParamDescription = "X-BEDEWORK-PARAM-DESCRIPTION"; 
     
    4749var bwXParamPhone = "X-BEDEWORK-PARAM-PHONE"; 
    4850var bwXParamEmail = "X-BEDEWORK-PARAM-EMAIL"; 
     51var bwXParamClaimantUser = "X-BEDEWORK-SUBMISSION-CLAIMANT-USER"; 
    4952 
    5053 
     
    123126  } 
    124127 
     128  this.remove = function(name) { 
     129    index = this.getIndex(name); 
     130    if (index > -1) { 
     131      xproperties.splice(index,1); 
     132    } 
     133  } 
     134 
    125135  this.getIndex = function(name) { 
    126136    for (var i = 0; i < xproperties.length; i++) { 
  • trunk/deployment/webadmin/webapp/resources/default/default/default.css

    r2167 r2170  
    364364  color: black; 
    365365} 
     366#commonListTable td.unclaimed { 
     367  background-color: #eee; 
     368  color: #900 !important; 
     369  font-style: italic; 
     370} 
    366371.recurrenceEditLinks { 
    367372  font-style: italic; 
     
    722727  margin-top: 1em; 
    723728} 
     729.claimButtons { 
     730  padding-left: 2em; 
     731} 
    724732#publishBox { 
    725733  position: absolute; 
  • trunk/deployment/webadmin/webapp/resources/default/default/default.xsl

    r2169 r2170  
    229229      <head> 
    230230        <title>Calendar Admin: Public Events Administration</title> 
    231         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
     231        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/> 
    232232        <link rel="stylesheet" href="{$resourcesRoot}/default/default/default.css"/> 
    233233        <link rel="stylesheet" href="{$resourcesRoot}/default/default/subColors.css"/> 
     
    276276          </xsl:choose> 
    277277          <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkEventForm.js">&#160;</script> 
    278           <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkXProperties.js">&#160;</script> 
     278          <script type="text/javascript" src="/bedework-common/javascript/bedework/bedeworkXProperties.js">&#160;</script> 
    279279          <script type="text/javascript"> 
    280280            <xsl:comment> 
     
    954954      <tr> 
    955955        <th>Title</th> 
     956        <xsl:if test="/bedework/page='tabPendingEvents'"> 
     957          <th>Claimed By</th> 
     958        </xsl:if> 
    956959        <th>Start</th> 
    957960        <th>End</th> 
     
    984987    <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    985988    <tr> 
     989      <xsl:if test="not(xproperties/X-BEDEWORK-SUBMISSION-CLAIMANT)"> 
     990        <xsl:attribute name="class">highlight</xsl:attribute> 
     991      </xsl:if> 
    986992      <td> 
    987993        <xsl:choose> 
    988994          <xsl:when test="$pending = 'true'"> 
    989             <a href="{$event-fetchForUpdatePending}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    990               <xsl:choose> 
    991                 <xsl:when test="summary != ''"> 
    992                   <xsl:value-of select="summary"/> 
    993                 </xsl:when> 
    994                 <xsl:otherwise> 
    995                   <em>no title</em> 
    996                 </xsl:otherwise> 
    997               </xsl:choose> 
    998             </a> 
     995            <xsl:choose> 
     996              <xsl:when test="xproperties/X-BEDEWORK-SUBMISSION-CLAIMANT and not(xproperties/X-BEDEWORK-SUBMISSION-CLAIMANT/values/text = /bedework/userInfo/group)"> 
     997                <xsl:choose> 
     998                  <xsl:when test="summary != ''"> 
     999                    <xsl:value-of select="summary"/> 
     1000                  </xsl:when> 
     1001                  <xsl:otherwise> 
     1002                    <em>no title</em> 
     1003                  </xsl:otherwise> 
     1004                </xsl:choose> 
     1005              </xsl:when> 
     1006              <xsl:otherwise> 
     1007                <a href="{$event-fetchForUpdatePending}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     1008                  <xsl:choose> 
     1009                    <xsl:when test="summary != ''"> 
     1010                      <xsl:value-of select="summary"/> 
     1011                    </xsl:when> 
     1012                    <xsl:otherwise> 
     1013                      <em>no title</em> 
     1014                    </xsl:otherwise> 
     1015                  </xsl:choose> 
     1016                </a> 
     1017              </xsl:otherwise> 
     1018            </xsl:choose> 
    9991019          </xsl:when> 
    10001020          <xsl:otherwise> 
     
    10121032        </xsl:choose> 
    10131033      </td> 
     1034      <xsl:if test="/bedework/page='tabPendingEvents'"> 
     1035        <xsl:choose> 
     1036          <xsl:when test="xproperties/X-BEDEWORK-SUBMISSION-CLAIMANT"> 
     1037            <td> 
     1038              <xsl:value-of select="xproperties/X-BEDEWORK-SUBMISSION-CLAIMANT/values/text"/> 
     1039              <xsl:text> </xsl:text> 
     1040              (<xsl:value-of select="xproperties/X-BEDEWORK-SUBMISSION-CLAIMANT/parameters/X-BEDEWORK-SUBMISSION-CLAIMANT-USER"/>) 
     1041            </td> 
     1042          </xsl:when> 
     1043          <xsl:otherwise> 
     1044            <td class="unclaimed">unclaimed</td> 
     1045          </xsl:otherwise> 
     1046        </xsl:choose> 
     1047      </xsl:if> 
    10141048      <td class="date"> 
    10151049        <xsl:value-of select="start/shortdate"/> 
     
    26462680            </xsl:otherwise> 
    26472681          </xsl:choose> 
     2682          <span class="claimButtons"> 
     2683            <xsl:choose> 
     2684              <xsl:when test="form/xproperties/X-BEDEWORK-SUBMISSION-CLAIMANT/values/text = /bedework/userInfo/group"> 
     2685                <input type="submit" name="updateSubmitEvent" value="Release Event" onclick="releasePendingEvent();"/> 
     2686              </xsl:when> 
     2687              <xsl:otherwise> 
     2688                <input type="submit" name="updateSubmitEvent" value="Claim Event"> 
     2689                  <xsl:attribute name="onclick">claimPendingEvent('<xsl:value-of select="/bedework/userInfo/group"/>','<xsl:value-of select="/bedework/userInfo/currentUser'"/>');</xsl:attribute> 
     2690                </input> 
     2691              </xsl:otherwise> 
     2692            </xsl:choose> 
     2693          </span> 
    26482694        </xsl:when> 
    26492695        <xsl:otherwise> 
  • trunk/deployment/webadmin/webapp/resources/resources/bedeworkEventForm.js

    r2169 r2170  
    376376  // commit all xproperties back to the form 
    377377  bwXProps.generate(formObj); 
     378} 
     379function claimPendingEvent(group,user) { 
     380  bwXProps.update(bwXPropertySubmissionClaimant,[[bwXParamClaimantUser,user]],group,true); 
     381} 
     382function releasePendingEvent() { 
     383  bwXProps.remove(bwXPropertySubmissionClaimant); 
    378384} 
    379385function swapAllDayEvent(obj) { 
  • trunk/deployment/websubmit/webapp/resources/demoskins/default/default/default.xsl

    r2160 r2170  
    152152    <title>Bedework: Submit a Public Event</title> 
    153153    <meta name="robots" content="noindex,nofollow"/> 
    154     <meta content="text/html;charset=utf-8" http-equiv="Content-Type" /> 
     154    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/> 
    155155    <link rel="stylesheet" href="{$resourcesRoot}/default/default/default.css"/> 
    156156    <link rel="icon" type="image/ico" href="{$resourcesRoot}/resources/bedework.ico" /> 
     
    12631263        <!-- hide the root calendar. --> 
    12641264        <xsl:choose> 
     1265          <xsl:when test="calType = '7' or calType = '8'"> 
     1266            <!-- we've hit an unresolvable alias; stop descending --> 
     1267            <input type="checkbox" name="forDiplayOnly" disabled="disabled"/> 
     1268            <em><xsl:value-of select="name"/>?</em> 
     1269          </xsl:when> 
    12651270          <xsl:when test="calType = '0'"> 
    12661271            <!-- no direct selecting of folders or folder aliases: we only want users to select the 
    12671272                 underlying calendar aliases --> 
    1268             <!--img src="{$resourcesRoot}/resources/catIcon.gif" width="13" height="13" alt="folder" class="folderForAliasTree" border="0"/--> 
    1269             <input type="checkbox" name="forDiplayOnly" disabled="disabled"/> 
     1273            <img src="{$resourcesRoot}/resources/catIcon.gif" width="13" height="13" alt="folder" class="folderForAliasTree" border="0"/> 
    12701274            <xsl:value-of select="name"/> 
    12711275          </xsl:when> 
     
    12751279              <xsl:if test="path = /bedework/formElements/form/xproperties//X-BEDEWORK-ALIAS/values/text"><xsl:attribute name="checked"><xsl:value-of select="checked"/></xsl:attribute></xsl:if> 
    12761280            </input> 
    1277             <xsl:value-of select="name"/> 
     1281            <xsl:choose> 
     1282              <xsl:when test="path = /bedework/formElements/form/xproperties//X-BEDEWORK-ALIAS/values/text"> 
     1283                <strong><xsl:value-of select="name"/></strong> 
     1284              </xsl:when> 
     1285              <xsl:otherwise> 
     1286                <xsl:value-of select="name"/> 
     1287              </xsl:otherwise> 
     1288            </xsl:choose> 
    12781289          </xsl:otherwise> 
    12791290        </xsl:choose>