diff options
author | Struan Donald <struan@exo.org.uk> | 2013-09-16 12:33:18 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-09-16 12:33:18 +0100 |
commit | 8e1f1769622dba30f8e156649d50e19ad44c27d4 (patch) | |
tree | c8f10e47a78ccb5c9a4018210c587f201ba95c83 | |
parent | 247652f45c990d108765948d25cfa741bdc598f3 (diff) |
Change photo page title if report has a photo
Also update it when adding a photo to give an indication that adding the
photo was succesful. This is to remove any confusion about whether the
photo on the page has been added.
Fixes #130
-rw-r--r-- | locale/FixMyStreetMobileApp.po | 30 | ||||
-rw-r--r-- | locale/en_GB.UTF-8/LC_MESSAGES/FixMyStreetMobileApp.po | 30 | ||||
-rw-r--r-- | src/js/strings.js | 1 | ||||
-rw-r--r-- | src/js/views/photo.js | 4 | ||||
-rw-r--r-- | src/templates/en/photo.html | 13 | ||||
-rw-r--r-- | templates/photo.html | 13 | ||||
-rw-r--r-- | templates/strings.js | 1 |
7 files changed, 68 insertions, 24 deletions
diff --git a/locale/FixMyStreetMobileApp.po b/locale/FixMyStreetMobileApp.po index 3d52a13..c25e60d 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-09-12 10:30+0100\n" +"POT-Creation-Date: 2013-09-16 12:32+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:50 templates/photo.html:10 +#: templates/offline.html:50 templates/photo.html:17 msgid "(optional)" msgstr "" @@ -33,7 +33,7 @@ msgstr "" msgid "Add Photo" msgstr "" -#: templates/photo.html:10 +#: templates/photo.html:17 msgid "Add a Photo" msgstr "" @@ -41,7 +41,7 @@ msgstr "" msgid "Add a Photo " msgstr "" -#: templates/offline.html:52 templates/photo.html:22 +#: templates/offline.html:52 templates/photo.html:33 msgid "Add an existing photo" msgstr "" @@ -149,7 +149,7 @@ msgstr "" msgid "Login" msgstr "" -#: templates/strings.js:50 +#: templates/strings.js:51 msgid "More details" msgstr "" @@ -165,7 +165,7 @@ msgstr "" msgid "Next" msgstr "" -#: templates/strings.js:49 +#: templates/strings.js:50 msgid "No network connection available for submitting your report. Please try again later." msgstr "" @@ -189,6 +189,14 @@ msgstr "" msgid "Optionally enter your phone number" msgstr "" +#: templates/strings.js:45 +msgid "Photo added" +msgstr "" + +#: templates/photo.html:20 +msgid "Photo for report" +msgstr "" + #: templates/strings.js:11 msgid "Please choose a category" msgstr "" @@ -273,7 +281,7 @@ msgstr "" msgid "Reposition Report Here" msgstr "" -#: templates/strings.js:48 +#: templates/strings.js:49 msgid "Save for Later" msgstr "" @@ -325,7 +333,7 @@ msgstr "" msgid "Subject" msgstr "" -#: templates/offline.html:51 templates/photo.html:23 +#: templates/offline.html:51 templates/photo.html:34 msgid "Take a new photo" msgstr "" @@ -381,7 +389,7 @@ msgstr "" msgid "There was a problem taking your photo." msgstr "" -#: templates/strings.js:46 +#: templates/strings.js:47 msgid "There was a problem uploading your report." msgstr "" @@ -409,7 +417,7 @@ msgstr "" msgid "To skip this step in future, you can set a password now." msgstr "" -#: templates/offline.html:2 templates/strings.js:47 +#: templates/offline.html:2 templates/strings.js:48 msgid "Try Again" msgstr "" @@ -417,7 +425,7 @@ msgstr "" msgid "Unsent Report" msgstr "" -#: templates/strings.js:45 +#: templates/strings.js:46 msgid "Uploading images may take some time, please be patient" msgstr "" diff --git a/locale/en_GB.UTF-8/LC_MESSAGES/FixMyStreetMobileApp.po b/locale/en_GB.UTF-8/LC_MESSAGES/FixMyStreetMobileApp.po index c909d4f..b627413 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-09-12 10:30+0100\n" +"POT-Creation-Date: 2013-09-16 12:32+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:50 templates/photo.html:10 +#: templates/offline.html:50 templates/photo.html:17 msgid "(optional)" msgstr "" @@ -34,7 +34,7 @@ msgstr "" msgid "Add Photo" msgstr "" -#: templates/photo.html:10 +#: templates/photo.html:17 msgid "Add a Photo" msgstr "" @@ -42,7 +42,7 @@ msgstr "" msgid "Add a Photo " msgstr "" -#: templates/offline.html:52 templates/photo.html:22 +#: templates/offline.html:52 templates/photo.html:33 msgid "Add an existing photo" msgstr "" @@ -154,7 +154,7 @@ msgstr "" msgid "Login" msgstr "" -#: templates/strings.js:50 +#: templates/strings.js:51 msgid "More details" msgstr "" @@ -173,7 +173,7 @@ msgstr "" msgid "Next" msgstr "" -#: templates/strings.js:49 +#: templates/strings.js:50 msgid "" "No network connection available for submitting your report. Please try again " "later." @@ -204,6 +204,14 @@ msgstr "" msgid "Optionally enter your phone number" msgstr "" +#: templates/strings.js:45 +msgid "Photo added" +msgstr "" + +#: templates/photo.html:20 +msgid "Photo for report" +msgstr "" + #: templates/strings.js:11 msgid "Please choose a category" msgstr "" @@ -293,7 +301,7 @@ msgstr "" msgid "Reposition Report Here" msgstr "" -#: templates/strings.js:48 +#: templates/strings.js:49 msgid "Save for Later" msgstr "" @@ -348,7 +356,7 @@ msgstr "" msgid "Subject" msgstr "" -#: templates/offline.html:51 templates/photo.html:23 +#: templates/offline.html:51 templates/photo.html:34 msgid "Take a new photo" msgstr "" @@ -411,7 +419,7 @@ msgstr "" msgid "There was a problem taking your photo." msgstr "" -#: templates/strings.js:46 +#: templates/strings.js:47 msgid "There was a problem uploading your report." msgstr "" @@ -447,7 +455,7 @@ msgstr "" msgid "To skip this step in future, you can set a password now." msgstr "" -#: templates/offline.html:2 templates/strings.js:47 +#: templates/offline.html:2 templates/strings.js:48 msgid "Try Again" msgstr "" @@ -455,7 +463,7 @@ msgstr "" msgid "Unsent Report" msgstr "" -#: templates/strings.js:45 +#: templates/strings.js:46 msgid "Uploading images may take some time, please be patient" msgstr "" diff --git a/src/js/strings.js b/src/js/strings.js index a421279..905b2c3 100644 --- a/src/js/strings.js +++ b/src/js/strings.js @@ -42,6 +42,7 @@ invalid_email: 'Invalid email', invalid_report: 'Invalid report', photo_failed: 'There was a problem taking your photo.', + photo_added: 'Photo added', photo_loading: 'Uploading images may take some time, please be patient', upload_aborted: 'There was a problem uploading your report.', try_again: 'Try Again', diff --git a/src/js/views/photo.js b/src/js/views/photo.js index aa9c9ee..a6bbb47 100644 --- a/src/js/views/photo.js +++ b/src/js/views/photo.js @@ -60,6 +60,8 @@ var that = this; move.done( function( file ) { + $('#nophoto_title').hide(); + $('#photo_title').html(FMS.strings.photo_added).show(); $('#photo').attr('src', file.toURL()).addClass('small').removeClass('placeholder'); that.model.set('file', file.toURL()); FMS.saveCurrentDraft(); @@ -91,6 +93,8 @@ var del = FMS.files.deleteURI( this.model.get('file') ); del.done( function() { + $('#photo_title').hide(); + $('#nophoto_title').show(); $('#id_del_photo_button').hide(); that.model.set('file', ''); FMS.saveCurrentDraft(true); diff --git a/src/templates/en/photo.html b/src/templates/en/photo.html index 460f38f..aa44e9e 100644 --- a/src/templates/en/photo.html +++ b/src/templates/en/photo.html @@ -7,7 +7,18 @@ <% } %> </div> <div data-role="content"> - <h2>Add a Photo <em>(optional)</em></h2> + <% var photoClass = 'nodisplay', nophotoClass = 'nodisplay'; + if ( file != '' ) { + photoClass = ''; + } else { + nophotoClass = ''; + } %> + <h2 id="nophoto_title" class="<% print( nophotoClass ); %>"> + Add a Photo <em>(optional)</em> + </h2> + <h2 id="photo_title" class="<% print( photoClass ); %>"> + Photo for report + </h2> <div class="photo-wrapper"> <div class="photo"> <% if ( file == '' ) { %> diff --git a/templates/photo.html b/templates/photo.html index 0f3036d..100be7a 100644 --- a/templates/photo.html +++ b/templates/photo.html @@ -7,7 +7,18 @@ <% } %> </div> <div data-role="content"> - <h2>[% loc('Add a Photo') %] <em>[% loc('(optional)') %]</em></h2> + <% var photoClass = 'nodisplay', nophotoClass = 'nodisplay'; + if ( file != '' ) { + photoClass = ''; + } else { + nophotoClass = ''; + } %> + <h2 id="nophoto_title" class="<% print( nophotoClass ); %>"> + [% loc('Add a Photo') %] <em>[% loc('(optional)') %]</em> + </h2> + <h2 id="photo_title" class="<% print( photoClass ); %>"> + [% loc('Photo for report') %] + </h2> <div class="photo-wrapper"> <div class="photo"> <% if ( file == '' ) { %> diff --git a/templates/strings.js b/templates/strings.js index 661a01a..d5bbc54 100644 --- a/templates/strings.js +++ b/templates/strings.js @@ -42,6 +42,7 @@ invalid_email: '[% loc('Invalid email') %]', invalid_report: '[% loc('Invalid report') %]', photo_failed: '[% loc('There was a problem taking your photo.') %]', + photo_added: '[% loc('Photo added') %]', photo_loading: '[% loc('Uploading images may take some time, please be patient') %]', upload_aborted: '[% loc('There was a problem uploading your report.') %]', try_again: '[% loc('Try Again') %]', |