function set_border_color() { $border = $this->options->border; // Border color echo __("Color", 'mappress'); echo ": <input type='text' id='mappress_border_color' name='mappress_options[border][color]' value='" . $border['color'] . "' size='10'/>"; // Color wheel $script = "jQuery(document).ready(function() {\r\n\t\t\tjQuery('#mappress_border_color').mappColorpicker({});\r\n\t\t});"; echo Mappress::script($script); // Shadow echo self::checkbox($this->options->border['shadow'], 'mappress_options[border][shadow]', __("Display shadow", 'mappress')); }
/** * Print a single map * * @param mixed $map */ function get_map($map) { // For static maps prepare the pois immediately if (empty($map->query)) { $map->prepare(); } $script = "var mapdata = " . json_encode($map) . ";\r\n" . "window.{$map->name} = new mapp.Map(mapdata); \r\n" . "{$map->name}.display(); "; $html = Mappress::script($script); if ($map->options->directions == 'inline') { $html .= "<div id='{$map->name}_directions_' style='display:none'>"; $html .= $this->get_template($map->options->templateDirections, array('map' => $map)); $html .= "</div>"; } return $html; }
function print_maps() { // If queue is empty there's nothing to do if (empty($this->queue)) { return; } if (class_exists('Mappress_Pro')) { $this->print_map_styles(); } if (isset($this->queue['editor'])) { $script = "window.mappEditor = new mapp.Media();"; echo Mappress::script($script); return; } foreach ($this->queue as $name => $map) { $this->print_map($map); $script = "var mapdata = " . json_encode($map) . ";\r\n" . "window.{$name} = new mapp.Map(mapdata); \r\n" . "{$name}.display(); "; // Workaround for Nextgen plugin, which reverses sequence of wp_enqueue_scripts and wp_print_footer_scripts output if (self::$options->onLoad || class_exists('C_Photocrati_Resource_Manager')) { $script = "jQuery(document).ready(function () { {$script} });"; } echo Mappress::script($script); } }