Skip to content

Commit

Permalink
Merge pull request #40 from littleweaver/chosen
Browse files Browse the repository at this point in the history
Chosen
  • Loading branch information
harrislapiroff committed Apr 21, 2014
2 parents 063f9a7 + ed037e9 commit 2bb721e
Show file tree
Hide file tree
Showing 15 changed files with 2,967 additions and 3 deletions.
10 changes: 8 additions & 2 deletions argus/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,16 @@ class TransactionForm(forms.ModelForm):
class Meta:
model = Transaction
widgets = {
'paid_by': forms.Select,
'paid_to': forms.Select,
'memo': forms.TextInput,
'amount': forms.NumberInput(attrs={'step': 0.01}),
'sharers': forms.CheckboxSelectMultiple,
'paid_at': forms.DateTimeInput,
'category': forms.Select,
'notes': forms.Textarea,
'split': forms.RadioSelect,
}
'sharers': forms.CheckboxSelectMultiple,
}

def __init__(self, group, *args, **kwargs):
super(TransactionForm, self).__init__(*args, **kwargs)
Expand Down
30 changes: 30 additions & 0 deletions argus/sass/styles.sass
Original file line number Diff line number Diff line change
@@ -1,2 +1,32 @@
@import variables
@import bootstrap

@import compass/css3/border-radius

// CHOSEN FIXES
// ------------
// Override jQuery Chosen styles to get it to better integrate with
// Bootstrap 3.
.chosen-container-multi .chosen-choices li.search-field input[type=text]
color: $input-color-placeholder
padding: 6px 12px
height: $input-height-base - 2px

.chosen-container-multi .chosen-choices
border: 1px solid $input-border
+border-radius($input-border-radius)

.chosen-container-active .chosen-choices
border-color: $input-border-focus

.chosen-container .chosen-drop
top: 110%
border: 1px solid $dropdown-border
+border-radius($border-radius-base)
overflow: hidden

.chosen-container-multi .chosen-choices li.search-choice
height: $input-height-base - 10px
margin: 5px 3px
34 changes: 34 additions & 0 deletions argus/static/argus/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -6315,3 +6315,37 @@ button.close {
display: none !important;
}
}
.chosen-container-multi .chosen-choices li.search-field input[type=text] {
color: #999999;
padding: 6px 12px;
height: 32px;
}

.chosen-container-multi .chosen-choices {
border: 1px solid #cccccc;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
}

.chosen-container-active .chosen-choices {
border-color: #66afe9;
}

.chosen-container .chosen-drop {
top: 110%;
border: 1px solid rgba(0, 0, 0, 0.15);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
overflow: hidden;
}

.chosen-container-multi .chosen-choices li.search-choice {
height: 24px;
margin: 5px 3px;
}
1 change: 1 addition & 0 deletions argus/static/argus/js/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$(".chosen-select").chosen({width: "100%"});
Binary file added argus/static/argus/lib/chosen/chosen-sprite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added argus/static/argus/lib/chosen/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2bb721e

Please sign in to comment.