aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/css/fms.css1
-rw-r--r--src/js/app.js2
-rw-r--r--src/js/strings.js16
-rw-r--r--src/js/views/login.js7
-rw-r--r--src/js/views/reports.js16
-rw-r--r--src/templates/en/offline.html4
-rw-r--r--src/templates/en/photo.html2
7 files changed, 33 insertions, 15 deletions
diff --git a/src/css/fms.css b/src/css/fms.css
index a539edc..a9c24f3 100644
--- a/src/css/fms.css
+++ b/src/css/fms.css
@@ -242,6 +242,7 @@
border-bottom: 1px solid #ccc;
}
.inputcard > div.noborder,
+ .inputcard > div.bottom-btn,
.gmailstyletest > div.noborder {
border:none;
}
diff --git a/src/js/app.js b/src/js/app.js
index f6584dc..6298dab 100644
--- a/src/js/app.js
+++ b/src/js/app.js
@@ -81,8 +81,6 @@ var tpl = {
dataType: 'json',
timeout: 30000,
success: function( data, status ) {
- console.log(data);
- console.log(status);
FMS.isLoggedIn = 1;
},
error: function() {
diff --git a/src/js/strings.js b/src/js/strings.js
index 9f2f1aa..e0a7114 100644
--- a/src/js/strings.js
+++ b/src/js/strings.js
@@ -20,19 +20,19 @@
password: 'Please enter a password'
},
strings: {
- login_error: 'There was a problem logging you in. Please try later',
- logout_error: 'There was a problem logging you out. Please try later',
+ login_error: 'There was a problem logging you in. Please try again later.',
+ logout_error: 'There was a problem logging you out. Please try again later.',
login_details_error: 'There was a problem logging you in. Please check your email and password',
- password_problem: 'There was a problem with your email/password combination. If you have forgotten your password, or do not have one, you can set one by returning to the email screen and selecting the set password option',
+ password_problem: 'There was a problem with your email/password combination. If you have forgotten your password, or do not have one, you can set one by returning to the email screen and selecting the set password option.',
location_error: 'Location error',
- location_problem: 'There was a problem looking up your location',
+ location_problem: 'There was a problem looking up your location.',
multiple_locations: 'More than one location matched that name. Select one below or try entering street name and area, or a postcode.',
sync_error: 'An error was encountered when submitting your report: ',
unknown_sync_error: 'There was a problem submitting your report. Please try again later.',
- report_send_error: 'There was a problem submitting your report. Please try again',
+ report_send_error: 'There was a problem submitting your report. Please try again.',
missing_location: 'Please enter a location',
location_check_failed: 'There was a problem checking we cover this location. Please try again later.',
- category_extra_check_error: 'There was a problem checking if we have all the details we need. Please try again later',
+ category_extra_check_error: 'There was a problem checking if we have all the details we need. Please try again later.',
locate_dismissed: 'Please search for a street name and area, or postcode.',
geolocation_failed: 'Could not determine your location, please search for a street name and area, or postcode instead.',
geolocation_denied: 'Could not access location services. Please check permissions.',
@@ -40,8 +40,8 @@
required: 'required',
invalid_email: 'Invalid email',
invalid_report: 'Invalid report',
- photo_failed: 'There was a problem taking your photo',
- no_connection: 'No network connection available for submitting your report. Please try again later',
+ photo_failed: 'There was a problem taking your photo.',
+ no_connection: 'No network connection available for submitting your report. Please try again later.',
more_details: 'More details'
}
});
diff --git a/src/js/views/login.js b/src/js/views/login.js
index 28eaf96..c0f16ba 100644
--- a/src/js/views/login.js
+++ b/src/js/views/login.js
@@ -20,6 +20,7 @@
onClickLogin: function(e) {
// prevent form submission from onscreen keyboard
e.preventDefault();
+ $('#login').focus();
if ( this.validate() ) {
var that = this;
$.ajax( {
@@ -41,14 +42,12 @@
FMS.isLoggedIn = 1;
that.$('#password_row').hide();
that.$('#success_row').show();
- $('#logout').focus();
} else {
- $('#login').focus();
- that.validationError('form_email', FMS.strings.login_details_error);
+ that.validationError('signinForm', FMS.strings.login_details_error);
}
},
error: function() {
- that.validationError('form_email', FMS.strings.login_error);
+ that.validationError('signinForm', FMS.strings.login_error);
}
} );
}
diff --git a/src/js/views/reports.js b/src/js/views/reports.js
index f68944d..3e58658 100644
--- a/src/js/views/reports.js
+++ b/src/js/views/reports.js
@@ -44,6 +44,22 @@
var el = $(e.target);
var id = el.parents('li').attr('id');
FMS.currentDraft = FMS.allDrafts.get(id);
+ $('#drafts').hide();
+ if ( FMS.currentDraft && FMS.currentDraft.get('lat') ) {
+ var coords = { latitude: FMS.currentDraft.get('lat'), longitude: FMS.currentDraft.get('lon') };
+ fixmystreet.latitude = coords.latitude;
+ fixmystreet.longitude = coords.longitude;
+
+ if ( fixmystreet.map ) {
+ var centre = new OpenLayers.LonLat( coords.longitude, coords.latitude );
+ centre.transform(
+ new OpenLayers.Projection("EPSG:4326"),
+ fixmystreet.map.getProjectionObject()
+ );
+
+ fixmystreet.map.panTo(centre);
+ }
+ }
this.navigate('around');
},
diff --git a/src/templates/en/offline.html b/src/templates/en/offline.html
index b73ed47..ca62051 100644
--- a/src/templates/en/offline.html
+++ b/src/templates/en/offline.html
@@ -17,7 +17,11 @@
<div data-role="content">
<div>
<p class="notopmargin">
+ <% if ( typeof id != 'undefined' ) { %>
+ Oh dear - we can't detect an internet connection. However you can still edit the report now and send it later.
+ <% } else { %>
Oh dear - we can't detect an internet connection. However you can still start a report now and complete it later, by going to 'drafts' when you're back online.
+ <% } %>
</p>
<p id="locate_result">
diff --git a/src/templates/en/photo.html b/src/templates/en/photo.html
index d986a15..b61a5af 100644
--- a/src/templates/en/photo.html
+++ b/src/templates/en/photo.html
@@ -7,7 +7,7 @@
<% } %>
</div>
<div data-role="content">
- <h2>Add a Photo <em>(optional)</em>:</h2>
+ <h2>Add a Photo <em>(optional)</em></h2>
<div class="photo">
<% if ( file == '' ) { %>
<img class="placeholder" src="images/placeholder-photo.png" alt="" id="photo">