[Rt-commit] [svn] r1331 - in rtfm/branches/2.1-TESTING/html: NoAuth RTFM/Admin/Classes RTFM/Article/Elements

alexmv at pallas.eruditorum.org alexmv at pallas.eruditorum.org
Thu Aug 12 19:22:55 EDT 2004


Author: alexmv
Date: Thu Aug 12 19:22:54 2004
New Revision: 1331

Modified:
   rtfm/branches/2.1-TESTING/html/NoAuth/webrtfm.css
   rtfm/branches/2.1-TESTING/html/RTFM/Admin/Classes/CustomFields.html
   rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowCustomFields
Log:
 * Make "Hidden" be entirely css-based

 * "Hidden when empty" now switches css between "Hidden" and "Visible"

 * "Normal" is now "Visible"



Modified: rtfm/branches/2.1-TESTING/html/NoAuth/webrtfm.css
==============================================================================
--- rtfm/branches/2.1-TESTING/html/NoAuth/webrtfm.css	(original)
+++ rtfm/branches/2.1-TESTING/html/NoAuth/webrtfm.css	Thu Aug 12 19:22:54 2004
@@ -1,5 +1,11 @@
-#cfs .emphasized    td { font-weight: bold;    color: #c00; font-size: 11pt; }
-#cfs .emphasized    th { font-weight: bolder;  color: #c00; font-size: 13pt; }
+#cfs .hidden { display: none; }
 
 #cfs .de-emphasized td { font-weight: lighter; color: #999; font-size:  9pt; }
 #cfs .de-emphasized th { font-weight: normal;  color: #999; font-size: 11pt; }
+
+#cfs .visible       td { font-weight: nomal;                                 }
+#cfs .visible       th { font-weight: bold;                                  }
+
+#cfs .emphasized    td { font-weight: bold;    color: #c00; font-size: 11pt; }
+#cfs .emphasized    th { font-weight: bolder;  color: #c00; font-size: 13pt; }
+

Modified: rtfm/branches/2.1-TESTING/html/RTFM/Admin/Classes/CustomFields.html
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Admin/Classes/CustomFields.html	(original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Admin/Classes/CustomFields.html	Thu Aug 12 19:22:54 2004
@@ -50,8 +50,8 @@
 </td>
 <td>
 <select name="Class-<% $ClassObj->Id %>-CF-<% $cf->Id %>-Display" <% $class_cf->Id ? '' : 'disabled="1"' |n%>>
-% for (qw/Normal Emphasized De-emphasized Hidden/, "Hidden when empty") {
-<option <% $_ eq $class_cf->Display and "selected" %>><% $_ %></option>
+% for ("Hidden when empty", qw/Hidden De-emphasized Visible Emphasized/) {
+<option <% ($_ eq $class_cf->Display or (not $class_cf->Display and $_ eq "Visible")) and "selected" %>><% $_ %></option>
 % }
 </select>
 </td>
@@ -103,7 +103,7 @@
         
         my $class_cf = RT::FM::ClassCustomField->new($session{'CurrentUser'});
         $class_cf->LoadByCols(Class => $ClassObj->Id, CustomField => $cf->Id);
-        $class_cf->SetDisplay($ARGS{"Class-".$ClassObj->Id."-CF-".$cf->Id."-Display"} || "Normal");
+        $class_cf->SetDisplay($ARGS{"Class-".$ClassObj->Id."-CF-".$cf->Id."-Display"} || "Visible");
         my ($val, $msg) =  $cf->SetSortOrderForClass(Class => $ClassObj->Id, SortOrder => $ARGS{"Class-".$ClassObj->Id."-CF-".$cf->Id."-SortOrder"});
     }
 }

Modified: rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowCustomFields
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowCustomFields	(original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowCustomFields	Thu Aug 12 19:22:54 2004
@@ -22,9 +22,10 @@
 %   my $class_cf = RT::FM::ClassCustomField->new($session{'CurrentUser'});
 %   $class_cf->LoadByCols(Class => $article->ClassObj->Id, CustomField => $cf->Id);
 %   my $display = $class_cf->Display;
-%   next if $display eq "Hidden";
-%   next if $display eq "Hidden when empty" and not $values->Count;
-<tr class="<% (split(' ',$display))[-1] %>">
+%   if ($display eq "Hidden when empty") {
+%     $display = $values->Count ? "Visible" : "Hidden";
+%   }
+<tr class="<% lc $display %>">
 <th valign="top"><%$cf->Name%></th>
 <td>
 <% ($cf->Type !~ /Single$/) && '<ul>' |n%>


More information about the Rt-commit mailing list