Author: jim
Date: Tue Jun 10 15:14:54 2014
New Revision: 1601666

URL: http://svn.apache.org/r1601666
Log:
Make field size 2 (to allow for 10+ seats)
Right now we can do it, but the field just shows the
'1' and not, eg, '12' (or whatever)

Modified:
    steve/trunk/whatif.rb

Modified: steve/trunk/whatif.rb
URL: 
http://svn.apache.org/viewvc/steve/trunk/whatif.rb?rev=1601666&r1=1601665&r2=1601666&view=diff
==============================================================================
--- steve/trunk/whatif.rb (original)
+++ steve/trunk/whatif.rb Tue Jun 10 15:14:54 2014
@@ -134,7 +134,7 @@ _html do
 
       _label_ for: 'seats' do
         _span 'seats:'
-        _input name: 'seats', id: 'seats', value: @seats, size: 1
+        _input name: 'seats', id: 'seats', value: @seats, size: 2
       end
 
       _input type: 'submit', value: 'submit', name: 'submit'
@@ -178,7 +178,7 @@ _html do
         return refresh();
       }));
       seats.after($('<button>&#x21D1;</button>').click(function() {
-        if (seats.val()<$(':checkbox').length) {seats.val(seats.val()-0+1);}
+        if (seats.val()<1) {seats.val(seats.val()-0+1);}
         return refresh();
       }));
     }


Reply via email to