[Rt-commit] r3530 - in rt/branches/3.5-TESTING: . html/NoAuth/css/3.5-default html/NoAuth/js html/Widgets

trs at bestpractical.com trs at bestpractical.com
Mon Jul 25 06:26:37 EDT 2005


Author: trs
Date: Mon Jul 25 06:26:34 2005
New Revision: 3530

Modified:
   rt/branches/3.5-TESTING/   (props changed)
   rt/branches/3.5-TESTING/html/NoAuth/css/3.5-default/titlebox.css
   rt/branches/3.5-TESTING/html/NoAuth/css/3.5-default/transactions.css
   rt/branches/3.5-TESTING/html/NoAuth/js/titlebox-state.js
   rt/branches/3.5-TESTING/html/NoAuth/js/util.js
   rt/branches/3.5-TESTING/html/Widgets/TitleBoxStart
Log:
 r5389 at wintermute:  tom | 2005-07-24 23:46:32 -0400
 * Made class "rolled-up" attached to a more semantic element
 * Fixed styles that made transaction subjects look threaded
 * Styled titleboxes with a border and background to separate them a little better from each other (rt-devel users noted there seemed too much whitespace and not enough distinction)


Modified: rt/branches/3.5-TESTING/html/NoAuth/css/3.5-default/titlebox.css
==============================================================================
--- rt/branches/3.5-TESTING/html/NoAuth/css/3.5-default/titlebox.css	(original)
+++ rt/branches/3.5-TESTING/html/NoAuth/css/3.5-default/titlebox.css	Mon Jul 25 06:26:34 2005
@@ -1,10 +1,36 @@
-.titlebox { margin-bottom: 1em; }
+.titlebox {
+    margin-bottom: 1em;
+}
+
+.titlebox .titlebox-content {
+    padding: 1em 2em 0.5em 2em;
+    margin: 0;
+    /*margin: 1em 2em 0.5em 2em;*/
+}
+
+%# TRS: I wish there was a more elegant way to do this... I essentially need to
+%# select all elements X that do NOT have element Y as a descendant... which I can
+%# fake with the child selector of CSS2, but IE is stupid and does not support that.
 
-.titlebox .content {
-    margin: 1em 2em 0 2em;
+% for (qw(index Search-Build User-Prefs Approvals Admin-Users-Modify)) {
+#comp-<%$_%> .titlebox .titlebox-content,
+% }
+.titlebox .titlebox .titlebox-content
+{
+    background: #eee;
+    margin-top: -1px;
+    border-bottom: 1px solid #ccc;
+    border-right: 1px solid #ccc;
+    border-left: 0.5em solid #069;
+}
+
+#comp-index #login-box .titlebox .titlebox-content
+{
+    background: inherit;
+    border: none;
 }
 
-.titlebox .title {
+.titlebox .titlebox-title {
     position: relative;
     font-weight: bold;
     color: #930;
@@ -13,7 +39,7 @@
     border-bottom: 1px solid #069;
 }
 
-.titlebox .title .right {
+.titlebox .titlebox-title .right {
     position: absolute;
     top: 0.5em;
     right: 1.5em;
@@ -21,19 +47,19 @@
     color: #888;
 }
 
-.titlebox .title .right .selected { color: #930; }
+.titlebox .titlebox-title .right .selected { color: #930; }
 
-#body .titlebox .title .right :link,
-#body .titlebox .title .right :visited {
+#body .titlebox .titlebox-title .right :link,
+#body .titlebox .titlebox-title .right :visited {
     color: #888;
 }
 
-#body .titlebox .title .right :link:hover,
-#body .titlebox .title .right :visited:hover {
+#body .titlebox .titlebox-title .right :link:hover,
+#body .titlebox .titlebox-title .right :visited:hover {
     color: #930;
 }
 
-.titlebox .title .widget a {
+.titlebox .titlebox-title .widget a {
   display: block;
   padding-top: 1em;
   width: 20px;
@@ -63,30 +89,30 @@
 %# IE also doesn't support the child selector ">", so we can use it to set values
 %# that only other browsers will see (in this case, playing nice with Opera, which
 %# also suffers from the backslash hack above.)
-html>body .titlebox .title .widget a {
+html>body .titlebox .titlebox-title .widget a {
     height: 0;
     overflow: hidden;
 }
 
 %# Compensates for IE's bad box model by hiding this rule from other browsers
-* html .titlebox .title .widget a {
+* html .titlebox .titlebox-title .widget a {
     background-position: center 0.3em;
     left: -3.5em;
 }
 
-.titlebox .title .widget a.rolled-up {
+.titlebox.rolled-up .titlebox-title .widget a {
     background-image: url(<%$RT::WebImagesURL%>/css/rolldown-arrow.gif);
 }
 
-#body .titlebox .title :link,
-#body .titlebox .title :visited
+#body .titlebox .titlebox-title :link,
+#body .titlebox .titlebox-title :visited
 {
     color: #930;
     text-decoration: none;
 }
 
-#body .titlebox .title :link:hover,
-#body .titlebox .title :visited:hover
+#body .titlebox .titlebox-title :link:hover,
+#body .titlebox .titlebox-title :visited:hover
 {
     text-decoration: underline;
 }

Modified: rt/branches/3.5-TESTING/html/NoAuth/css/3.5-default/transactions.css
==============================================================================
--- rt/branches/3.5-TESTING/html/NoAuth/css/3.5-default/transactions.css	(original)
+++ rt/branches/3.5-TESTING/html/NoAuth/css/3.5-default/transactions.css	Mon Jul 25 06:26:34 2005
@@ -49,8 +49,20 @@
     border: 1px solid #069;
 }
 
-.ticket-transaction .date { font-size: 0.9em; }
-.ticket-transaction .description { font-weight: bold; }
+.ticket-transaction.even {
+    background: #eee;
+}
+
+.ticket-transaction .date {
+    font-size: 0.9em;
+    width: 15em;
+}
+
+.ticket-transaction .description {
+    font-weight: bold;
+    text-align: left;
+}
+
 .ticket-transaction .actions {
     text-align: right;
     font-weight: bold;
@@ -73,21 +85,21 @@
 
 .ticket-transaction.basics { border-color: #b32; }
 .ticket-transaction.basics .type { background: #b32; }
-.ticket-summary .ticket-info-basics .content { border-left: 0.5em solid #b32; }
+.ticket-summary .ticket-info-basics .titlebox-content { border-left: 0.5em solid #b32; }
 
 .ticket-transaction.people { border-color: #48c; }
 .ticket-transaction.people .type { background: #48c; }
-.ticket-summary .ticket-info-people .content { border-left: 0.5em solid #48c; }
+.ticket-summary .ticket-info-people .titlebox-content { border-left: 0.5em solid #48c; }
 
 %# light green - #ad8
 .ticket-transaction.links { border-color: #316531; }
 .ticket-transaction.links .type { background: #316531; }
-.ticket-summary .ticket-info-links .content  { border-left: 0.5em solid #316531; }
+.ticket-summary .ticket-info-links .titlebox-content  { border-left: 0.5em solid #316531; }
 
 %# orange - #d71
 .ticket-transaction.dates { border-color: #633063; }
 .ticket-transaction.dates .type { background: #633063; }
-.ticket-summary .ticket-info-dates .content  { border-left: 0.5em solid #633063; }
+.ticket-summary .ticket-info-dates .titlebox-content  { border-left: 0.5em solid #633063; }
 
 .ticket-transaction.message { border-color: #069; }
 .ticket-transaction.message .type { background: #069; }
@@ -99,7 +111,7 @@
 }
 
 .ticket-transaction td .message-header-key {
-    padding: 0 1em 0 1em;
+    padding: 0 1em 0 1.5em;
     font-weight: bold;
 }
 
@@ -111,7 +123,7 @@
 
 .ticket-transaction .messagebody {
     clear: both;
-    padding-left: 0.5em;
+    padding-left: 3em;
 }
 
 %# Message stanza colors

Modified: rt/branches/3.5-TESTING/html/NoAuth/js/titlebox-state.js
==============================================================================
--- rt/branches/3.5-TESTING/html/NoAuth/js/titlebox-state.js	(original)
+++ rt/branches/3.5-TESTING/html/NoAuth/js/titlebox-state.js	Mon Jul 25 06:26:34 2005
@@ -20,14 +20,14 @@
         var c = cookies[i].split('=');
         
         if (c[0].match(/^TitleBox--/)) {
-            var e    = document.getElementById(c[0]);
-            var link = document.getElementById(c[0]+"-link");
+            var e   = document.getElementById(c[0]);
+            var e2  = e.parentNode;
 
             if (c[1] != 0) {
-                set_rollup_state(e,link,'shown');
+                set_rollup_state(e,e2,'shown');
             }
             else {
-                set_rollup_state(e,link,'hidden');
+                set_rollup_state(e,e2,'hidden');
             }
         }
     }

Modified: rt/branches/3.5-TESTING/html/NoAuth/js/util.js
==============================================================================
--- rt/branches/3.5-TESTING/html/NoAuth/js/util.js	(original)
+++ rt/branches/3.5-TESTING/html/NoAuth/js/util.js	Mon Jul 25 06:26:34 2005
@@ -1,30 +1,30 @@
 function rollup(id) {
-    var e    = document.getElementById(id);
-    var link = document.getElementById(id+"-link");
+    var e   = document.getElementById(id);
+    var e2  = e.parentNode;
     
     if (e.className.match(/\bhidden\b/)) {
-        set_rollup_state(e,link,'shown');
+        set_rollup_state(e,e2,'shown');
         createCookie(id,1,365);
     }
     else {
-        set_rollup_state(e,link,'hidden');
+        set_rollup_state(e,e2,'hidden');
         createCookie(id,0,365);
     }
     return false;
 }
 
-function set_rollup_state(e,link,state) {
-    if (e && link) {
+function set_rollup_state(e,e2,state) {
+    if (e && e2) {
         if (state == 'shown') {
             show(e);
-            link.className = link.className.replace(/\s?\brolled-up\b/, '');
+            e2.className = e2.className.replace(/\s?\brolled-up\b/, '');
         }
         else if (state == 'hidden') {
             hide(e);
-            if (link.className)
-                link.className += ' rolled-up';
+            if (e2.className)
+                e2.className += ' rolled-up';
             else
-                link.className = 'rolled-up';
+                e2.className = 'rolled-up';
         }
     }
 }
@@ -44,7 +44,7 @@
     e.className = e.className.replace(/\s?\bhidden\b/, '');
 }
 
-function hide(e) {    
+function hide(e) { 
     if (e.className)
         e.className += ' hidden';
     else

Modified: rt/branches/3.5-TESTING/html/Widgets/TitleBoxStart
==============================================================================
--- rt/branches/3.5-TESTING/html/Widgets/TitleBoxStart	(original)
+++ rt/branches/3.5-TESTING/html/Widgets/TitleBoxStart	Mon Jul 25 06:26:34 2005
@@ -44,14 +44,14 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <div class="titlebox<% $class && " $class" %>"<% $id && qq[ id="$id"] |n %>>
-  <div class="title<% $title_class && " $title_class" %>">
+  <div class="titlebox-title<% $title_class && " $title_class" %>">
 % if ($hideable) {
-    <span class="widget"><a href="#" id="<%$tid%>-link" onclick="return rollup('<%$tid%>');" onfocus="this.blur(); return false;" title="Toggle visibility">X</a></span>
+    <span class="widget"><a href="#" onclick="return rollup('<%$tid%>');" onfocus="this.blur(); return false;" title="Toggle visibility">X</a></span>
 % }
     <span class="left"><% $title_href && qq[<a href="$title_href">] | n %><% $title |n %><% $title_href && "</a>" |n%></span>
     <span class="right"><% $titleright_href && qq[<a href="$titleright_href">] | n %><% $titleright |n %><% $titleright_href && "</a>" |n%></span>
   </div>
-  <div class="content<% $bodyclass && " $bodyclass" %>" id="<%$tid%>">
+  <div class="titlebox-content<% $bodyclass && " $bodyclass" %>" id="<%$tid%>">
 
 <%ARGS>
 $width => undef


More information about the Rt-commit mailing list