Changeset 2991
- Timestamp:
- 08/28/10 01:20:31
- Files:
-
- trunk/deployment/resources/javascript/jquery/colorpicker (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/colorpicker.css (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/colorpicker.js (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/Thumbs.db (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/blank.gif (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/colorpicker_background.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/colorpicker_hex.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/colorpicker_hsb_b.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/colorpicker_hsb_h.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/colorpicker_hsb_s.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/colorpicker_indic.gif (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/colorpicker_overlay.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/colorpicker_rgb_b.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/colorpicker_rgb_g.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/colorpicker_rgb_r.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/colorpicker_select.gif (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/colorpicker_submit.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/custom_background.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/custom_hex.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/custom_hsb_b.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/custom_hsb_h.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/custom_hsb_s.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/custom_indic.gif (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/custom_rgb_b.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/custom_rgb_g.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/custom_rgb_r.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/custom_submit.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/select.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/select2.png (added)
- trunk/deployment/resources/javascript/jquery/colorpicker/images/slider.png (added)
- trunk/deployment/webadmin/webapp/resources/default/default/strings.xsl (modified) (4 diffs)
- trunk/deployment/webadmin/webapp/resources/resources/bedework.js (modified) (2 diffs)
- trunk/deployment/webuser/webapp/resources/demoskins/default/strings.xsl (modified) (2 diffs)
- trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/calendars.xsl (modified) (6 diffs)
- trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/head.xsl (modified) (1 diff)
- trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/javascript/bedework.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/deployment/webadmin/webapp/resources/default/default/strings.xsl
r2863 r2991 453 453 <xsl:variable name="bwStr-CuCa-AddCalFileOrSub">Add Calendar, Folder, or Subscription</xsl:variable> 454 454 <xsl:variable name="bwStr-CuCa-NoteAccessSet">Note: Access may be set on a calendar after it is created.</xsl:variable> 455 <xsl:variable name="bwStr-CuCa-Name"> Name:</xsl:variable>456 <xsl:variable name="bwStr-CuCa-Summary"> Summary:</xsl:variable>455 <xsl:variable name="bwStr-CuCa-Name">System Name:</xsl:variable> 456 <xsl:variable name="bwStr-CuCa-Summary">Display Name:</xsl:variable> 457 457 <xsl:variable name="bwStr-CuCa-Description">Description:</xsl:variable> 458 458 <xsl:variable name="bwStr-CuCa-Filter">Filter:</xsl:variable> … … 502 502 <xsl:variable name="bwStr-CaLD-CalendarInfo">Calendar Information</xsl:variable> 503 503 <xsl:variable name="bwStr-CaLD-SelectItemFromCalendarTree">Select an item from the calendar tree on the left to view all information about that calendar or folder. The tree on the left represents the calendar heirarchy.</xsl:variable> 504 <xsl:variable name="bwStr-CaLD-Name"> Name:</xsl:variable>504 <xsl:variable name="bwStr-CaLD-Name">System Name:</xsl:variable> 505 505 <xsl:variable name="bwStr-CaLD-Path">Path:</xsl:variable> 506 <xsl:variable name="bwStr-CaLD-Summary"> Summary:</xsl:variable>506 <xsl:variable name="bwStr-CaLD-Summary">Display Name:</xsl:variable> 507 507 <xsl:variable name="bwStr-CaLD-Description">Description:</xsl:variable> 508 508 … … 530 530 <xsl:variable name="bwStr-CaMv-MoveCalendar">Move Calendar/Folder</xsl:variable> 531 531 <xsl:variable name="bwStr-CaMv-CurrentPath">Current Path:</xsl:variable> 532 <xsl:variable name="bwStr-CaMv-Name"> Name:</xsl:variable>532 <xsl:variable name="bwStr-CaMv-Name">System Name:</xsl:variable> 533 533 <xsl:variable name="bwStr-CaMv-MailingListID">Mailing List ID:</xsl:variable> 534 <xsl:variable name="bwStr-CaMv-Summary"> Summary:</xsl:variable>534 <xsl:variable name="bwStr-CaMv-Summary">Display Name:</xsl:variable> 535 535 <xsl:variable name="bwStr-CaMv-Description">Description:</xsl:variable> 536 536 <xsl:variable name="bwStr-CaMv-SelectNewParentFolder">Select a new parent folder:</xsl:variable> … … 895 895 <xsl:variable name="bwStr-Srch-ResultReturnedFor">result(s) returned for</xsl:variable> 896 896 <xsl:variable name="bwStr-Srch-Relevance">relevance</xsl:variable> 897 <xsl:variable name="bwStr-Srch-Summary"> summary</xsl:variable>897 <xsl:variable name="bwStr-Srch-Summary">display name</xsl:variable> 898 898 <xsl:variable name="bwStr-Srch-Title">title</xsl:variable> 899 899 <xsl:variable name="bwStr-Srch-DateAndTime">date & time</xsl:variable> trunk/deployment/webadmin/webapp/resources/resources/bedework.js
r2850 r2991 181 181 return false; 182 182 } 183 184 // set the aliasUri to an empty string. Only set it if user 185 // has requested a subscription. 186 formObj.aliasUri.value == ""; 187 188 if (formObj.type.value == "folder") { 189 formObj.calendarCollection.value = "false"; 190 } else if (formObj.type.value == "subscription") { 191 switch (formObj.subType.value) { 192 case "publicTree": 193 // do nothing: when adding a subscription to the public tree, we set the fields directly. 194 break; 195 case "public": 196 formObj.aliasUri.value = "bwcal://" + formObj.publicAliasHolder.value; 197 break; 198 case "user": 199 //the "/user/" string is temporary; it needs to be passed as a param. 200 formObj.aliasUri.value = "bwcal:///user/" + formObj.userIdHolder.value + "/" + formObj.userCalHolder.value; 201 break; 202 case "external": 203 formObj.aliasUri.value = formObj.aliasUriHolder.value; 204 break; 205 } 206 } 207 return true; 208 } 209 // build a uri based on user and path in the subscription form 210 // DEPRECATED - use setCalendarAlias() above. 211 function setSubscriptionUri(formObj,prefix) { 212 if (formObj) { 213 var fullUri = prefix + formObj.userId.value; 214 if (formObj.userPath.value != "") { 215 if (formObj.userPath.value.substring(0,1) == "/") { 216 fullUri += formObj.userPath.value; 217 } else { 218 fullUri += "/" + formObj.userPath.value; 183 184 // check first to make sure we have a valid calendar system name: 185 if (validateCalName(formObj['calendar.name'])) { 186 187 // set the aliasUri to an empty string. Only set it if user 188 // has requested a subscription. 189 formObj.aliasUri.value == ""; 190 191 if (formObj.type.value == "folder") { 192 formObj.calendarCollection.value = "false"; 193 } else if (formObj.type.value == "subscription") { 194 switch (formObj.subType.value) { 195 case "publicTree": 196 // do nothing: when adding a subscription to the public tree, we set the fields directly. 197 break; 198 case "public": 199 formObj.aliasUri.value = "bwcal://" + formObj.publicAliasHolder.value; 200 break; 201 case "user": 202 //the "/user/" string is temporary; it needs to be passed as a param. 203 formObj.aliasUri.value = "bwcal:///user/" + formObj.userIdHolder.value + "/" + formObj.userCalHolder.value; 204 break; 205 case "external": 206 formObj.aliasUri.value = formObj.aliasUriHolder.value; 207 break; 219 208 } 220 209 } 221 formObj.calUri.value = fullUri;222 210 return true; 223 211 } else { 224 alert("The subscription form is not available.");225 212 return false; 226 213 } … … 262 249 hiddenCat.innerHTML = '<input type="hidden" name="defaultCategory" value=""/>'; 263 250 formObj.appendChild(hiddenCat); 251 } 252 } 253 // Stop user from entering invalid characters in calendar names 254 // In 3.6 this will only test for & ' " and / 255 // In future releases, we will go further and only allow 256 // alphanumerics and dashes and underscores. 257 function validateCalName(nameObj) { 258 if(nameObj.value.indexOf("'") == -1 && 259 nameObj.value.indexOf('"') == -1 && 260 nameObj.value.indexOf("&") == -1 && 261 nameObj.value.indexOf("/") == -1) { 262 return true; 263 } else { // we have bad characters 264 var badChars = ""; 265 if(nameObj.value.indexOf("'") != -1) { 266 badChars += " ' "; 267 } 268 if(nameObj.value.indexOf('"') != -1) { 269 badChars += ' \" '; 270 } 271 if(nameObj.value.indexOf("&") != -1) { 272 badChars += " & "; 273 } 274 if(nameObj.value.indexOf("/") != -1) { 275 badChars += " / "; 276 } 277 alert("System Names may not include the following characters: " + badChars); 278 nameObj.focus(); 279 return false; 264 280 } 265 281 } trunk/deployment/webuser/webapp/resources/demoskins/default/strings.xsl
r2913 r2991 578 578 <xsl:variable name="bwStr-CuCa-AddCalFolderOrSubscription">Add Calendar, Folder, or Subscription</xsl:variable> 579 579 <xsl:variable name="bwStr-CuCa-HttpStatus">HTTP Status:</xsl:variable> 580 <xsl:variable name="bwStr-CuCa-Name"> Name:</xsl:variable>581 <xsl:variable name="bwStr-CuCa-Summary"> Summary:</xsl:variable>580 <xsl:variable name="bwStr-CuCa-Name">System Name:</xsl:variable> 581 <xsl:variable name="bwStr-CuCa-Summary">Display Name:</xsl:variable> 582 582 <xsl:variable name="bwStr-CuCa-Description">Description:</xsl:variable> 583 583 <xsl:variable name="bwStr-CuCa-Color">Color:</xsl:variable> … … 1057 1057 <xsl:variable name="bwStr-Srch-ResultReturnedFor">result(s) returned for</xsl:variable> 1058 1058 <xsl:variable name="bwStr-Srch-Relevance">relevance</xsl:variable> 1059 <xsl:variable name="bwStr-Srch-Summary"> summary</xsl:variable>1059 <xsl:variable name="bwStr-Srch-Summary">display name</xsl:variable> 1060 1060 <xsl:variable name="bwStr-Srch-DateAndTime">date & time</xsl:variable> 1061 1061 <xsl:variable name="bwStr-Srch-Calendar">calendar</xsl:variable> trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/calendars.xsl
r2896 r2991 119 119 <xsl:choose> 120 120 <xsl:when test="display = 'true'"> 121 <!-- set the value of display to false so that when the form is submitted we toggle --> 121 <!-- set the value of display to false so that when the form is submitted we toggle 122 --> 122 123 <input type="hidden" name="display" value="false"/> 123 124 <input type="checkbox" name="bwDisplaySetter" checked="checked" onclick="this.form.submit()"> … … 128 129 </xsl:when> 129 130 <xsl:otherwise> 130 <!-- set the value of display to true so that when the form is submitted we toggle --> 131 <!-- set the value of display to true so that when the form is submitted we toggle 132 --> 131 133 <input type="hidden" name="display" value="true"/> 132 134 <input type="checkbox" name="bwDisplaySetter" onclick="this.form.submit()"> … … 367 369 368 370 <xsl:template name="selectCalForPublicAlias"> 369 <!-- This template is DEPRECATED ... selectCalForPublicAliasCalTree is now used instead. --> 371 <!-- This template is DEPRECATED ... selectCalForPublicAliasCalTree is now used instead. 372 --> 370 373 <!-- selectCalForPublicAlias creates a calendar tree pop-up window for 371 selecting a public calendar subscription (alias). --> 374 selecting a public calendar subscription (alias). 375 --> 372 376 373 377 <input type="button" onclick="javascript:changeClass('calSelectWidget','visible')" value="select calendar" class="small"/> … … 429 433 <xsl:template match="currentCalendar" mode="addCalendar"> 430 434 <h3><xsl:copy-of select="$bwStr-CuCa-AddCalFolderOrSubscription"/></h3> 431 <form name="addCalForm" method="post" action="{$calendar-update}" onsubmit=" setCalendarAlias(this)">435 <form name="addCalForm" method="post" action="{$calendar-update}" onsubmit="return setCalendarAlias(this)"> 432 436 <table class="common"> 433 437 <tr> … … 690 694 <xsl:call-template name="colorPicker"> 691 695 <xsl:with-param name="colorFieldId">bwCalColor</xsl:with-param> 696 <xsl:with-param name="colorValue"><xsl:value-of select="color"/></xsl:with-param> 692 697 </xsl:call-template> 693 698 </td> … … 831 836 <xsl:template name="colorPicker"> 832 837 <xsl:param name="colorFieldId"/><!-- required: id of text field to be updated --> 838 <button type="button" id="bwColorPickerButton" value="{$bwStr-CoPi-Pick}"><img src="{$resourcesRoot}/images/colorIcon.gif" width="16" height="13" alt="pick a color"/></button> 833 839 <script type="text/javascript"> 834 $.ui.dialog.defaults.bgiframe = true; 835 $(function() { 836 $("#bwColorPicker").dialog({ autoOpen: false, width: 214 }); 837 }); 838 $(function() { 839 $('#bwColorPickerButton').click(function() { 840 $('#bwColorPicker').dialog('open'); 841 }); 840 $(document).ready(function() { 841 $('#bwColorPickerButton').ColorPicker({ 842 onSubmit: function(hsb, hex, rgb, el) { 843 var fullHex = "#" + hex; 844 $('#<xsl:value-of select="$colorFieldId"/>').val(fullHex); 845 $('#<xsl:value-of select="$colorFieldId"/>').css('background-color',fullHex); 846 $(el).ColorPickerHide(); 847 }, 848 onBeforeShow: function () { 849 var curColor = $('#<xsl:value-of select="$colorFieldId"/>').val(); 850 $(this).ColorPickerSetColor(curColor); 851 } 852 }); 842 853 }); 843 854 </script> 844 <button type="button" id="bwColorPickerButton" value="{$bwStr-CoPi-Pick}"><img src="{$resourcesRoot}/images/colorIcon.gif" width="16" height="13" alt="pick a color"/></button>845 846 <div id="bwColorPicker" title="{$bwStr-CoPi-SelectColor}">847 <xsl:for-each select="document('../../../bedework-common/default/default/subColors.xml')/subscriptionColors/color">848 <xsl:variable name="color" select="."/>849 <xsl:variable name="colorName" select="@name"/>850 <a href="javascript:bwUpdateColor('{$color}','{$colorFieldId}')"851 style="display:block;float:left;background-color:{$color};color:black;width=25px;height=25px;margin:0;padding:0;"852 title="{$colorName}"853 onclick="$('#bwColorPicker').dialog('close');">854 <img src="{$resourcesRoot}/images/spacer.gif" width="25" height="25" style="border:1px solid #333;margin:0;padding:0;" alt="{$colorName}"/>855 </a>856 <xsl:if test="position() mod 6 = 0"><br style="clear:both;"/></xsl:if>857 </xsl:for-each>858 <p><a href="javascript:bwUpdateColor('','{$colorFieldId}')" onclick="$('#bwColorPicker').dialog('close');"><xsl:copy-of select="$bwStr-CoPi-UseDefaultColors"/></a></p>859 </div>860 855 </xsl:template> 861 856 trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/head.xsl
r2986 r2991 77 77 </xsl:if> 78 78 </xsl:if> 79 80 <xsl:if test="/bedework/page='modCalendar' or 81 /bedework/page='addCalendar'"> 82 <link rel="stylesheet" href="/bedework-common/javascript/jquery/colorpicker/colorpicker.css"/> 83 <script type="text/javascript" src="/bedework-common/javascript/jquery/colorpicker/colorpicker.js"> </script> 84 </xsl:if> 79 85 80 86 <xsl:if test="/bedework/page='attendees'"> trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/javascript/bedework.js
r2893 r2991 206 206 } 207 207 208 // set the aliasUri to an empty string. Only set it if user 209 // has requested a subscription. 210 formObj.aliasUri.value == ""; 211 212 if (formObj.type.value == "folder") { 213 formObj.calendarCollection.value = "false"; 214 } else if (formObj.type.value == "subscription") { 215 switch (formObj.subType.value) { 216 case "public": 217 formObj.aliasUri.value = "bwcal://" + formObj.publicAliasHolder.value; 218 break; 219 case "user": 220 //the "/user/" string is temporary; it needs to be passed as a param. 221 formObj.aliasUri.value = "bwcal:///user/" + formObj.userIdHolder.value + "/" + formObj.userCalHolder.value; 222 break; 223 case "external": 224 formObj.aliasUri.value = formObj.aliasUriHolder.value; 225 break; 226 } 227 } 228 return true; 229 } 230 // build a uri based on user and path in the subscription form 231 // DEPRECATED - use setCalendarAlias() above. 232 function setBwSubscriptionUri(formObj, publicUri) { 233 if (!formObj) { 234 alert("The subscription form is not available."); 208 //check first to make sure we have a valid calendar system name: 209 if (validateCalName(formObj['calendar.name'])) { 210 211 // set the aliasUri to an empty string. Only set it if user 212 // has requested a subscription. 213 formObj.aliasUri.value == ""; 214 215 if (formObj.type.value == "folder") { 216 formObj.calendarCollection.value = "false"; 217 } else if (formObj.type.value == "subscription") { 218 switch (formObj.subType.value) { 219 case "public": 220 formObj.aliasUri.value = "bwcal://" + formObj.publicAliasHolder.value; 221 break; 222 case "user": 223 //the "/user/" string is temporary; it needs to be passed as a param. 224 formObj.aliasUri.value = "bwcal:///user/" + formObj.userIdHolder.value + "/" + formObj.userCalHolder.value; 225 break; 226 case "external": 227 formObj.aliasUri.value = formObj.aliasUriHolder.value; 228 break; 229 } 230 } 231 return true; 232 } else { 235 233 return false; 236 234 } 237 238 var fullUri = "bwcal://"; 239 240 if (publicUri) { 241 fullUri += formObj.aliasUri.value; 242 } else { 243 fullUri += "/user" + formObj.userId.value; 244 if (formObj.userPath.value != "") { 245 if (formObj.userPath.value.substring(0,1) != "/") { 246 fullUri += "/"; 247 } 248 249 fullUri += formObj.userPath.value; 250 } 251 } 252 253 formObj.aliasUri.value = fullUri; 254 return true; 235 } 236 //Stop user from entering invalid characters in calendar names 237 //In 3.6 this will only test for & ' " and / 238 //In future releases, we will go further and only allow 239 //alphanumerics and dashes and underscores. 240 function validateCalName(nameObj) { 241 if(nameObj.value.indexOf("'") == -1 && 242 nameObj.value.indexOf('"') == -1 && 243 nameObj.value.indexOf("&") == -1 && 244 nameObj.value.indexOf("/") == -1) { 245 return true; 246 } else { // we have bad characters 247 var badChars = ""; 248 if(nameObj.value.indexOf("'") != -1) { 249 badChars += " ' "; 250 } 251 if(nameObj.value.indexOf('"') != -1) { 252 badChars += ' \" '; 253 } 254 if(nameObj.value.indexOf("&") != -1) { 255 badChars += " & "; 256 } 257 if(nameObj.value.indexOf("/") != -1) { 258 badChars += " / "; 259 } 260 alert("System Names may not include the following characters: " + badChars); 261 nameObj.focus(); 262 return false; 263 } 255 264 } 256 265 function exportCalendar(formId,name,calPath) {
