Changeset 2074
- Timestamp:
- 02/24/09 17:34:52
- Files:
-
- trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.css (modified) (1 diff)
- trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl (modified) (14 diffs)
- trunk/deployment/webuser/webapp/resources/demoskins/resources/bedeworkAccess.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.css
r2050 r2074 1768 1768 #bedework #sharingBox { 1769 1769 margin: 0; 1770 border-top: 1px solid #333; 1771 padding: 1em 1em 2em 1em; 1770 padding: 1em 0 0 0; 1772 1771 } 1773 1772 #bedework #bwEventTab-Access #sharingBox { 1774 border-top: none; 1773 margin: 0; 1774 padding: 1em; 1775 1775 } 1776 1776 #bedework #sharingBox h3, trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl
r2061 r2074 387 387 var startTzid = "<xsl:value-of select="/bedework/formElements/form/start/tzid"/>"; 388 388 var endTzid = "<xsl:value-of select="/bedework/formElements/form/end/dateTime/tzid"/>"; 389 var resourcesRoot = "<xsl:value-of select="$resourcesRoot"/>"; 389 390 </script> 391 390 392 <!-- note: the non-breaking spaces in the script bodies below are to avoid 391 393 losing the script closing tags (which avoids browser problems) --> … … 400 402 <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkPrefs.js"> </script> 401 403 </xsl:if> 402 <xsl:if test="/bedework/page='modCalendar' or 403 /bedework/page='eventAccess'"> 404 <xsl:if test="/bedework/page='modCalendar'"> 404 405 <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkAccess.js"> </script> 406 <!-- initialize calendar acls, if present --> 407 <xsl:if test="/bedework/currentCalendar/acl/ace"> 408 <script type="text/javascript"> 409 <xsl:apply-templates select="/bedework/currentCalendar/acl/ace" mode="initJS"/> 410 </script> 411 </xsl:if> 405 412 </xsl:if> 406 413 <xsl:if test="/bedework/page='attendees'"> … … 442 449 <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkXProperties.js"> </script> 443 450 <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkAccess.js"> </script> 444 </xsl:if> 445 <xsl:if test="/bedework/editableAccess/access/acl/ace"> 446 <script type="text/javascript"> 447 <xsl:apply-templates select="/bedework/editableAccess/access/acl/ace" mode="initJS"/> 448 </script> 451 <!-- initialize event acls, if present --> 452 <xsl:if test="/bedework/editableAccess/access/acl/ace"> 453 <script type="text/javascript"> 454 <xsl:apply-templates select="/bedework/editableAccess/access/acl/ace" mode="initJS"/> 455 </script> 456 </xsl:if> 449 457 </xsl:if> 450 458 <xsl:if test="/bedework/page='editEvent'"> … … 3515 3523 <th>Access</th> 3516 3524 <th>Inherited from</th> 3517 <t d></td>3525 <th></th> 3518 3526 </tr> 3519 3527 </thead> … … 4837 4845 </xsl:otherwise> 4838 4846 </xsl:choose> 4847 4848 <table border="0" id="submitTable"> 4849 <tr> 4850 <td> 4851 <xsl:choose> 4852 <xsl:when test="isSubscription='true'"> 4853 <input type="submit" name="updateCalendar" value="Update Subscription"/> 4854 </xsl:when> 4855 <xsl:when test="calType = '0'"> 4856 <input type="submit" name="updateCalendar" value="Update Folder"/> 4857 </xsl:when> 4858 <xsl:otherwise> 4859 <input type="submit" name="updateCalendar" value="Update Calendar"/> 4860 </xsl:otherwise> 4861 </xsl:choose> 4862 <input type="submit" name="cancelled" value="cancel"/> 4863 </td> 4864 <td align="right"> 4865 <xsl:choose> 4866 <xsl:when test="isSubscription='true'"> 4867 <input type="submit" name="delete" value="Delete Subscription"/> 4868 </xsl:when> 4869 <xsl:when test="calType = '0'"> 4870 <input type="submit" name="delete" value="Delete Folder"/> 4871 </xsl:when> 4872 <xsl:otherwise> 4873 <input type="submit" name="delete" value="Delete Calendar"/> 4874 </xsl:otherwise> 4875 </xsl:choose> 4876 </td> 4877 </tr> 4878 </table> 4879 4839 4880 <table class="common"> 4840 4881 <tr> … … 4917 4958 </table> 4918 4959 4960 <div id="sharingBox"> 4961 <xsl:choose> 4962 <xsl:when test="acl"> 4963 <xsl:apply-templates select="acl" mode="currentAccess"> 4964 <xsl:with-param name="action" select="$calendar-setAccess"/> 4965 <xsl:with-param name="calPathEncoded" select="$calPathEncoded"/> 4966 <xsl:with-param name="method">2</xsl:with-param> 4967 </xsl:apply-templates> 4968 </xsl:when> 4969 <xsl:otherwise> 4970 <h3>Current Access:</h3> 4971 <table class="common scheduling" id="bwCurrentAccess"> 4972 <thead> 4973 <tr> 4974 <th>Entry</th> 4975 <th>Access</th> 4976 <th>Inherited from</th> 4977 <th></th> 4978 </tr> 4979 </thead> 4980 <tbody> 4981 <tr id="bwEventNoAcl"> 4982 <td colspan="4">no access defined</td> 4983 </tr> 4984 </tbody> 4985 </table> 4986 </xsl:otherwise> 4987 </xsl:choose> 4988 <xsl:call-template name="entityAccessForm"> 4989 <xsl:with-param name="method">2</xsl:with-param> 4990 </xsl:call-template> 4991 </div> 4992 4993 <div class="note"> 4994 <p><strong>Note:</strong> If you grant write access to another user, and you wish 4995 to see events added by that user in your calendar, <strong>you must explicitly 4996 grant yourself access to the same calendar.</strong> Enter your RCS UserID as 4997 a user in the "Who" box with "All" set in the "Rights" box. 4998 </p> 4999 <p> 5000 This is standard access control; the reason you will not see the other 5001 user's events without doing this is that the default access is grant:all to 5002 "owner" - and you don't own the other user's events. 5003 </p> 5004 </div> 5005 4919 5006 <table border="0" id="submitTable"> 4920 5007 <tr> … … 4949 5036 </table> 4950 5037 </form> 4951 <div id="sharingBox"> 5038 <!-- Method 1 access setting is now deprecated. 5039 see the "entityAccessForm" template for more information --> 5040 <!-- div id="sharingBox"> 4952 5041 <xsl:apply-templates select="acl" mode="currentAccess"> 4953 5042 <xsl:with-param name="action" select="$calendar-setAccess"/> … … 4966 5055 </xsl:call-template> 4967 5056 </form> 4968 </div> 4969 <div class="note"> 4970 <p><strong>Note:</strong> If you grant write access to another user, and you wish 4971 to see events added by that user in your calendar, <strong>you must explicitly 4972 grant yourself access to the same calendar.</strong> Enter your RCS UserID as 4973 a user in the "Who" box with "All" set in the "Rights" box. 4974 </p> 4975 <p> 4976 This is standard access control; the reason you will not see the other 4977 user's events without doing this is that the default access is grant:all to 4978 "owner" - and you don't own the other user's events. 4979 </p> 4980 </div> 5057 </div --> 4981 5058 </xsl:template> 4982 5059 … … 7711 7788 <xsl:template name="entityAccessForm"> 7712 7789 <xsl:param name="type"/><!-- optional: currently used for inbox and outbox to conditionally display scheduling access --> 7713 <xsl:param name="method"> 1</xsl:param><!-- optional:7790 <xsl:param name="method">2</xsl:param><!-- optional: 7714 7791 there are two methods of setting access 7715 7792 - method 1, the older method, uses a single request/response per principal 7716 7793 - method 2 constructs a javascript object that commits the entire ACL 7717 7794 structure in a single request 7718 Both methods are currently supported. Method one is used for calendars, 7719 method two for setting event access. At some point we may move all access 7720 control setting to method two. --> 7795 Both methods are currently supported. Method two is now the default. --> 7721 7796 <xsl:param name="acl"/><!-- nodeset of entity acls used to initialize 7722 7797 javascript object. Required for method two. --> … … 7740 7815 <input type="radio" value="all" name="whoType"/> all users 7741 7816 </p> 7817 <xsl:choose> 7818 <xsl:when test="$method = '2'"> 7819 <input type="button" name="updateACLs" value="add entry" onclick="bwAcl.update(this.form)"/> 7820 </xsl:when> 7821 <xsl:otherwise> 7822 <input type="submit" name="submit" value="update access"/> 7823 </xsl:otherwise> 7824 </xsl:choose> 7742 7825 </div> 7743 7826 </td> … … 7962 8045 </li> 7963 8046 </ul> 7964 7965 <!-- below is a simplified listing using radio buttons only; keep for7966 those who would like something inbetween the advanced and simple7967 interfaces -->7968 <!--7969 <ul id="howList">7970 <li><input type="radio" value="A" name="how"/> <strong>All</strong> (read, write, delete)</li>7971 <li class="padTop">7972 <input type="radio" value="R" name="how" checked="checked"/> <strong>Read</strong> (content, access, freebusy)7973 </li>7974 <li>7975 <input type="radio" value="F" name="how"/> Read freebusy only7976 </li>7977 <li class="padTop">7978 <input type="radio" value="W" name="how"/> <strong>Write and delete</strong> (content, access, properties)7979 </li>7980 <li>7981 <input type="radio" value="c" name="how"/> Write content only7982 </li>7983 <li>7984 <input type="radio" value="u" name="how"/> Delete only7985 </li>7986 <li class="padTop">7987 <input type="radio" value="Rc" name="how"/> <strong>Read</strong> and <strong>Write content only</strong>7988 </li>7989 <li class="padTop">7990 <input type="radio" value="N" name="how"/> <strong>None</strong>7991 </li>7992 </ul> -->7993 8047 </td> 7994 8048 </tr> 7995 8049 </table> 7996 <xsl:choose>7997 <xsl:when test="$method = '2'">7998 <input type="button" name="updateACLs" value="update access" onclick="bwAcl.update(this.form)"/>7999 </xsl:when>8000 <xsl:otherwise>8001 <input type="submit" name="submit" value="Submit"/>8002 </xsl:otherwise>8003 </xsl:choose>8004 8050 </xsl:template> 8005 8051 … … 8010 8056 <xsl:param name="recurrenceId"/> <!-- optional (for entities) --> 8011 8057 <xsl:param name="what"/> <!-- optional (for scheduling only) --> 8012 <xsl:param name="method"> 1</xsl:param> <!-- which method of access control8058 <xsl:param name="method">2</xsl:param> <!-- which method of access control 8013 8059 are we using: 1 (one request per pricipal) or 2 (set all with 8014 8060 javascript and send entire ACL to server) --> … … 8020 8066 <th>Access</th> 8021 8067 <th>Inherited from</th> 8022 <t d></td>8068 <th></th> 8023 8069 </tr> 8024 8070 </thead> … … 8123 8169 <xsl:variable name="rowPos" select="position()-1"/> 8124 8170 <a href="javascript:bwAcl.deleteAce({$rowPos})" title="reset to default"> 8125 remove8171 <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="reset to default"/> 8126 8172 </a> 8127 8173 </xsl:when> trunk/deployment/webuser/webapp/resources/demoskins/resources/bedeworkAccess.js
r1607 r2074 52 52 var otherStr = "other"; 53 53 var grantStr = "grant"; 54 var denyStr = "deny" 54 55 var allStr = "all"; 55 56 56 57 var deleteStr = "remove"; 58 59 // note that resourcesRoot is passed in from the html head section defined in the xslt 60 var trashIcon = '<img src="' + resourcesRoot + '/resources/trashIcon.gif" width="13" height="13" border="0" alt="remove"/>'; 61 var userIcon = '<img src="' + resourcesRoot + '/resources/userIcon.gif" width="13" height="13" border="0" alt="user"/>'; 62 var groupIcon = '<img src="' + resourcesRoot + '/resources/groupIcon.gif" width="13" height="13" border="0" alt="group"/>'; 57 63 58 64 // How granted accesses appear … … 106 112 /* We shouldn't use the word local - it probably doesn't mean too much and it might actually be 107 113 inherited from something called /local for example */ 108 var inheritedStr = " Not inherited";114 var inheritedStr = "not inherited"; 109 115 110 116 // ************************** … … 325 331 this.format = function() { 326 332 if (whoType == "user") { 327 return who;333 return userIcon + " " + who; 328 334 } 329 335 330 336 if (whoType == "group") { 331 return who;337 return groupIcon + " " + who; 332 338 } 333 339 … … 337 343 338 344 if (whoType == "auth") { 339 return authenticatedStr;345 return groupIcon + " " + authenticatedStr; 340 346 } 341 347 342 348 if (whoType == "unauth") { 343 return unauthenticatedStr;349 return groupIcon + " " + unauthenticatedStr; 344 350 } 345 351 346 352 if (whoType == "owner") { 347 return ownerStr;353 return userIcon + " " + ownerStr; 348 354 } 349 355 350 356 if (whoType == "other") { 351 return otherStr;357 return groupIcon + " " + otherStr; 352 358 } 353 359 354 360 if (whoType == "all") { 355 return allStr;361 return groupIcon + " " + allStr; 356 362 } 357 363 … … 506 512 // aceI: index of the ace 507 513 this.toFormRow = function(row, aceI) { 508 row.insertCell(0).appendChild(document.createTextNode(this.principal.format())); 514 var td_0 = row.insertCell(0); 515 td_0.innerHTML = this.principal.format(); 509 516 row.insertCell(1).appendChild(document.createTextNode(this.formatHow())); 510 517 row.insertCell(2).appendChild(document.createTextNode(this.formatInherited())); 511 518 var td_3 = row.insertCell(3); 512 519 if (this.inherited == "") { 513 td_3.innerHTML = "<a href=\"javascript:bwAcl.deleteAce('" + aceI + "')\">" + deleteStr + "</a>";520 td_3.innerHTML = "<a href=\"javascript:bwAcl.deleteAce('" + aceI + "')\">" + trashIcon + " " + deleteStr + "</a>"; 514 521 } 515 522 }
