web: leave date field blank, avoid problems (#322)
This commit is contained in:
		
							parent
							
								
									7ec3ebb66b
								
							
						
					
					
						commit
						3739f0e364
					
				| @ -339,7 +339,7 @@ addform _ vd@VD{..} = [hamlet| | |||||||
|      <table style="width:100%;"> |      <table style="width:100%;"> | ||||||
|       <tr#descriptionrow> |       <tr#descriptionrow> | ||||||
|        <td> |        <td> | ||||||
|         <input #date        .typeahead .form-control .input-lg type=text size=15 name=date placeholder="Date" value=#{defdate}> |         <input #date        .typeahead .form-control .input-lg type=text size=15 name=date placeholder="Date" value="#{defdate}"> | ||||||
|        <td> |        <td> | ||||||
|         <input #description .typeahead .form-control .input-lg type=text size=40 name=description placeholder="Description"> |         <input #description .typeahead .form-control .input-lg type=text size=40 name=description placeholder="Description"> | ||||||
|    $forall n <- postingnums |    $forall n <- postingnums | ||||||
| @ -351,7 +351,7 @@ addform _ vd@VD{..} = [hamlet| | |||||||
|      (or ctrl +, ctrl -) |      (or ctrl +, ctrl -) | ||||||
| |] | |] | ||||||
|  where |  where | ||||||
|   defdate = "today" :: String |   defdate = "" :: String -- #322 don't set a default, typeahead(?) clears it on tab. See also hledger.js | ||||||
|   dates = ["today","yesterday","tomorrow"] :: [String] |   dates = ["today","yesterday","tomorrow"] :: [String] | ||||||
|   descriptions = sort $ nub $ map tdescription $ jtxns j |   descriptions = sort $ nub $ map tdescription $ jtxns j | ||||||
|   accts = sort $ journalAccountNamesUsed j |   accts = sort $ journalAccountNamesUsed j | ||||||
|  | |||||||
| @ -136,7 +136,7 @@ function addformReset(showmsg) { | |||||||
|     // reset typehead state (though not fetched completions)
 |     // reset typehead state (though not fetched completions)
 | ||||||
|     $('.typeahead').typeahead('val', ''); |     $('.typeahead').typeahead('val', ''); | ||||||
|     $('.tt-dropdown-menu').hide(); |     $('.tt-dropdown-menu').hide(); | ||||||
|     $('input#date').val('today'); |     $('input#date').val(''); // #322 don't set a default, typeahead(?) clears it on tab. See also Foundation.hs
 | ||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user