Difference between revisions of "Widget:RAPID-Transclude"

From Open Energy Information

(adding canadian abbr)
(if statement for defineHydroFilters)
Line 307: Line 307:
  
 
               //build hydropower filters
 
               //build hydropower filters
               defineHydroFilters();
+
               if(defineHydroFilters){
              $('span.hydro-filter').click(function(){
+
                defineHydroFilters();
                $('span.hydro-filter').removeClass('active');
+
                $('span.hydro-filter').click(function(){
                $(this).addClass('active');
+
                  $('span.hydro-filter').removeClass('active');
                applyHydroFilter();
+
                  $(this).addClass('active');
              });
+
                  applyHydroFilter();
 +
                });
 +
              }
  
 
               //Expand all narrative-blocks for print pdf option
 
               //Expand all narrative-blocks for print pdf option

Revision as of 10:05, 20 August 2019

This template performs an ajax request for RAPID Tech/Jurisdiction/Topic pages, based on their related Roadmap Overview page. It is called by [[:Template:RAPID-Overview(Tech-Jurisdiction-Topic). See RAPID/Geothermal/California/Land Use as an example.

The template "[transcludes]" information from the right column, the overview and the narrative from pages like RAPID/Roadmap/3 and imports it to the page using the above template (such as RAPID/Geothermal/California/Land Use). It also removes any links/buttons that are not related to the current page's jurisdiction.