Mercurial > hg > mpiwg_geobrowser
view plugins/content_types/mpiwg_geobrowser_table.inc @ 3:19f75fe342eb
minor changes
author | Dirk Wintergruen <dwinter@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 12 Oct 2015 08:33:28 +0200 |
parents | b57c7821382f |
children |
line wrap: on
line source
<?php $plugin = array( 'single' => TRUE, 'title' => t('table'), 'description' => t('shows the table.'), 'category' => t('mpiwg geobrowser'), 'edit form' => 'mpiwg_geobrowser_mpiwg_geobrowser_table_edit_form', 'render callback' => 'mpiwg_geobrowser_mpiwg_geobrowser_table_render', 'admin info' => 'mpiwg_geobrowser_mpiwg_geobrowser_table_admin_info', 'defaults' => array() ); function mpiwg_geobrowser_mpiwg_geobrowser_table_render($subtype, $conf, $panel_args, $context = NULL) { $block = new stdClass(); // initial content is blank $block->title = ''; $block->content = ''; // Add in the content $block->content .= ' <div id="tableContainerDiv" style="position:relative;"></div> <script type="text/javascript"> if (typeof TableWidget_l=="undefined") { var table = null; var tableWidget = null; var mpiwg_geobrowser_tableInitialized = false; mpiwg_geobrowser_widgetsCount++; jq1110(document).ready(function() { if (mpiwg_geobrowser_tableInitialized == false) { var tableDiv = document.getElementById("tableContainerDiv"); if (tableDiv) { table = new WidgetWrapper(); tableWidget = new TableWidget(table,tableDiv); table.display(); } mpiwg_geobrowser_tableInitialized = true; document.dispatchEvent(widgetLoadedEvent); } }); TableWidget_l=true; } </script> '; return $block; } function mpiwg_geobrowser_mpiwg_geobrowser_table_admin_info($subtype, $conf, $contexts) { if (!empty($conf)) { $block = new stdClass; $block->title = 'map'; $block->content = t('showing the basic map.'); return $block; } } function mpiwg_geobrowser_mpiwg_geobrowser_table_edit_form($form, &$form_state) { return $form; } function mpiwg_geobrowser_mpiwg_geobrowser_table_edit_form_submit($form, &$form_state) { foreach (array_keys($form_state['plugin']['defaults']) as $key) { if (isset($form_state['values'][$key])) { $form_state['conf'][$key] = $form_state['values'][$key]; } } }