projects
/
MojoFacets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e783778
)
update checked-count via javascript
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 21 May 2010 17:50:56 +0000
(19:50 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 21 May 2010 17:50:56 +0000
(19:50 +0200)
templates/all_checkboxes.html.ep
patch
|
blob
|
history
diff --git
a/templates/all_checkboxes.html.ep
b/templates/all_checkboxes.html.ep
index
0e46343
..
11cfbe9
100644
(file)
--- a/
templates/all_checkboxes.html.ep
+++ b/
templates/all_checkboxes.html.ep
@@
-21,18
+21,30
@@
$('label span.hint').position({
$('a#all').click( function(){
$("input[type='checkbox']:not([disabled='disabled'])").attr('checked', true);
$('a#all').click( function(){
$("input[type='checkbox']:not([disabled='disabled'])").attr('checked', true);
+ $('#checked-count').text( $('#facet-count').text() );
});
$('a#none').click( function(){
$("input[type='checkbox']:not([disabled='disabled'])").attr('checked', false);
});
$('a#none').click( function(){
$("input[type='checkbox']:not([disabled='disabled'])").attr('checked', false);
+ $('#checked-count').text( '-' );
});
$('a#included').click( function(){
});
$('a#included').click( function(){
- $("label.included input[type='checkbox']:not([disabled='disabled'])").attr('checked', true);
+ var count = 0;
+ $("label.included input[type='checkbox']:not([disabled='disabled'])").each( function() {
+ this.checked = true;
+ count++;
+ });
+ $('#checked-count').text( count );
}).hide();
$('a#excluded').click( function(){
}).hide();
$('a#excluded').click( function(){
- $("label.excluded input[type='checkbox']:not([disabled='disabled'])").attr('checked', true);
+ var count = 0;
+ $("label.excluded input[type='checkbox']:not([disabled='disabled'])").each( function() {
+ this.checked = true;
+ count++;
+ });
+ $('#checked-count').text( count );
}).hide();
$('input[name=filter_regex]').change( function(e) {
}).hide();
$('input[name=filter_regex]').change( function(e) {