Shrinksafe complains during compression of map JS fixed.
authorMario Ferraro <fadinlight@gmail.com>
Thu, 17 Sep 2009 17:25:41 +0200
changeset 2938 062d5ddb15b7
parent 2937 2252dc0be5db
child 2939 415a7c2866fd
Shrinksafe complains during compression of map JS fixed. It comes that "long" can't be used as a variable name as we did, because Shrinksafe complains that "long" is a reserved keyword.
app/soc/content/js/map-090825.js
app/soc/views/models/organization.py
--- a/app/soc/content/js/map-090825.js	Thu Sep 17 17:15:10 2009 +0200
+++ b/app/soc/content/js/map-090825.js	Thu Sep 17 17:25:41 2009 +0200
@@ -235,7 +235,7 @@
           students[key] = {
             "name": person.name,
             "lat": person.lat,
-            "long": person.long,
+            "lon": person.lon,
             "projects": person.projects
           };
         }
@@ -243,7 +243,7 @@
           mentors[key] = {
             "name": person.name,
             "lat": person.lat,
-            "long": person.long,
+            "lon": person.lon,
             "projects": person.projects
           };
         }
@@ -256,13 +256,13 @@
         if (current_student !== undefined && 
             current_mentor !== undefined &&
             current_student.lat !== null &&
-            current_student.long !== null &&
+            current_student.lon !== null &&
             current_mentor.lat !== null &&
-            current_mentor.long !== null) {
+            current_mentor.lon !== null) {
               /*jslint white: false */
               polylines.push([
-                [current_student.lat, current_student.long],
-                [current_mentor.lat, current_mentor.long]
+                [current_student.lat, current_student.lon],
+                [current_mentor.lat, current_mentor.lon]
               ]);
               /*jslint white: true */
         }
@@ -273,8 +273,8 @@
         var html = "";
         var marker = null;
 
-        if (person.lat !== null && person.long !== null) {
-          var point = new window.GLatLng(person.lat, person.long);
+        if (person.lat !== null && person.lon !== null) {
+          var point = new window.GLatLng(person.lat, person.lon);
 
           marker = new window.GMarker(point, student_icon);
           html = [
@@ -306,8 +306,8 @@
         var html = "";
         var marker = null;
 
-        if (person.lat !== null && person.long !== null) {
-          var point = new window.GLatLng(person.lat, person.long);
+        if (person.lat !== null && person.lon !== null) {
+          var point = new window.GLatLng(person.lat, person.lon);
 
           marker = new window.GMarker(point, mentor_icon);
           html = [
--- a/app/soc/views/models/organization.py	Thu Sep 17 17:15:10 2009 +0200
+++ b/app/soc/views/models/organization.py	Thu Sep 17 17:25:41 2009 +0200
@@ -20,6 +20,7 @@
 __authors__ = [
     '"Madhusudan.C.S" <madhusudancs@gmail.com>',
     '"Augie Fackler" <durin42@gmail.com>',
+    '"Mario Ferraro" <fadinlight@gmail.com>',
     '"Sverre Rabbelier" <sverre@rabbelier.nl>',
     '"Lennard de Rijk" <ljvderijk@gmail.com>',
   ]
@@ -474,7 +475,7 @@
               'type': 'mentor',
               'name': mentor_entity.name(),
               'lat': mentor_entity.latitude,
-              'long': mentor_entity.longitude,
+              'lon': mentor_entity.longitude,
               'projects': []
               }
 
@@ -488,7 +489,7 @@
               'type': 'student',
               'name': student_entity.name(),
               'lat': student_entity.latitude,
-              'long': student_entity.longitude,
+              'lon': student_entity.longitude,
               'projects': [],
               }