Changeset 1176

Show
Ignore:
Timestamp:
12/20/06 22:35:30
Author:
johnsa
Message:

personal client:

- simplify edit/annotate/link event links
- complete (mostly) unfinished access control

form in scheduling preferences

public client: correct addEventRef link

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/default.xsl

    r1175 r1176  
    646646            <xsl:variable name="guid" select="guid"/> 
    647647            <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    648             <a href="{$privateCal}/addEventRef.do?subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="Add event to MyCalendar" target="myCalendar"> 
     648            <a href="{$privateCal}/event/addEventRef.do?subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="Add event to MyCalendar" target="myCalendar"> 
    649649              <img class="addref" src="{$resourcesRoot}/images/add2mycal-icon.gif" width="20" height="26" border="0" alt="Add event to MyCalendar"/> 
    650650            add to my calendar</a> 
     
    908908                <td class="icons"> 
    909909                  <variable name="confId" select="/bedework/confirmationid"/> 
    910                   <a href="{$privateCal}/addEventRef.do?subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="Add event to MyCalendar" target="myCalendar"> 
     910                  <a href="{$privateCal}/event/addEventRef.do?subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="Add event to MyCalendar" target="myCalendar"> 
    911911                    <img class="addref" src="{$resourcesRoot}/images/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="Add event to MyCalendar"/> 
    912912                  </a> 
  • trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r1175 r1176  
    335335                  /bedework/page='modPrefs' or 
    336336                  /bedework/page='calendarListForExport' or 
    337                   /bedework/page='attendeeRespond'"> 
     337                  /bedework/page='attendeeRespond' or 
     338                  /bedework/page='modSchedulingPrefs'"> 
    338339      <script type="text/javascript" src="{$resourcesRoot}/resources/includes.js"></script> 
    339340    </xsl:if> 
     
    985986    <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    986987    <xsl:if test="currentAccess/current-user-privilege-set/privilege/write-content"> 
    987       <xsl:variable name="editTitle"> 
    988         <xsl:choose> 
    989           <xsl:when test="isAnnotation">Annotate</xsl:when> 
    990           <xsl:otherwise>Edit</xsl:otherwise> 
    991         </xsl:choose> 
    992       </xsl:variable> 
    993988      <xsl:choose> 
    994989        <xsl:when test="recurring='true'"> 
    995           <xsl:value-of select="$editTitle"/>
    996           <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="{$editTitle} master (recurring event)">master</a>, 
    997           <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="{$editTitle} instance (recurring event)">instance</a> 
     990          Edit
     991          <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="edit master (recurring event)">master</a>, 
     992          <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="edit instance (recurring event)">instance</a> 
    998993          <br/> 
    999994        </xsl:when> 
    1000995        <xsl:otherwise> 
    1001           <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="{$editTitle} event"> 
    1002             <xsl:value-of select="$editTitle"/> 
     996          <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="edit event"> 
     997            Edit 
    1003998          </a> 
    1004999          | 
     
    10061001      </xsl:choose> 
    10071002    </xsl:if> 
    1008     <xsl:choose> 
    1009       <xsl:when test="recurring='true'"> 
    1010         Link: 
    1011         <a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="add master event reference to a calendar">master</a>, 
    1012         <a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="add event reference to a calendar">instance</a> 
    1013         <br/> 
    1014       </xsl:when> 
    1015       <xsl:otherwise> 
    1016         <a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="add event reference to a calendar"> 
    1017           Link 
    1018         </a> 
    1019         | 
    1020       </xsl:otherwise> 
    1021     </xsl:choose> 
     1003    <xsl:if test="not(currentAccess/current-user-privilege-set/privilege/write-content)"> 
     1004      <xsl:choose> 
     1005        <xsl:when test="recurring='true'"> 
     1006          Link: 
     1007          <a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="add master event reference to a calendar">master</a>, 
     1008          <a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="add event reference to a calendar">instance</a> 
     1009          <br/> 
     1010        </xsl:when> 
     1011        <xsl:otherwise> 
     1012          <a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="add event reference to a calendar"> 
     1013            Link 
     1014          </a> 
     1015          | 
     1016        </xsl:otherwise> 
     1017      </xsl:choose> 
     1018    </xsl:if> 
    10221019    <xsl:if test="subscription and owner != /bedework/userid"> 
    10231020      <xsl:variable name="subname" select="subscription/name"/> 
     
    13291326            </a> 
    13301327            <xsl:if test="currentAccess/current-user-privilege-set/privilege/write-content"> 
    1331               <xsl:variable name="editTitle"> 
    1332                 <xsl:choose> 
    1333                   <xsl:when test="isAnnotation">Annotate</xsl:when> 
    1334                   <xsl:otherwise>Edit</xsl:otherwise> 
    1335                 </xsl:choose> 
    1336               </xsl:variable> 
    1337              | 
     1328              | 
    13381329              <xsl:choose> 
    13391330                <xsl:when test="recurring='true'"> 
    13401331                  <img src="{$resourcesRoot}/resources/std-ical_iconEditDkGray.gif" width="12" height="16" border="0" alt="edit master"/> 
    1341                   <xsl:value-of select="$editTitle"/>
    1342                   <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="{$editTitle} master (recurring event)">master</a>,<a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="{$editTitle} instance (recurring event)">instance</a> 
     1332                  Edit
     1333                  <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="edit master (recurring event)">master</a>,<a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="edit instance (recurring event)">instance</a> 
    13431334                </xsl:when> 
    13441335                <xsl:otherwise> 
    1345                   <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="{$editTitle} event"> 
    1346                     <img src="{$resourcesRoot}/resources/std-ical_iconEditDkGray.gif" width="12" height="16" border="0" alt="{$editTitle}"/> 
    1347                     <xsl:value-of select="$editTitle"/> 
     1336                  <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="edit event"> 
     1337                    <img src="{$resourcesRoot}/resources/std-ical_iconEditDkGray.gif" width="12" height="16" border="0" alt="edit"/> 
     1338                    Edit 
    13481339                  </a> 
    13491340                </xsl:otherwise> 
    13501341              </xsl:choose> 
    13511342            </xsl:if> 
     1343            <xsl:if test="not(currentAccess/current-user-privilege-set/privilege/write-content)"> 
    13521344              | 
    1353             <xsl:choose> 
    1354               <xsl:when test="recurring='true'"> 
    1355                 <img src="{$resourcesRoot}/resources/std-ical_iconLinkDkGray.gif" width="12" height="16" border="0" alt="add event reference"/> 
    1356                 Link: 
    1357                 <a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="add master event reference to a calendar">master</a>,<a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="add event reference to a calendar">instance</a> 
    1358               </xsl:when> 
    1359               <xsl:otherwise> 
    1360                 <a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="add event reference to a calendar"> 
     1345              <xsl:choose> 
     1346                <xsl:when test="recurring='true'"> 
    13611347                  <img src="{$resourcesRoot}/resources/std-ical_iconLinkDkGray.gif" width="12" height="16" border="0" alt="add event reference"/> 
    1362                   Link 
    1363                 </a> 
    1364               </xsl:otherwise> 
    1365             </xsl:choose> 
     1348                  Link: 
     1349                  <a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="add master event reference to a calendar">master</a>,<a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="add event reference to a calendar">instance</a> 
     1350                </xsl:when> 
     1351                <xsl:otherwise> 
     1352                  <a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="add event reference to a calendar"> 
     1353                    <img src="{$resourcesRoot}/resources/std-ical_iconLinkDkGray.gif" width="12" height="16" border="0" alt="add event reference"/> 
     1354                    Link 
     1355                  </a> 
     1356                </xsl:otherwise> 
     1357              </xsl:choose> 
     1358            </xsl:if> 
    13661359            <xsl:if test="subscription and owner != /bedework/userid"> 
    13671360              | 
     
    58875880      <table class="common" cellspacing="0"> 
    58885881        <tr> 
    5889           <th>Can send me scheduling requests:</th> 
     5882          <th class="leftBorder">Can send me scheduling requests:</th> 
    58905883          <th class="leftBorder">Can schedule on my behalf:</th> 
    58915884        </tr> 
    58925885        <tr> 
    5893           <td class="padMe"> 
    5894             <form name="eventForm" method="post" action="{$prefs-setAccess}"> 
     5886          <td class="leftBorder padMe"> 
     5887            <form name="prefsSetAccess1" method="post" action="{$prefs-setAccess}" onsubmit="setScheduleHow(this)"> 
    58955888              <input type="hidden" name="what" value="in"/> 
    58965889              <p> 
     
    59115904              <dl> 
    59125905                <dt> 
    5913                   <input type="checkbox" name="howSetter" value="S" checked="checked" onchange="setScheduleHow(this)"/>all scheduling 
     5906                  <input type="checkbox" name="howSetter" value="S" checked="checked" onchange="toggleScheduleHow(this.form,this)"/>all scheduling 
    59145907                </dt> 
    59155908                <dd> 
     
    59305923          </td> 
    59315924          <td class="leftBorder padMe"> 
    5932             <form name="eventForm" method="post" action="{$prefs-setAccess}"> 
     5925            <form name="prefsSetAccess2" method="post" action="{$prefs-setAccess}" onsubmit="setScheduleHow(this)"> 
    59335926              <input type="hidden" name="what" value="out"/> 
    59345927              <p> 
     
    59495942              <dl> 
    59505943                <dt> 
    5951                   <input type="checkbox" name="howSetter" value="S" checked="checked" onchange="setScheduleHow(this)"/>all scheduling 
     5944                  <input type="checkbox" name="howSetter" value="S" checked="checked" onchange="toggleScheduleHow(this.form,this)"/>all scheduling 
    59525945                </dt> 
    59535946                <dd> 
  • trunk/deployment/webuser/webapp/resources/demoskins/resources/includes.js

    r1160 r1176  
    1 var debug = false; // very basic debugging for now 
     1var debug = true; // very basic debugging for now 
    22 
    33function changeClass(id, newClass) { 
     
    349349  } 
    350350} 
    351  
    352  
    353351// launch the calSelect pop-up window for selecting a calendar when creating, 
    354352// editing, and importing events 
     
    408406} 
    409407 
    410 function setScheduleHow(multibox) { 
    411   var accessString = ""; 
    412   for (i=0; i<multibox.length; i++) { 
    413     alert(mulitbox[i].value); 
    414   } 
    415 
    416  
     408function setScheduleHow(formObj) { 
     409  var access = new Array(); 
     410  // gather up the access characters 
     411  access = collectRecurChkBoxVals(access, formObj.howSetter); 
     412  formObj.how.value = access.join(''); 
     413  if (debug) { 
     414    alert(formObj.how.value); 
     415  } 
     416
     417function toggleScheduleHow(formObj,chkBox) { 
     418  if (chkBox.checked == false) { 
     419    // we start on the second checkbox element 
     420    for (i = 1; i < formObj.howSetter.length; i++) { 
     421      formObj.howSetter[i].disabled = false; 
     422    } 
     423  } else { 
     424    for (i = 1; i < formObj.howSetter.length; i++) { 
     425      formObj.howSetter[i].checked = true; 
     426      formObj.howSetter[i].disabled = true; 
     427    } 
     428  } 
     429
    417430function swapScheduleDisplay(val) { 
    418431  if (val == "show") {