Changeset 1284

Show
Ignore:
Timestamp:
02/12/07 01:45:17
Author:
johnsa
Message:

user client:

correctly display all access rights
added a "basic" access rights form
added a toggle to go between basic and advanced

access rights form

only show scheduling access on inbox and outbox
add auth and other to freebusy access form

Files:

Legend:

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

    r1262 r1284  
    15011501  padding: 4px; 
    15021502} 
     1503#shareFormTable #accessRightsToggle { 
     1504  float: right; 
     1505  font-weight: normal; 
     1506  font-size: 0.8em; 
     1507} 
    15031508#shareFormTable .whoTypes { 
    15041509  margin: 1em; 
     
    15451550  text-align: left; 
    15461551} 
    1547 /* keep the howList items for optional use */ 
    15481552#howList { 
    15491553  margin: 0; 
  • trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r1283 r1284  
    351351                  /bedework/page='calendarListForExport' or 
    352352                  /bedework/page='attendeeRespond' or 
    353                   /bedework/page='modSchedulingPrefs'"> 
     353                  /bedework/page='modSchedulingPrefs' or 
     354                  /bedework/page='modCalendar' or 
     355                  /bedework/page='eventAccess'"> 
    354356      <script type="text/javascript" src="{$resourcesRoot}/resources/bedework.js">&#160;</script> 
    355357    </xsl:if> 
     
    34663468          <input type="text" name="who" size="20"/> 
    34673469          <input type="radio" value="user" name="whoType" checked="checked"/> user 
    3468           <input type="radio" value="group" name="whoType"/> group<br/> 
     3470          <input type="radio" value="group" name="whoType"/> group 
     3471        </p> 
     3472        <p>OR</p> 
     3473        <p> 
     3474          <input type="radio" value="auth" name="whoType"/> authenticated<br/> 
     3475          <input type="radio" value="other" name="whoType"/> other users 
     3476        </p> 
     3477        <p> 
    34693478          <em>note: this will set a user or group's access to 
    34703479              "read-free-busy" and any 
     
    63776386        </td> 
    63786387        <td> 
    6379           <h5>Rights:</h5> 
     6388          <h5> 
     6389            <span id="accessRightsToggle"> 
     6390              <xsl:choose> 
     6391                <xsl:when test="/bedework/appvar[key='accessRightsToggle']/value='advanced'"> 
     6392                  <input type="radio" name="setappvar" value="accessRightsToggle(basic)" onclick="changeClass('howList','visible');changeClass('howTable','invisible');"/>basic 
     6393                  <input type="radio" name="setappvar" value="accessRightsToggle(advanced)" checked="checked" onclick="changeClass('howList','invisible');changeClass('howTable','visible');"/>advanced 
     6394                </xsl:when> 
     6395                <xsl:otherwise> 
     6396                  <input type="radio" name="setappvar" value="accessRightsToggle(basic)" checked="checked" onclick="changeClass('howList','visible');changeClass('howTable','invisible');"/>basic 
     6397                  <input type="radio" name="setappvar" value="accessRightsToggle(advanced)" onclick="changeClass('howList','invisible');changeClass('howTable','visible');"/>advanced 
     6398                </xsl:otherwise> 
     6399              </xsl:choose> 
     6400            </span> 
     6401            Rights: 
     6402          </h5> 
    63806403          <input type="hidden" name="how" value=""/> 
     6404          <!-- Advanced Access Rights: --> 
    63816405          <!-- the "how" field is set by iterating over the howItems below --> 
    6382           <table id="howTable" cellspacing="0"> 
     6406          <table id="howTable" class="invisible" cellspacing="0"> 
     6407            <xsl:if test="/bedework/appvar[key='accessRightsToggle']/value='advanced'"> 
     6408              <xsl:attribute name="class">visible</xsl:attribute> 
     6409            </xsl:if> 
    63836410            <tr> 
    63846411              <th>access type</th> 
     
    64966523              </td> 
    64976524            </tr> 
    6498             <!--<xsl:if test="$type = 'inbox' or $type = 'outbox'">--
     6525            <xsl:if test="$type = 'inbox' or $type = 'outbox'"
    64996526              <tr> 
    65006527                <td class="level4"> 
     
    65416568              </td> 
    65426569              </tr> 
    6543             <!--</xsl:if>--
     6570            </xsl:if
    65446571            <tr> 
    65456572              <td class="level3"> 
     
    65636590            </tr>--> 
    65646591          </table> 
     6592          <!-- Simple Access Rights: --> 
     6593          <!-- the "how" field is set by getting the selected basicHowItem --> 
     6594          <ul id="howList"> 
     6595            <xsl:if test="/bedework/appvar[key='accessRightsToggle']/value='advanced'"> 
     6596              <xsl:attribute name="class">invisible</xsl:attribute> 
     6597            </xsl:if> 
     6598            <li> 
     6599              <input type="radio" value="A" name="basicHowItem"/>All 
     6600            </li> 
     6601            <li> 
     6602              <input type="radio" value="R" name="basicHowItem" checked="checked"/>Read only 
     6603            </li> 
     6604          </ul> 
    65656605 
    65666606          <!-- below is a simplified listing using radio buttons only; keep for 
    6567                those who would like a simpler interface (though 
    6568                it is currently less functional; e.g. there is no "deny" setting 
    6569                in the following list) --> 
     6607               those who would like something inbetween the advanced and simple 
     6608               interfaces --> 
    65706609          <!-- 
    65716610          <ul id="howList"> 
     
    66756714          <td> 
    66766715            <xsl:if test="grant"> 
    6677               grant: <xsl:value-of select="name(grant/*)"/><br/> 
     6716              grant: 
     6717              <xsl:for-each select="grant/*"> 
     6718                <xsl:value-of select="name(.)"/> 
     6719                <xsl:if test="position() != last()">, </xsl:if> 
     6720              </xsl:for-each><br/> 
    66786721            </xsl:if> 
    66796722            <xsl:if test="deny"> 
    6680               deny: <xsl:value-of select="name(deny/*)"/> 
     6723              deny: 
     6724              <xsl:for-each select="deny/*"> 
     6725                <xsl:value-of select="name(.)"/> 
     6726                <xsl:if test="position() != last()">, </xsl:if> 
     6727              </xsl:for-each> 
    66816728            </xsl:if> 
    66826729          </td> 
  • trunk/deployment/webuser/webapp/resources/demoskins/resources/bedeworkAccess.js

    r1263 r1284  
    170170} 
    171171// Gather up the how values on access form submission and set the how field. 
    172 // Each howItem (checkbox) has a corresponding allow/deny flag (radio button) 
    173 // named after the howItem's value (e.g. "A","R","F","N", etc). 
    174 // The allow/deny flag contains the final values to be returned with 
    175 // the "-" switch if we set the value to deny (e.g. "A" or "-A", "R" or "-R"). 
     172// If in "basic" mode: 
     173//   Set the value of how to the value of the basicHowItem radio button. 
     174// If in "advanced" mode: 
     175//   Each howItem (checkbox) has a corresponding allow/deny flag (radio button) 
     176//   named after the howItem's value (e.g. "A","R","F","N", etc). 
     177//   The allow/deny flag contains the final values to be returned with 
     178//   the "-" switch if we set the value to deny (e.g. "A" or "-A", "R" or "-R"). 
    176179function setAccessHow(formObj) { 
    177180  var howString = ""; 
    178   for (i = 0; i < formObj.howItem.length; i++) { 
    179     if (formObj.howItem[i].checked == true) { 
    180       var howItemVal = formObj.howItem[i].value; // get the howItem value and 
    181       for (j = 0; j < formObj[howItemVal].length; j++) { // look up the value from the corresponding allow/deny flag 
    182         if (formObj[howItemVal][j].checked == true) { 
    183           howString += formObj[howItemVal][j].value; 
     181  if (formObj.setappvar[0].checked == true) { // "basic" mode is selected 
     182    for (i = 0; i < formObj.basicHowItem.length; i++) { 
     183      if (formObj.basicHowItem[i].checked == true) { 
     184        howString = formObj.basicHowItem[i].value; 
     185      } 
     186    } 
     187  } else { // "advanced" mode is selected 
     188    for (i = 0; i < formObj.howItem.length; i++) { 
     189      if (formObj.howItem[i].checked == true) { 
     190        var howItemVal = formObj.howItem[i].value; // get the howItem value and 
     191        for (j = 0; j < formObj[howItemVal].length; j++) { // look up the value from the corresponding allow/deny flag 
     192          if (formObj[howItemVal][j].checked == true) { 
     193            howString += formObj[howItemVal][j].value; 
     194          } 
    184195        } 
    185196      }