From 3b6f3fc4b2fa3bdc4e7c4435d73df60332000d42 Mon Sep 17 00:00:00 2001 From: Steve Wirt Date: Wed, 26 Mar 2014 12:51:59 -0400 Subject: [PATCH] issue#67 circumvent datastore pagination on state by state maps --- choropleth.module | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/choropleth.module b/choropleth.module index 82ed638..de1d1f4 100644 --- a/choropleth.module +++ b/choropleth.module @@ -80,6 +80,12 @@ function choropleth_default_formatter_output($variables) { if (isset($variables['item']['choropleth_data_column']) || isset($variables['item']['choropleth_breakpoints']) || isset($variables['item']['choropleth_color_scale'])) { ctools_include('choropleth', 'choropleth', ''); $choropleth = $variables['item']['choropleth'] ? $variables['item']['choropleth'] : ''; + // If this is a choropleth view, we need all the data from the resource + // so we can not use the paginated data if it is coming from the datastore. + // This sets the Drupal.settings to not use the datastore. + if ($choropleth) { + drupal_add_js('if (typeof Drupal.settings.recline.dkan != \'undefined\') { Drupal.settings.recline.dkan = false; }', array('type' => 'inline', 'scope' => 'footer')); + } $choropleth_colors = choropleth_color_scale_settings(); $choropleth_colors_index = isset($variables['item']['choropleth_color_scale']) ? (int) $variables['item']['choropleth_color_scale'] : 0; $settings['choropleth'] = array(