aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--locale/FixMyStreetMobileApp.po54
-rw-r--r--locale/en_GB.UTF-8/LC_MESSAGES/FixMyStreetMobileApp.po56
-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
-rw-r--r--templates/offline.html4
-rw-r--r--templates/photo.html2
-rw-r--r--templates/strings.js16
-rw-r--r--templates/submit_name.html4
13 files changed, 102 insertions, 82 deletions
diff --git a/locale/FixMyStreetMobileApp.po b/locale/FixMyStreetMobileApp.po
index 442948c..c62c5d4 100644
--- a/locale/FixMyStreetMobileApp.po
+++ b/locale/FixMyStreetMobileApp.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 1.0\n"
"Report-Msgid-Bugs-To: struan@mysociety.org\n"
-"POT-Creation-Date: 2013-07-30 16:37+0100\n"
+"POT-Creation-Date: 2013-08-02 17:15+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <team@fixmystreet.com>\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-#: templates/offline.html:46 templates/photo.html:10
+#: templates/offline.html:50 templates/photo.html:10
msgid "(optional)"
msgstr ""
@@ -37,11 +37,11 @@ msgstr ""
msgid "Add a Photo"
msgstr ""
-#: templates/offline.html:46
+#: templates/offline.html:50
msgid "Add a Photo "
msgstr ""
-#: templates/offline.html:48 templates/photo.html:19
+#: templates/offline.html:52 templates/photo.html:19
msgid "Add an existing photo"
msgstr ""
@@ -137,7 +137,7 @@ msgstr ""
msgid "Invalid report"
msgstr ""
-#: templates/offline.html:27
+#: templates/offline.html:31
msgid "Locate"
msgstr ""
@@ -166,7 +166,7 @@ msgid "Next"
msgstr ""
#: templates/strings.js:44
-msgid "No network connection available for submitting your report. Please try again later"
+msgid "No network connection available for submitting your report. Please try again later."
msgstr ""
#: templates/submit_name.html:9
@@ -177,7 +177,11 @@ msgstr ""
msgid "Offline"
msgstr ""
-#: templates/offline.html:20
+#: templates/offline.html:21
+msgid "Oh dear - we can't detect an internet connection. However you can still edit the report now and send it later."
+msgstr ""
+
+#: templates/offline.html:23
msgid "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."
msgstr ""
@@ -249,11 +253,11 @@ msgstr ""
msgid "Please search for a street name and area, or postcode."
msgstr ""
-#: templates/details.html:9 templates/offline.html:33
+#: templates/details.html:9 templates/offline.html:37
msgid "Provide a title"
msgstr ""
-#: templates/offline.html:60 templates/photo.html:21
+#: templates/offline.html:64 templates/photo.html:21
msgid "Remove Photo"
msgstr ""
@@ -305,7 +309,7 @@ msgstr ""
msgid "Subject"
msgstr ""
-#: templates/offline.html:47 templates/photo.html:20
+#: templates/offline.html:51 templates/photo.html:20
msgid "Take a new photo"
msgstr ""
@@ -322,7 +326,7 @@ msgid "There isn't an internet connection, do you want to save the current repor
msgstr ""
#: templates/strings.js:35
-msgid "There was a problem checking if we have all the details we need. Please try again later"
+msgid "There was a problem checking if we have all the details we need. Please try again later."
msgstr ""
#: templates/strings.js:34
@@ -334,38 +338,38 @@ msgid "There was a problem logging you in. Please check your email and password"
msgstr ""
#: templates/strings.js:23
-msgid "There was a problem logging you in. Please try later"
+msgid "There was a problem logging you in. Please try again later."
msgstr ""
#: templates/strings.js:24
-msgid "There was a problem logging you out. Please try later"
+msgid "There was a problem logging you out. Please try again later."
msgstr ""
#: templates/strings.js:28
-msgid "There was a problem looking up your location"
-msgstr ""
-
-#: templates/strings.js:32
-msgid "There was a problem submitting your report. Please try again"
+msgid "There was a problem looking up your location."
msgstr ""
#: templates/strings.js:31
msgid "There was a problem submitting your report. Please try again later."
msgstr ""
+#: templates/strings.js:32
+msgid "There was a problem submitting your report. Please try again."
+msgstr ""
+
#: templates/strings.js:43
-msgid "There was a problem taking your photo"
+msgid "There was a problem taking your photo."
msgstr ""
#: templates/strings.js:26
-msgid "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"
+msgid "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."
msgstr ""
#: templates/submit_email.html:13
msgid "This app needs to send you a confirmation email before we can send your report to the council."
msgstr ""
-#: templates/offline.html:25
+#: templates/offline.html:29
msgid "This report has a position."
msgstr ""
@@ -393,17 +397,11 @@ msgstr ""
msgid "We've sent you a confirmation email which may take a few minutes to arrive. Once it arrives click the link in the email to confirm your report."
msgstr ""
-#. ('<%= user.email %>')
-#. ("<%= user.email %>")
-#: templates/submit_confirm.html:7
-msgid "You are logged in as %s"
-msgstr ""
-
#: templates/login.html:24
msgid "Your Email"
msgstr ""
-#: templates/offline.html:56
+#: templates/offline.html:60
msgid "Your Photo"
msgstr ""
diff --git a/locale/en_GB.UTF-8/LC_MESSAGES/FixMyStreetMobileApp.po b/locale/en_GB.UTF-8/LC_MESSAGES/FixMyStreetMobileApp.po
index 81d076f..1e0bb6c 100644
--- a/locale/en_GB.UTF-8/LC_MESSAGES/FixMyStreetMobileApp.po
+++ b/locale/en_GB.UTF-8/LC_MESSAGES/FixMyStreetMobileApp.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 1.0\n"
"Report-Msgid-Bugs-To: struan@mysociety.org\n"
-"POT-Creation-Date: 2013-07-30 16:37+0100\n"
+"POT-Creation-Date: 2013-08-02 17:15+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <team@fixmystreet.com>\n"
@@ -18,7 +18,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-#: templates/offline.html:46 templates/photo.html:10
+#: templates/offline.html:50 templates/photo.html:10
msgid "(optional)"
msgstr ""
@@ -38,11 +38,11 @@ msgstr ""
msgid "Add a Photo"
msgstr ""
-#: templates/offline.html:46
+#: templates/offline.html:50
msgid "Add a Photo "
msgstr ""
-#: templates/offline.html:48 templates/photo.html:19
+#: templates/offline.html:52 templates/photo.html:19
msgid "Add an existing photo"
msgstr ""
@@ -142,7 +142,7 @@ msgstr ""
msgid "Invalid report"
msgstr ""
-#: templates/offline.html:27
+#: templates/offline.html:31
msgid "Locate"
msgstr ""
@@ -176,7 +176,7 @@ msgstr ""
#: templates/strings.js:44
msgid ""
"No network connection available for submitting your report. Please try again "
-"later"
+"later."
msgstr ""
#: templates/submit_name.html:9
@@ -187,7 +187,13 @@ msgstr ""
msgid "Offline"
msgstr ""
-#: templates/offline.html:20
+#: templates/offline.html:21
+msgid ""
+"Oh dear - we can't detect an internet connection. However you can still edit "
+"the report now and send it later."
+msgstr ""
+
+#: templates/offline.html:23
msgid ""
"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 "
@@ -267,11 +273,11 @@ msgstr ""
msgid "Please search for a street name and area, or postcode."
msgstr ""
-#: templates/details.html:9 templates/offline.html:33
+#: templates/details.html:9 templates/offline.html:37
msgid "Provide a title"
msgstr ""
-#: templates/offline.html:60 templates/photo.html:21
+#: templates/offline.html:64 templates/photo.html:21
msgid "Remove Photo"
msgstr ""
@@ -324,7 +330,7 @@ msgstr ""
msgid "Subject"
msgstr ""
-#: templates/offline.html:47 templates/photo.html:20
+#: templates/offline.html:51 templates/photo.html:20
msgid "Take a new photo"
msgstr ""
@@ -345,7 +351,7 @@ msgstr ""
#: templates/strings.js:35
msgid ""
"There was a problem checking if we have all the details we need. Please try "
-"again later"
+"again later."
msgstr ""
#: templates/strings.js:34
@@ -359,34 +365,34 @@ msgid ""
msgstr ""
#: templates/strings.js:23
-msgid "There was a problem logging you in. Please try later"
+msgid "There was a problem logging you in. Please try again later."
msgstr ""
#: templates/strings.js:24
-msgid "There was a problem logging you out. Please try later"
+msgid "There was a problem logging you out. Please try again later."
msgstr ""
#: templates/strings.js:28
-msgid "There was a problem looking up your location"
-msgstr ""
-
-#: templates/strings.js:32
-msgid "There was a problem submitting your report. Please try again"
+msgid "There was a problem looking up your location."
msgstr ""
#: templates/strings.js:31
msgid "There was a problem submitting your report. Please try again later."
msgstr ""
+#: templates/strings.js:32
+msgid "There was a problem submitting your report. Please try again."
+msgstr ""
+
#: templates/strings.js:43
-msgid "There was a problem taking your photo"
+msgid "There was a problem taking your photo."
msgstr ""
#: templates/strings.js:26
msgid ""
"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"
+"the email screen and selecting the set password option."
msgstr ""
#: templates/submit_email.html:13
@@ -395,7 +401,7 @@ msgid ""
"report to the council."
msgstr ""
-#: templates/offline.html:25
+#: templates/offline.html:29
msgid "This report has a position."
msgstr ""
@@ -425,17 +431,11 @@ msgid ""
"Once it arrives click the link in the email to confirm your report."
msgstr ""
-#. ('<%= user.email %>')
-#. ("<%= user.email %>")
-#: templates/submit_confirm.html:7
-msgid "You are logged in as %s"
-msgstr ""
-
#: templates/login.html:24
msgid "Your Email"
msgstr ""
-#: templates/offline.html:56
+#: templates/offline.html:60
msgid "Your Photo"
msgstr ""
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">
diff --git a/templates/offline.html b/templates/offline.html
index a7fb8c0..8580277 100644
--- a/templates/offline.html
+++ b/templates/offline.html
@@ -17,7 +17,11 @@
<div data-role="content">
<div>
<p class="notopmargin">
+ <% if ( typeof id != 'undefined' ) { %>
+ [% loc("Oh dear - we can't detect an internet connection. However you can still edit the report now and send it later.") %]
+ <% } else { %>
[% loc("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/templates/photo.html b/templates/photo.html
index 2bc586b..2b49202 100644
--- a/templates/photo.html
+++ b/templates/photo.html
@@ -7,7 +7,7 @@
<% } %>
</div>
<div data-role="content">
- <h2>[% loc('Add a Photo') %] <em>[% loc('(optional)') %]</em>:</h2>
+ <h2>[% loc('Add a Photo') %] <em>[% loc('(optional)') %]</em></h2>
<div class="photo">
<% if ( file == '' ) { %>
<img class="placeholder" src="images/placeholder-photo.png" alt="" id="photo">
diff --git a/templates/strings.js b/templates/strings.js
index 85af084..ad0b631 100644
--- a/templates/strings.js
+++ b/templates/strings.js
@@ -20,19 +20,19 @@
password: '[% loc('Please enter a password') %]'
},
strings: {
- login_error: '[% loc('There was a problem logging you in. Please try later') %]',
- logout_error: '[% loc('There was a problem logging you out. Please try later') %]',
+ login_error: '[% loc('There was a problem logging you in. Please try again later.') %]',
+ logout_error: '[% loc('There was a problem logging you out. Please try again later.') %]',
login_details_error: '[% loc('There was a problem logging you in. Please check your email and password') %]',
- password_problem: '[% loc('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: '[% loc('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: '[% loc('Location error') %]',
- location_problem: '[% loc('There was a problem looking up your location') %]',
+ location_problem: '[% loc('There was a problem looking up your location.') %]',
multiple_locations: '[% loc('More than one location matched that name. Select one below or try entering street name and area, or a postcode.') %]',
sync_error: '[% loc('An error was encountered when submitting your report: ') %]',
unknown_sync_error: '[% loc('There was a problem submitting your report. Please try again later.') %]',
- report_send_error: '[% loc('There was a problem submitting your report. Please try again') %]',
+ report_send_error: '[% loc('There was a problem submitting your report. Please try again.') %]',
missing_location: '[% loc('Please enter a location') %]',
location_check_failed: '[% loc('There was a problem checking we cover this location. Please try again later.') %]',
- category_extra_check_error: '[% loc('There was a problem checking if we have all the details we need. Please try again later') %]',
+ category_extra_check_error: '[% loc('There was a problem checking if we have all the details we need. Please try again later.') %]',
locate_dismissed: '[% loc('Please search for a street name and area, or postcode.') %]',
geolocation_failed: '[% loc('Could not determine your location, please search for a street name and area, or postcode instead.') %]',
geolocation_denied: '[% loc('Could not access location services. Please check permissions.') %]',
@@ -40,8 +40,8 @@
required: '[% loc('required') %]',
invalid_email: '[% loc('Invalid email') %]',
invalid_report: '[% loc('Invalid report') %]',
- photo_failed: '[% loc('There was a problem taking your photo') %]',
- no_connection: '[% loc('No network connection available for submitting your report. Please try again later') %]',
+ photo_failed: '[% loc('There was a problem taking your photo.') %]',
+ no_connection: '[% loc('No network connection available for submitting your report. Please try again later.') %]',
more_details: '[% loc('More details') %]'
}
});
diff --git a/templates/submit_name.html b/templates/submit_name.html
index 986a1e6..dec5ee7 100644
--- a/templates/submit_name.html
+++ b/templates/submit_name.html
@@ -11,11 +11,11 @@
[% loc("Please give us some basic details, and you're nearly done.") %]
</p>
<div class="inputcard">
- <% if ( typeof model.title_list !== 'undefined' ) { %>
+ <% if ( typeof model.titles_list !== 'undefined' ) { %>
<div>
<select data-role="none" placeholder="[% loc('Title') %]" id="form_title" name="title" required>
<option value="">[% loc('Title') %]</option>
- <% for ( var i = 0; i < model.title_list.length; i++ ) { var title = model.title_list[i]; print( '<option value="' + title + '">' + title + '</option>' ); } %>
+ <% for ( var i = 0; i < model.titles_list.length; i++ ) { var title = model.titles_list[i]; print( '<option value="' + title + '">' + title + '</option>' ); } %>
</select>
</div>
<% } %>