[Rt-commit] r2983 - in rt/branches/CHALDEA-EXPERIMENTAL/html: Elements NoAuth

autrijus at bestpractical.com autrijus at bestpractical.com
Mon May 30 01:51:31 EDT 2005


Author: autrijus
Date: Mon May 30 01:51:30 2005
New Revision: 2983

Modified:
   rt/branches/CHALDEA-EXPERIMENTAL/html/Elements/EditCustomFieldSelect
   rt/branches/CHALDEA-EXPERIMENTAL/html/NoAuth/cascaded.js
Log:
* empty categories are now treated as empty, not as /same as above/.
* selecting an empty catagory now means /show all/, not /show uncategorised/.

Modified: rt/branches/CHALDEA-EXPERIMENTAL/html/Elements/EditCustomFieldSelect
==============================================================================
--- rt/branches/CHALDEA-EXPERIMENTAL/html/Elements/EditCustomFieldSelect	(original)
+++ rt/branches/CHALDEA-EXPERIMENTAL/html/Elements/EditCustomFieldSelect	Mon May 30 01:51:30 2005
@@ -55,12 +55,12 @@
 <script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/cascaded.js"></script>
 %#      XXX - Hide this select from w3m?
       <select onchange="filter_cascade('<% $id %>-Values', this.value)" name="<%$id%>-Category"
-        <option value="" <% !$selected && 'SELECTED' %>><&|/l&>(no value)</&></option>
+        <option value="" <% !$selected && 'SELECTED' %>><&|/l&>-</&></option>
 %           foreach my $cat (@category) {
 %               my ($depth, $name) = @$cat;
         <option value="<% $name %>"><% '&nbsp;' x $depth |n %><%$name%></option>
 %           }
-      </select>
+      </select><br />
 %       }
       <select name="<%$id%>-Values" id="<%$id%>-Values"
 %       if ($Multiple or !@category) {
@@ -86,7 +86,7 @@
 % my @levels;
 % while ($CFVs and my $value = $CFVs->Next ) {
 %       my $category = $value->Category;
-%       if (length $category) {
+%       if (1) { # length $category) {
 %           my $level = (split(/:/, $category))[0];
 %           while (@levels) {
 %               if ($levels[-1] eq $level) {
@@ -99,7 +99,7 @@
 %                   last;
 %               }
 %           }
-%           if (defined $level) {
+%           if (length $level) {
 %               push @$CategoryRef, [0+ at levels, $level];
         <optgroup style="padding-left: <% @levels/2 %>em" label="<%$category%>">
 %               push @levels, $level;

Modified: rt/branches/CHALDEA-EXPERIMENTAL/html/NoAuth/cascaded.js
==============================================================================
--- rt/branches/CHALDEA-EXPERIMENTAL/html/NoAuth/cascaded.js	(original)
+++ rt/branches/CHALDEA-EXPERIMENTAL/html/NoAuth/cascaded.js	Mon May 30 01:51:30 2005
@@ -7,7 +7,7 @@
         var style = children[i].style;
         if (!style) { continue };
         if (val == '') {
-            style.display = children[i].label ? 'none' : 'block';
+            style.display = 'block';
             continue;
         }
         if (children[i].label.substr(0, val.length) == val) {


More information about the Rt-commit mailing list