Browse files

delete content of datepickers with a button

Signed-off-by: Balint Erdi <balint.erdi@gmail.com>
  • Loading branch information...
1 parent 2d10dc7 commit 71cf939448512958b80c2b87290aea7d4e62e5f3 @balinterdi committed Mar 16, 2009
Showing with 20 additions and 5 deletions.
  1. +5 −2 todos.markdown
  2. +8 −0 views/expenses.haml
  3. +7 −3 views/main.sass
View
7 todos.markdown
@@ -2,9 +2,10 @@
## Short-term
-* revisit layout of the expenses page (Total amount is too close to the date filters)
-* check layout of the date selectors on expensese page in Safari (looks ugly now)
+* fix layout when subject of expense is too long
+* buttons to delete dates and to select all tags/none
* add README
+* make everything UTF-8 encoded
* make a form builder for the commonly used form (ul-li-label-input)
## Long-term
@@ -13,6 +14,8 @@
# DONE
+* revisit layout of the expenses page (Total amount is too close to the date filters)
+* check layout of the date selectors on expensese page in Safari (looks ugly now)
* make layout of the login and register pages nice
* correct the '/' action (gives error on 'name')
* get rid of the Pot model
View
8 views/expenses.haml
@@ -39,6 +39,11 @@
$(document).ready(function() {
$(".expense_date").datepicker({ firstDay : 1, showButtonPanel : true });
+ $("#delete-dates").click(function(){
+ $.each($(".expense_date"), function() {
+ $(this).val('');
+ })
+ })
$(".expense_date").change(function() {
updateExpenseList();
});
@@ -61,6 +66,9 @@
#to-label To
#to-input
%input.expense_date#spent-at-to
+ #dates-buttons
+ #delete-dates
+ %button#delete-dates{ :type => "button" } Delete
#expenses
%ul#expenses-list
View
10 views/main.sass
@@ -149,25 +149,29 @@ div#expenses
:margin-right 10px
:text-align right
#to-input
+ #dates-buttons
+ +float-align-right
+ :margin-left 5px
ul#expenses-list
:list-style-type none
li
:clear both
- :width 500px
+ :width 600px
.amount
+float-align-left
:width 20%
:color red
.subject
+float-align-left
- :width 20%
+ :width 40%
+ :overflow hidden
.spent_at
+float-align-left
:width 20%
.links
+float-align-right
- :width 40%
+ :width 20%
#sum
:width 200px

0 comments on commit 71cf939

Please sign in to comment.