equal
deleted
inserted
replaced
179 if ($this.hasClass('facetValueSelected')) { |
179 if ($this.hasClass('facetValueSelected')) { |
180 $this.removeClass('facetValueSelected'); |
180 $this.removeClass('facetValueSelected'); |
181 $this.find('img').each(function(i) { |
181 $this.find('img').each(function(i) { |
182 if (this.getAttribute('cubicweb:unselimg')) { |
182 if (this.getAttribute('cubicweb:unselimg')) { |
183 this.setAttribute('src', UNSELECTED_BORDER_IMG); |
183 this.setAttribute('src', UNSELECTED_BORDER_IMG); |
184 this.setAttribute('alt', (_('not selected'))); |
184 this.setAttribute('alt', (_("not selected"))); |
185 } |
185 } |
186 else { |
186 else { |
187 this.setAttribute('src', UNSELECTED_IMG); |
187 this.setAttribute('src', UNSELECTED_IMG); |
188 this.setAttribute('alt', (_('not selected'))); |
188 this.setAttribute('alt', (_("not selected"))); |
189 } |
189 } |
190 }); |
190 }); |
191 var index = parseInt($this.attr('cubicweb:idx')); |
191 var index = parseInt($this.attr('cubicweb:idx')); |
192 // we dont need to move the element when cubicweb:idx == 0 |
192 // we dont need to move the element when cubicweb:idx == 0 |
193 if (index > 0) { |
193 if (index > 0) { |
211 var parent = this.parentNode; |
211 var parent = this.parentNode; |
212 jQuery(parent).prepend(this); |
212 jQuery(parent).prepend(this); |
213 } |
213 } |
214 jQuery(this).addClass('facetValueSelected'); |
214 jQuery(this).addClass('facetValueSelected'); |
215 var $img = jQuery(this).find('img'); |
215 var $img = jQuery(this).find('img'); |
216 $img.attr('src', SELECTED_IMG).attr('alt', (_('selected'))); |
216 $img.attr('src', SELECTED_IMG).attr('alt', (_("selected"))); |
217 } |
217 } |
218 buildRQL.apply(null, jsfacetargs); |
218 buildRQL.apply(null, jsfacetargs); |
219 facet.find('.facetBody').animate({ |
219 facet.find('.facetBody').animate({ |
220 scrollTop: 0 |
220 scrollTop: 0 |
221 }, |
221 }, |