summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThe Great Git Migration2010-02-04 19:14:03 (GMT)
committer The Great Git Migration2010-02-04 19:14:03 (GMT)
commit7ebab1bc52acc017cf413d7ba0d3dfaad23017de (patch)
treedefae13e1f501ff3a5735fe47ace6a8268bc0822
parentad4bc22d16cd569d61cd422b8ceeeac8de90dc56 (diff)
This commit was manufactured as part of Drupal's Great Git Migration to6.x-1.0-beta2
create tag 'DRUPAL-6--1-0-BETA2'. Sprout from DRUPAL-6--2 2010-02-04 19:14:02 UTC Tom MacWright <tmcw@12664.no-reply.drupal.org> 'DRUPAL-6--2 branch with OpenLayers 2.x compatibility' Delete: js/geotaxonomy.admin.js
-rw-r--r--js/geotaxonomy.admin.js76
1 files changed, 0 insertions, 76 deletions
diff --git a/js/geotaxonomy.admin.js b/js/geotaxonomy.admin.js
deleted file mode 100644
index b45e4f2..0000000
--- a/js/geotaxonomy.admin.js
+++ /dev/null
@@ -1,76 +0,0 @@
-// $Id$
-
-/**
- * Drupal behaviors for Geotaxonomy UI form.
- */
-Drupal.behaviors.geotaxonomy = function(context) {
- // Update map positioning when text fields are changed.
- $("#edit-lat:not(.geotaxonomy-ui-processed), $edit-lon:not(.geotaxonomy-ui-processed)").each(function() {
- $(this).addClass('geotaxonomy-ui-processed');
- $(this).change(function() {
- Drupal.geotaxonomy.updateMapCenter();
- });
- });
-
- // Run once on load.
- Drupal.geotaxonomy.updateMapCenter();
-}
-
-/**
- * Register form center value updating events.
- */
-Drupal.behaviors.geotaxonomy_center = function(context) {
- var data = $(context).data('openlayers');
- if (data) {
- data.openlayers.events.register('moveend', data.map, function() { Drupal.geotaxonomy.updateCenterFormValues(data.openlayers) });
- }
-}
-
-/**
- * Helper functions.
- */
-Drupal.geotaxonomy = {
-
- /**
- * Update the center of the helpmap using the values from the form
- *
- * Take the center lat, lon and zoom values from the form and update
- * the helper map.
- */
- 'updateMapCenter': function() {
- var data = $('#geotaxonomy-latlon-helpmap').data('openlayers');
- if (data) {
- var lat = $('#geotaxonomy-form-lat').val();
- var lon = $('#geotaxonomy-form-lon').val();
-
- // Check for lat and lon
- if (lat != '' && lon != '') {
- // Create new center
- var center = new OpenLayers.LonLat(lon, lat);
- // Set center of map.
- data.openlayers.setCenter(center);
- }
- }
- },
-
- /**
- * Event callback for updating center form field values when map is dragged or zoomed.
- */
- 'updateCenterFormValues': function() {
- var data = $('#geotaxonomy-latlon-helpmap').data('openlayers');
-
- if (data) {
-
- var helpmap = data.openlayers;
- var center = helpmap.getCenter();
-
- // Get new lat and lon
- var lat = center.lat;
- var lon = center.lon;
-
- // Set new values
- $('#edit-lat').val(lat);
- $('#edit-lon').val(lon);
- }
- }
-} \ No newline at end of file