aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
Diffstat (limited to 'web/js')
-rw-r--r--web/js/map-OpenLayers.js12
-rw-r--r--web/js/southampton.js15
2 files changed, 25 insertions, 2 deletions
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index 6b4a03d7e..d00079517 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -41,6 +41,15 @@ $(function(){
return false;
});
+ // Vector layers must be added onload as IE sucks
+ if ($.browser.msie) {
+ $(window).load(fixmystreet_onload);
+ } else {
+ fixmystreet_onload();
+ }
+});
+
+function fixmystreet_onload() {
if ( fixmystreet.area ) {
var area = new OpenLayers.Layer.Vector("KML", {
strategies: [ new OpenLayers.Strategy.Fixed() ],
@@ -96,8 +105,7 @@ $(function(){
var bounds = fixmystreet.markers.getDataExtent();
if (bounds) { fixmystreet.map.zoomToExtent( bounds ); }
}
-
-});
+}
function fms_markers_list(pins, transform) {
var cols = { 'red':'R', 'green':'G', 'blue':'B', 'purple':'P' };
diff --git a/web/js/southampton.js b/web/js/southampton.js
index da9552f05..1f3e16105 100644
--- a/web/js/southampton.js
+++ b/web/js/southampton.js
@@ -6,6 +6,21 @@
$(function(){
+ $('[placeholder]').focus(function(){
+ var input = $(this);
+ if (input.val() == input.attr('placeholder')) {
+ input.val('');
+ input.removeClass('placeholder');
+ input.css({ 'color': '#000000' });
+ }
+ }).blur(function(){
+ var input = $(this);
+ if (input.val() == '' || input.val() == input.attr('placeholder')) {
+ input.css({ 'color': '#999999' });
+ input.val(input.attr('placeholder'));
+ }
+ }).blur();
+
$('#form_category').change(function(){
var category = $(this).val();
if ('Potholes' == category) {