Changeset 2131
- Timestamp:
- 04/13/09 20:26:12
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/deployment/webadmin/webapp/resources/default/default/default.css
r2125 r2131 1071 1071 padding: 0; 1072 1072 } 1073 .defaultCategory { 1074 color: #999; 1075 background-color: transparent; 1076 } 1073 1077 #bwGetCollectionForm { 1074 1078 margin-top: 1em; trunk/deployment/webadmin/webapp/resources/default/default/default.xsl
r2130 r2131 919 919 <th>Start</th> 920 920 <th>End</th> 921 <th>Topical Areas</th> 921 922 <th>Categories</th> 922 < th>Calendar</th>923 <!-- <th>Calendar</th> --> 923 924 <th>Description</th> 924 925 </tr> … … 969 970 </td> 970 971 <td class="calcat"> 972 <xsl:for-each select="xproperties/X-BEDEWORK-ALIAS"> 973 <xsl:call-template name="substring-afterLastInstanceOf"> 974 <xsl:with-param name="string" select="values/text"/> 975 <xsl:with-param name="char">/</xsl:with-param> 976 </xsl:call-template><br/> 977 </xsl:for-each> 978 </td> 979 <td class="calcat"> 971 980 <xsl:for-each select="categories/category"> 972 981 <xsl:value-of select="word"/><br/> 973 982 </xsl:for-each> 974 983 </td> 975 < td>984 <!-- <td> 976 985 <xsl:value-of select="calendar/name"/> 977 </td> 986 </td>--> 978 987 <td> 979 988 <xsl:value-of select="description"/> … … 2264 2273 categories can be set by the event administrator if the calendar suite preferences allow it 2265 2274 --> 2266 2267 2275 <tr> 2268 2276 <td class="fieldName"> … … 2288 2296 <xsl:attribute name="onchange">setCatChBx('pref-<xsl:value-of select="uid"/>','all-<xsl:value-of select="uid"/>')</xsl:attribute> 2289 2297 <xsl:if test="uid = ../../current//category/uid"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 2298 <xsl:if test="uid = /bedework/currentCalSuite/defaultCategories//category/uid"> 2299 <xsl:attribute name="disabled">disabled</xsl:attribute> 2300 </xsl:if> 2290 2301 <xsl:value-of select="keyword"/> 2291 2302 </input><br/> … … 2300 2311 <xsl:attribute name="onchange">setCatChBx('pref-<xsl:value-of select="uid"/>','all-<xsl:value-of select="uid"/>')</xsl:attribute> 2301 2312 <xsl:if test="uid = ../../current//category/uid"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 2313 <xsl:if test="uid = /bedework/currentCalSuite/defaultCategories//category/uid"> 2314 <xsl:attribute name="disabled">disabled</xsl:attribute> 2315 </xsl:if> 2302 2316 <xsl:value-of select="keyword"/> 2303 2317 </input><br/> … … 2323 2337 <xsl:if test="uid = ../../current//category/uid"> 2324 2338 <xsl:attribute name="checked">checked</xsl:attribute> 2339 <xsl:if test="uid = /bedework/currentCalSuite/defaultCategories//category/uid"> 2340 <xsl:attribute name="disabled">disabled</xsl:attribute> 2341 </xsl:if> 2325 2342 </xsl:if> 2326 2343 <xsl:value-of select="keyword"/> … … 2338 2355 <xsl:if test="uid = ../../current//category/uid"> 2339 2356 <xsl:attribute name="checked">checked</xsl:attribute> 2357 <xsl:if test="uid = /bedework/currentCalSuite/defaultCategories//category/uid"> 2358 <xsl:attribute name="disabled">disabled</xsl:attribute> 2359 </xsl:if> 2340 2360 </xsl:if> 2341 2361 <xsl:value-of select="keyword"/> … … 3338 3358 </xsl:template> 3339 3359 3360 <!-- form used for selecting categories in calendar and pref forms --> 3361 <xsl:template name="categorySelectionWidget"> 3362 <!-- show the selected categories --> 3363 <ul class="catlist"> 3364 <xsl:for-each select="/bedework/categories/current/category"> 3365 <xsl:sort select="keyword" order="ascending"/> 3366 <li> 3367 <input type="checkbox" name="catUid" checked="checked"> 3368 <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute> 3369 </input> 3370 <xsl:value-of select="keyword"/> 3371 </li> 3372 </xsl:for-each> 3373 </ul> 3374 <a href="javascript:toggleVisibility('calCategories','visible')"> 3375 show/hide unused categories 3376 </a> 3377 <div id="calCategories" class="invisible"> 3378 <ul class="catlist"> 3379 <xsl:for-each select="/bedework/categories/all/category"> 3380 <xsl:sort select="keyword" order="ascending"/> 3381 <!-- don't duplicate the selected categories --> 3382 <xsl:if test="not(uid = ../../current//category/uid)"> 3383 <li> 3384 <input type="checkbox" name="catUid"> 3385 <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute> 3386 </input> 3387 <xsl:value-of select="keyword"/> 3388 </li> 3389 </xsl:if> 3390 </xsl:for-each> 3391 </ul> 3392 </div> 3393 </xsl:template> 3394 3340 3395 <!--+++++++++++++++ Calendars ++++++++++++++++++++--> 3341 3396 <xsl:template match="calendars" mode="calendarCommon"> … … 3572 3627 <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute> 3573 3628 <xsl:if test="uid = ../../current//category/uid"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 3629 <xsl:if test="uid = /bedework/currentCalSuite/defaultCategories//category/uid"> 3630 <xsl:attribute name="disabled">disabled</xsl:attribute> 3631 </xsl:if> 3632 <xsl:value-of select="keyword"/> 3574 3633 </input> 3575 <xsl:value-of select="keyword"/>3576 3634 </li> 3577 3635 </xsl:for-each> … … 3773 3831 <input type="checkbox" name="catUid" checked="checked"> 3774 3832 <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute> 3833 <xsl:if test="uid = /bedework/currentCalSuite/defaultCategories//category/uid"> 3834 <xsl:attribute name="disabled">disabled</xsl:attribute> 3835 </xsl:if> 3836 <xsl:value-of select="keyword"/> 3775 3837 </input> 3776 <xsl:value-of select="keyword"/>3777 3838 </li> 3778 3839 </xsl:for-each> … … 4481 4542 <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute> 4482 4543 <xsl:if test="uid = ../../current//category/uid"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 4544 <xsl:if test="uid = /bedework/currentCalSuite/defaultCategories//category/uid"> 4545 <xsl:attribute name="disabled">disabled</xsl:attribute> 4546 </xsl:if> 4547 <xsl:value-of select="keyword"/> 4483 4548 </input> 4484 <xsl:value-of select="keyword"/>4485 4549 </li> 4486 4550 </xsl:for-each> … … 5283 5347 <xsl:template name="calSuitePrefs"> 5284 5348 <h2>Edit Calendar Suite Preferences</h2> 5285 <form name="userPrefsForm" method="post" action="{$calsuite-updatePrefs}" >5349 <form name="userPrefsForm" method="post" action="{$calsuite-updatePrefs}" onsubmit="checkPrefCategories(this);"> 5286 5350 <table class="common2"> 5287 5351 <tr> … … 5357 5421 <th>Default Categories:</th> 5358 5422 <td> 5359 <!-- show the selected categories - in this case, iterate over 5360 the "all" listing and reveal those that have been selected; 5361 in this case, we have only the uids to go by, so we need to 5362 match them up --> 5423 <!-- show the selected categories --> 5363 5424 <ul class="catlist"> 5364 <xsl:for-each select="/bedework/ prefs/defaultCategories/category">5425 <xsl:for-each select="/bedework/categories/current/category"> 5365 5426 <xsl:sort select="keyword" order="ascending"/> 5366 <xsl:if test="uid = /bedework/categories/current//category/uid"> 5367 <li> 5368 <input type="checkbox" name="defaultCategory" checked="checked"> 5369 <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute> 5370 </input> 5427 <li> 5428 <input type="checkbox" name="defaultCategory" checked="checked"> 5429 <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute> 5371 5430 <xsl:value-of select="keyword"/> 5372 </ li>5373 </ xsl:if>5431 </input> 5432 </li> 5374 5433 </xsl:for-each> 5375 5434 </ul> … … 5379 5438 <div id="calCategories" class="invisible"> 5380 5439 <ul class="catlist"> 5381 <xsl:for-each select="/bedework/ prefs/defaultCategories/category">5440 <xsl:for-each select="/bedework/categories/all/category"> 5382 5441 <xsl:sort select="keyword" order="ascending"/> 5383 5442 <!-- don't duplicate the selected categories --> … … 5386 5445 <input type="checkbox" name="defaultCategory"> 5387 5446 <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute> 5447 <xsl:value-of select="keyword"/> 5388 5448 </input> 5389 <xsl:value-of select="keyword"/>5390 5449 </li> 5391 5450 </xsl:if> … … 5393 5452 </ul> 5394 5453 </div> 5454 </td> 5455 </tr> 5456 <tr> 5457 <th> 5458 Allow users to select categories in event form: 5459 </th> 5460 <td> 5461 <input type="radio" name="useCats" value="true" checked="checked"/> yes 5462 <input type="radio" name="useCats" value="false"/> no 5395 5463 </td> 5396 5464 </tr> trunk/deployment/webadmin/webapp/resources/resources/bedework.js
r2130 r2131 242 242 var hasACat = false; 243 243 244 if (typeof formObj. catUid.length != 'undefined') {245 for (i = 0; i < formObj. catUid.length; i++) {246 if (formObj. catUid[i].checked) {244 if (typeof formObj.defaultCategory.length != 'undefined') { 245 for (i = 0; i < formObj.defaultCategory.length; i++) { 246 if (formObj.defaultCategory[i].checked) { 247 247 hasACat = true; 248 248 break; … … 255 255 // so we can clear the cats 256 256 var hiddenCat = document.createElement("div"); 257 hiddenCat.innerHTML = '<input type="hidden" name=" catUid" value=""/>';257 hiddenCat.innerHTML = '<input type="hidden" name="defaultCategory" value=""/>'; 258 258 formObj.appendChild(hiddenCat); 259 259 }
