This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Homepage rollover Functions | |
function imageHilight ($obj) { | |
var imagetochange = $obj.find('img'); | |
imagetochange.attr('src', imagetochange.attr('src').replace(/\.jpg/, '-on.jpg') ); | |
//console.log('imageHilight'); | |
} | |
function imageUnHilight ($obj) { | |
var imagetochange = $obj.find('img'); | |
imagetochange.attr('src', imagetochange.attr('src').replace(/\-on.jpg/, '.jpg') ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin clearfix { | |
&:after, &:before { | |
content: ""; | |
display: table; | |
} | |
&:after { | |
clear: both; | |
} | |
& { | |
*zoom: 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Hide elements visually, but keep them available for screen-readers. | |
// | |
// Used for information required for screen-reader users to understand and use | |
// the site where visual display is undesirable. Information provided in this | |
// manner should be kept concise, to avoid unnecessary burden on the user. | |
// "!important" is used to prevent unintentional overrides. | |
@mixin element-invisible { | |
position: absolute !important; | |
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ | |
clip: rect(1px, 1px, 1px, 1px); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function ds_maps_preprocess_page(&$variables) { | |
//dpm("ds_maps_preprocess_page"); | |
if (isset($variables['node']) && $variables['node']->type == 'map_geojson') { | |
//dpm("map_geojson"); | |
// Add js | |
drupal_add_js(drupal_get_path('module', 'ds_maps') . '/ds_maps.js'); | |
$variables['scripts'] = drupal_get_js(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$.fn.mapBaseFunctions = function() { | |
var ns = ns || {}; // set nameSpace | |
/******************************************* | |
Set your namespaced functions as non global variables, | |
keep the global scope clear to reduce naming clashes and keep memory usage down | |
*******************************************/ | |
// Init Functions | |
ns.mapInit = function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
Drupal.behaviors.maps = { | |
attach:function (context, settings) { | |
// Add legends to each leaflet map instance in Drupal's settings array | |
$(settings.leaflet).each(function() { | |
// Get the map object from the current iteration | |
var map = this.lMap; | |
console.log('this.lMap', map); | |
// Get the geojson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function maps_preprocess_page(&$variables) { | |
//dpm("es_maps_preprocess_page"); | |
// Set full basepath for JS | |
global $base_path; | |
$my_base_path = $GLOBALS['base_url'] . $GLOBALS['base_path'] . drupal_get_path('module', 'es_maps'); | |
//dpm('$my_base_path', $my_base_path); | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(settings.leaflet).each(function() { | |
var geoJsonFile = 'http://' + window.location.hostname + '/geoJSON'; | |
//var geoJsonFile = basePath + '/data/newjson.geojson'; | |
console.log('geoJsonFile PATH', geoJsonFile); | |
// Load the overlay Data - FeatureCollection | |
$.getJSON(geoJsonFile, function(data) { | |
console.log( "getJSON success, data=", data ); | |
weHaveJSONData(data); | |
})//function(data) |
OlderNewer