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

trs at bestpractical.com trs at bestpractical.com
Sat Jul 16 17:16:16 EDT 2005


Author: trs
Date: Sat Jul 16 17:16:15 2005
New Revision: 3483

Modified:
   rt/branches/3.5-TESTING/   (props changed)
   rt/branches/3.5-TESTING/html/NoAuth/css/forms.css
   rt/branches/3.5-TESTING/html/NoAuth/js/combobox.js
   rt/branches/3.5-TESTING/html/Widgets/ComboBox
Log:
 r5013 at wintermute:  tom | 2005-07-16 17:14:50 -0400
 RT-Ticket: 6821
 RT-Status: resolved
 RT-Update: correspond
 
 Pulled most of the styles out of the JS and into the forms CSS.  I had a few classes to the HTML.
 
 The combo box should probably be revamped at some point to use CSS positioning instead of JS, but that's a really minor nit.


Modified: rt/branches/3.5-TESTING/html/NoAuth/css/forms.css
==============================================================================
--- rt/branches/3.5-TESTING/html/NoAuth/css/forms.css	(original)
+++ rt/branches/3.5-TESTING/html/NoAuth/css/forms.css	Sat Jul 16 17:16:15 2005
@@ -100,4 +100,30 @@
     padding: 0.25em;
 }
 
+%# ComboBox styles... some properties like height and width must be dynamically
+%# set in the JS (at least for now).
+.combobox {
+    border: 2px inset #069;
+    padding-left: 0.5em;
+    padding-bottom: 0.1em;
+}
+
+.combobox .combo-button {
+    padding: 0 2px 0 2px;
+    margin: 0;
+    background: ButtonFace;
+    color: ButtonText;
+    border: 2px outset ButtonHighlight;
+    cursor: default;
+    font-size: 8pt;
+}
 
+.combobox .combo-text {
+    border: none;
+    margin: 0;
+    padding: 0;
+}
+
+.combobox .combo-list {
+    z-index: 200;
+}

Modified: rt/branches/3.5-TESTING/html/NoAuth/js/combobox.js
==============================================================================
--- rt/branches/3.5-TESTING/html/NoAuth/js/combobox.js	(original)
+++ rt/branches/3.5-TESTING/html/NoAuth/js/combobox.js	Sat Jul 16 17:16:15 2005
@@ -32,32 +32,20 @@
     combo.List = list;
     combo.Button = button;
     combo.Text = text;
-    combo.style.border = "2px inset ButtonFace";
-    combo.style.padding = "0px";
-    combo.style.margin = "0px";
     
     button.Container = combo;
     button.Toggle = ComboBox_ToggleList;
     button.onclick = button.Toggle;
     button.onmouseover = function(e) { this.Container.List.DisableBlur(e); };
     button.onmouseout = function(e) { this.Container.List.EnableBlur(e); };
-    button.style.padding = "0px";
-    button.style.margin = "0px";
-    button.style.background = "ButtonFace";
-    button.style.color = "ButtonText";
-    button.style.borderLeft = "1px outset ButtonFace";
-    button.style.cursor = "default";
-    button.style.fontSize = "8pt";
     button.innerHTML = "\u25BC";
     button.onselectstart = function(e){ return false; };
+    button.style.height = ( list.offsetHeight - 4 ) + "px";
     
     text.Container = combo;
     text.TypeDown = ComboBox_TextTypeDown;
     text.KeyAccess = ComboBox_TextKeyAccess;
     text.onkeyup = function(e) { this.KeyAccess(e); this.TypeDown(e); };
-    text.style.border = "none";
-    text.style.margin = "0px";
-    text.style.padding = "0px";
     text.style.width = ( list.offsetWidth ) + "px";
     
     list.Container = combo;
@@ -74,7 +62,6 @@
     list.onkeyup = function(e) { this.KeyAccess(e); };
     list.EnableBlur(null);
     list.style.position = "absolute";
-    list.style.zIndex = 200;
     list.size = ComboBox_GetListSize( list );
     list.IsShowing = true;
     list.Hide();
@@ -187,7 +174,7 @@
     if ( !this.IsShowing && !this.disabled ) {
         this.style.width = ( this.Container.offsetWidth ) + "px";
         this.style.top = ( this.Container.offsetHeight + ComboBox_RecursiveOffsetTop(this.Container,true) ) + "px";
-        this.style.left = ( ComboBox_RecursiveOffsetLeft(this.Container,true) ) + "px";
+        this.style.left = ( ComboBox_RecursiveOffsetLeft(this.Container,true) + 1 ) + "px";
         ComboBox_SetVisibility(this,true);
         this.focus();
         this.IsShowing = true;

Modified: rt/branches/3.5-TESTING/html/Widgets/ComboBox
==============================================================================
--- rt/branches/3.5-TESTING/html/Widgets/ComboBox	(original)
+++ rt/branches/3.5-TESTING/html/Widgets/ComboBox	Sat Jul 16 17:16:15 2005
@@ -46,9 +46,9 @@
 <nobr>
 <script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/combobox.js"></script>
 
-<span id="<% $Name %>_Container">
-<input name="<% $Name %>" id="<% $Name %>" value="<% $Default %>" type="text" <% $Size ? "size='$Size'" : '' |n %> autocomplete="off" />
-<br style="display: none"><span id="<% $Name %>_Button"></span></span><select name="List-<% $Name %>" id="<% $Name %>_List" onchange="ComboBox_SimpleAttach(this, this.form['<% $Name %>']); " rows="<% $Rows %>">
+<span id="<% $Name %>_Container" class="combobox">
+<input name="<% $Name %>" id="<% $Name %>" class="combo-text" value="<% $Default %>" type="text" <% $Size ? "size='$Size'" : '' |n %> autocomplete="off" />
+<br style="display: none" /><span id="<% $Name %>_Button" class="combo-button"></span></span><select name="List-<% $Name %>" id="<% $Name %>_List" class="combo-list" onchange="ComboBox_SimpleAttach(this, this.form['<% $Name %>']); " rows="<% $Rows %>">
 <option style="display: none" value="">-</option>
 % foreach my $value (@Values) {
         <option value="<%$value%>"><% $value%></option>


More information about the Rt-commit mailing list