--- a/web/data/cubicweb.formfilter.js Tue Jul 07 11:13:09 2009 +0200
+++ b/web/data/cubicweb.formfilter.js Wed Jul 08 10:34:31 2009 +0200
@@ -131,9 +131,11 @@
$this.find('img').each(function (i){
if (this.getAttribute('cubicweb:unselimg')){
this.setAttribute('src', UNSELECTED_BORDER_IMG);
+ this.setAttribute('alt', (_('not selected')));
}
else{
this.setAttribute('src', UNSELECTED_IMG);
+ this.setAttribute('alt', (_('not selected')));
}
});
var index = parseInt($this.attr('cubicweb:idx'));
@@ -144,10 +146,11 @@
index += shift;
var parent = this.parentNode;
var $insertAfter = jQuery(parent).find('.facetCheckBox:nth('+index+')');
- if ( ! ($insertAfter.length == 1 && index == 0) ) {
+ if ( ! ($insertAfter.length == 1 && shift == 0) ) {
// only rearrange element if necessary
$insertAfter.after(this);
- }
+ }else{
+ }
} else {
var lastSelected = facet.find('.facetValueSelected:last');
if (lastSelected.length) {
@@ -157,7 +160,10 @@
jQuery(parent).prepend(this);
}
jQuery(this).addClass('facetValueSelected');
- jQuery(this).find('img').attr('src', SELECTED_IMG);
+ var img = jQuery(this).find('img');
+ img.attr('src', SELECTED_IMG);
+ img.attr('alt', (_('selected')));
+
}
buildRQL.apply(null, evalJSON(form.attr('cubicweb:facetargs')));
facet.find('.facetBody').animate({scrollTop: 0}, '');