Changeset 2171
- Timestamp:
- 05/13/09 17:09:53
- Files:
-
- trunk/deployment/resources/javascript/bedework/bedeworkXProperties.js (modified) (3 diffs)
- trunk/deployment/webadmin/webapp/resources/default/default/default.xsl (modified) (1 diff)
- trunk/deployment/webadmin/webapp/resources/resources/bedeworkEventForm.js (modified) (2 diffs)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/default.xsl (modified) (2 diffs)
- trunk/deployment/webpublic/webapp/resources/demoskins/SoEDepartmental/default/default/default.xsl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/deployment/resources/javascript/bedework/bedeworkXProperties.js
r2170 r2171 31 31 // ======================================================================== 32 32 33 var bwXPropertyAlias = "X-BEDEWORK-ALIAS"; 33 34 var bwXPropertyImage = "X-BEDEWORK-IMAGE"; 34 35 var bwXPropertySubmittedBy = "X-BEDEWORK-SUBMITTEDBY"; … … 133 134 } 134 135 136 this.removeByValue = function(name, value) { 137 index = this.getIndexByValue(name, value); 138 if (index > -1) { 139 xproperties.splice(index,1); 140 } 141 } 142 135 143 this.getIndex = function(name) { 136 144 for (var i = 0; i < xproperties.length; i++) { … … 138 146 if (curXprop.name == name) { 139 147 return i; 148 } 149 } 150 return -1; 151 } 152 153 this.getIndexByValue = function(name,value) { 154 for (var i = 0; i < xproperties.length; i++) { 155 var curXprop = xproperties[i]; 156 if (curXprop.name == name) { 157 if (curXprop.value == value) { 158 return i; 159 } 140 160 } 141 161 } trunk/deployment/webadmin/webapp/resources/default/default/default.xsl
r2170 r2171 2595 2595 </xsl:when> 2596 2596 <xsl:otherwise> 2597 <input type="checkbox" name="alias"> 2598 <xsl:attribute name="value"><xsl:value-of select="path"/></xsl:attribute> 2597 <xsl:variable name="virtualPath">/user<xsl:for-each select="ancestor-or-self::calendar/name">/<xsl:value-of select="."/></xsl:for-each></xsl:variable> 2598 <input type="checkbox" name="alias" onclick="toggleBedeworkXProperty('X-BEDEWORK-ALIAS','{$virtualPath}',this.checked)"> 2599 <xsl:attribute name="value"><xsl:value-of select="$virtualPath"/></xsl:attribute> 2599 2600 <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> 2600 2601 </input> trunk/deployment/webadmin/webapp/resources/resources/bedeworkEventForm.js
r2170 r2171 376 376 // commit all xproperties back to the form 377 377 bwXProps.generate(formObj); 378 } 379 function toggleBedeworkXProperty(xprop,value,checked) { 380 if (!checked) { 381 bwXProps.removeByValue(xprop, value); 382 } else { 383 bwXProps.update(bwXPropertyAlias,[],value,false); 384 } 378 385 } 379 386 function claimPendingEvent(group,user) { … … 725 732 sntext.value = "Your event has been approved and is now published.\n\nEVENT DETAILS\n-------------\n\nTitle: " + eventTitle + "\nURL: " + eventUrlPrefix + "&" + publishingCal; 726 733 } 734 727 735 function doRejectEvent(reason,eventTitle) { 728 736 trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/default.xsl
r2147 r2171 838 838 <xsl:for-each select="xproperties/X-BEDEWORK-ALIAS"> 839 839 <xsl:variable name="calUrl" select="values/text"/> 840 <a href="{$setSelection}& calUrl={$calUrl}&setappvar=curCollection({$calUrl})">840 <a href="{$setSelection}&virtualPath={$calUrl}&setappvar=curCollection({$calUrl})"> 841 841 <xsl:call-template name="substring-afterLastInstanceOf"> 842 842 <xsl:with-param name="string" select="values/text"/> … … 1451 1451 </xsl:choose> 1452 1452 </xsl:variable> 1453 <xsl:variable name="url" select="encodedPath"/>1454 1453 <xsl:variable name="virtualPath"><xsl:call-template name="url-encode"><xsl:with-param name="str">/user<xsl:for-each select="ancestor-or-self::calendar/name">/<xsl:value-of select="."/></xsl:for-each></xsl:with-param></xsl:call-template></xsl:variable> 1455 1454 <li class="{$itemClass}"> 1456 1455 <xsl:variable name="calPath" select="path"/> 1457 <a href="{$setSelection}& calUrl={$url}&virtualPath={$virtualPath}&setappvar=curCollection({$calPath})" title="view calendar"><xsl:value-of select="name"/></a>1456 <a href="{$setSelection}&virtualPath={$virtualPath}&setappvar=curCollection({$calPath})" title="view calendar"><xsl:value-of select="name"/></a> 1458 1457 <xsl:variable name="calPath" select="path"/> 1459 1458 <span class="exportCalLink"> trunk/deployment/webpublic/webapp/resources/demoskins/SoEDepartmental/default/default/default.xsl
r2147 r2171 837 837 <xsl:for-each select="xproperties/X-BEDEWORK-ALIAS"> 838 838 <xsl:variable name="calUrl" select="values/text"/> 839 <a href="{$setSelection}& calUrl={$calUrl}&setappvar=curCollection({$calUrl})">839 <a href="{$setSelection}&virtualPath={$calUrl}&setappvar=curCollection({$calUrl})"> 840 840 <xsl:call-template name="substring-afterLastInstanceOf"> 841 841 <xsl:with-param name="string" select="values/text"/> … … 1450 1450 </xsl:choose> 1451 1451 </xsl:variable> 1452 <xsl:variable name="url" select="encodedPath"/>1453 1452 <xsl:variable name="virtualPath"><xsl:call-template name="url-encode"><xsl:with-param name="str">/user<xsl:for-each select="ancestor-or-self::calendar/name">/<xsl:value-of select="."/></xsl:for-each></xsl:with-param></xsl:call-template></xsl:variable> 1454 1453 <li class="{$itemClass}"> 1455 1454 <xsl:variable name="calPath" select="path"/> 1456 <a href="{$setSelection}& calUrl={$url}&virtualPath={$virtualPath}&setappvar=curCollection({$calPath})" title="view calendar"><xsl:value-of select="name"/></a>1455 <a href="{$setSelection}&virtualPath={$virtualPath}&setappvar=curCollection({$calPath})" title="view calendar"><xsl:value-of select="name"/></a> 1457 1456 <xsl:variable name="calPath" select="path"/> 1458 1457 <span class="exportCalLink"> 1459 <a href="{$calendar-fetchForExport}& calPath={$calPath}&virtualPath={$virtualPath}" title="export calendar as iCal">1458 <a href="{$calendar-fetchForExport}&virtualPath={$virtualPath}" title="export calendar as iCal"> 1460 1459 <img src="{$resourcesRoot}/images/calIconExport-sm.gif" width="13" height="13" alt="export calendar" border="0"/> 1461 1460 </a>
