Difference between revisions of "Widget:RAPIDFilter"

From Open Energy Information

(update hydro type functionality)
(update var name and remove commented out function)
Line 509: Line 509:
 
       }
 
       }
 
       showVals.push('noHydroType');
 
       showVals.push('noHydroType');
       foo = $(el).data('hydroType').split(', ');
+
       hType = $(el).data('hydroType').split(', ');
       for(h=0;h<foo.length;h++)
+
       for(h=0;h<hType.length;h++)
         if(in_array(foo[h], showVals)){
+
         if(in_array(hType[h], showVals)){
 
           return true;
 
           return true;
 
         }
 
         }
 
       return false;
 
       return false;
 
     }
 
     }
    /*if(hydroProjectTypeValues.length>=1){
 
      foo = $(el).data('hydroType').split(', ');
 
      console.log(foo);
 
      if(in_array(foo, showVals)){
 
        return true;
 
      }
 
      return false;
 
    }*/
 
 
     return true;
 
     return true;
 
   }
 
   }

Revision as of 14:39, 19 July 2019

This widget is used to filter regulatory roadmap sections for the RAPID Regulatory Roadmap page.