Revision: 1533
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1533&view=rev
Author:   cimorrison
Date:     2010-10-22 10:51:17 +0000 (Fri, 22 Oct 2010)

Log Message:
-----------
Fixed the select box resizing so that they resize themselves before being 
adjusted (otherwise they don't shrink if the content has got narrower)

Modified Paths:
--------------
    mrbs/branches/from_to_bookings/web/Themes/default/header.inc

Modified: mrbs/branches/from_to_bookings/web/Themes/default/header.inc
===================================================================
--- mrbs/branches/from_to_bookings/web/Themes/default/header.inc        
2010-10-22 10:24:46 UTC (rev 1532)
+++ mrbs/branches/from_to_bookings/web/Themes/default/header.inc        
2010-10-22 10:51:17 UTC (rev 1533)
@@ -414,15 +414,18 @@
     // But if you don't set both of them then you end up with a few 
     // pixels difference.  In other words doing a get and then a set 
     // doesn't leave you where you started - not quite sure why.
-    // The +2 is a fudge factor.   Without it the text of the longest
-    // option is slightly truncated - again, not sure why.
+    // The + 2 is a fudge factor to make sure that the option text isn't
+    // truncated - not quite sure why it is necessary.
+    // The width: auto is necessary to get the boxes to resize themselves
+    // according to their new contents.
     ?>
+    $("#start_seconds").css({width: "auto"});
+    $("#end_seconds").css({width: "auto"});
     var startWidth = $("#start_seconds").width();
     var endWidth = $("#end_seconds").width();
     var maxWidth = Math.max(startWidth, endWidth) + 2;
     $("#end_seconds").width(maxWidth);
-    $("#start_seconds").width(maxWidth);
-      
+    $("#start_seconds").width(maxWidth);     
   }
 <?php
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to