web/data/cubicweb.formfilter.js
changeset 2012 64c82e15fa98
parent 1894 c41c539b8f34
child 2013 5d30ad652e82
equal deleted inserted replaced
2010:c594323929cb 2012:64c82e15fa98
   101 }
   101 }
   102 
   102 
   103 
   103 
   104 var SELECTED_IMG = baseuri()+"data/black-check.png";
   104 var SELECTED_IMG = baseuri()+"data/black-check.png";
   105 var UNSELECTED_IMG = baseuri()+"data/no-check-no-border.png";
   105 var UNSELECTED_IMG = baseuri()+"data/no-check-no-border.png";
   106 var UNSELECTED_BORDER_IMG = baseuri()+"data/black-unchecked.png";
   106 var UNSELECTED_BORDER_IMG = baseuri()+"data/black-uncheck.png";
   107 
   107 
   108 function initFacetBoxEvents(root) {
   108 function initFacetBoxEvents(root) {
   109     // facetargs : (divid, vid, paginate, extraargs)
   109     // facetargs : (divid, vid, paginate, extraargs)
   110     root = root || document;
   110     root = root || document;
   111     jQuery(root).find('form').each(function () {
   111     jQuery(root).find('form').each(function () {
   131 			$this.find('img').each(function (i){
   131 			$this.find('img').each(function (i){
   132 			if (this.getAttribute('cubicweb:unselimg')){
   132 			if (this.getAttribute('cubicweb:unselimg')){
   133 			       this.setAttribute('src', UNSELECTED_BORDER_IMG);
   133 			       this.setAttribute('src', UNSELECTED_BORDER_IMG);
   134 			    }
   134 			    }
   135 			    else{
   135 			    else{
   136                              this.setAttribute('src', UNSELECTED_IMG);
   136 			       this.setAttribute('src', UNSELECTED_IMG);
   137 			    }
   137 			    }
   138 			});
   138 			});
   139 			var index = parseInt($this.attr('cubicweb:idx'));
   139 			var index = parseInt($this.attr('cubicweb:idx'));
   140 			var shift = jQuery.grep(facet.find('.facetValueSelected'), function (n) {
   140 			var shift = jQuery.grep(facet.find('.facetValueSelected'), function (n) {
   141 			    var nindex = parseInt(n.getAttribute('cubicweb:idx'));
   141 			    var nindex = parseInt(n.getAttribute('cubicweb:idx'));