aboutsummaryrefslogtreecommitdiffstats
path: root/phonegap/www
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-06-15 15:01:05 +0100
committerStruan Donald <struan@exo.org.uk>2012-06-15 15:01:05 +0100
commit925232a1e48850ab1c5087fe555d7dc71496d726 (patch)
tree8a048416507820b1eb54f4b9ce69fa6b2eefdea2 /phonegap/www
parentcc1aa4a6676db38eabed168327941c6aa93b4654 (diff)
fix jslint issues and remove unused js files
Diffstat (limited to 'phonegap/www')
-rw-r--r--phonegap/www/js/map-bing.js2
-rw-r--r--phonegap/www/js/map-google.js4
-rw-r--r--phonegap/www/js/southampton.js2
-rw-r--r--phonegap/www/jslib/utils.js50
4 files changed, 4 insertions, 54 deletions
diff --git a/phonegap/www/js/map-bing.js b/phonegap/www/js/map-bing.js
index 856e4f188..715a8efc9 100644
--- a/phonegap/www/js/map-bing.js
+++ b/phonegap/www/js/map-bing.js
@@ -17,6 +17,6 @@ $(function(){
Microsoft.Maps.Events.addHandler(map, "viewchangestart", function(e) {
/* Doesn't work */
- if (map.getTargetZoom() < 12) return false;
+ if (map.getTargetZoom() < 12) { return false; }
});
});
diff --git a/phonegap/www/js/map-google.js b/phonegap/www/js/map-google.js
index 742b55d47..7da21ba09 100644
--- a/phonegap/www/js/map-google.js
+++ b/phonegap/www/js/map-google.js
@@ -16,7 +16,7 @@ $(function(){
});
google.maps.event.addListener(map, "zoom_changed", function() {
- if (map.getZoom() < 13) map.setZoom(13);
- if (map.getZoom() > 17) map.setZoom(17);
+ if (map.getZoom() < 13) { map.setZoom(13); }
+ if (map.getZoom() > 17) { map.setZoom(17); }
});
});
diff --git a/phonegap/www/js/southampton.js b/phonegap/www/js/southampton.js
index 1f3e16105..e7af4fcaf 100644
--- a/phonegap/www/js/southampton.js
+++ b/phonegap/www/js/southampton.js
@@ -15,7 +15,7 @@ $(function(){
}
}).blur(function(){
var input = $(this);
- if (input.val() == '' || input.val() == input.attr('placeholder')) {
+ if (input.val() === '' || input.val() == input.attr('placeholder')) {
input.css({ 'color': '#999999' });
input.val(input.attr('placeholder'));
}
diff --git a/phonegap/www/jslib/utils.js b/phonegap/www/jslib/utils.js
deleted file mode 100644
index ffc6d44bd..000000000
--- a/phonegap/www/jslib/utils.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * utils.js
- * Useful javascript functions, shared between mySociety sites.
- *
- * Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved.
- * Email: francis@mysociety.org. WWW: http://www.mysociety.org
- *
- * $Id: utils.js,v 1.3 2006-10-10 15:53:05 matthew Exp $
- *
- */
-
-mySociety = {
- /* Returns an XMLHTTP object, if available.
- * Returns false if XMLHTTP not supported. */
- getXMLHTTP : function() {
- var xmlhttp=false;
- /*@cc_on @*/
- /*@if (@_jscript_version >= 5)
- // JScript gives us Conditional compilation, we can cope with old IE versions.
- // and security blocked creation of the objects.
- try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }
- catch (e) {
- try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }
- catch (E) { xmlhttp = false; }
- }
- @end @*/
- if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
- try { xmlhttp = new XMLHttpRequest(); }
- catch (e) { xmlhttp=false; }
- }
- if (!xmlhttp && window.createRequest) {
- try { xmlhttp = window.createRequest(); }
- catch (e) { xmlhttp=false; }
- }
- return xmlhttp;
- },
-
- asyncRequest : function(url, func) {
- var xmlhttp = mySociety.getXMLHTTP();
- if (!xmlhttp)
- return false;
- xmlhttp.open('GET', url, true);
- xmlhttp.onreadystatechange = function() {
- func(xmlhttp);
- }
- xmlhttp.send(null);
- return xmlhttp;
- }
-}
-