aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-09-09 08:54:23 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-09-09 08:56:29 +0100
commitf5b171ff04690ca84f28dab4b8060aa8a29aed84 (patch)
tree4cc923603502e8b937467533c2cb3fbfa26307e9
parent6748be05399532447aaa73ca944d6ed3ec9c81ac (diff)
Remove inline onclick handlers.
-rwxr-xr-xtemplates/web/base/about/iphone.html52
-rw-r--r--templates/web/base/admin/report_edit.html2
-rw-r--r--templates/web/fixmystreet.com/about/posters.html2
-rw-r--r--templates/web/zurich/footer.html5
-rw-r--r--web/cobrands/fixmystreet.com/posters.js1
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js4
-rw-r--r--web/iphone/.gitignore1
-rw-r--r--web/iphone/iphone-1start.pngbin192062 -> 0 bytes
-rw-r--r--web/iphone/iphone-2locfound.pngbin191903 -> 0 bytes
-rw-r--r--web/iphone/iphone-3picture.pngbin217150 -> 0 bytes
-rw-r--r--web/iphone/iphone-4subject.pngbin216996 -> 0 bytes
-rw-r--r--web/iphone/iphone-5details.pngbin190020 -> 0 bytes
-rw-r--r--web/iphone/iphone-6emailkeyboard.pngbin266409 -> 0 bytes
-rw-r--r--web/iphone/iphone-7uploading.pngbin215575 -> 0 bytes
-rw-r--r--web/iphone/iphone-8response.pngbin313682 -> 0 bytes
-rw-r--r--web/iphone/iphone-9about.pngbin231665 -> 0 bytes
-rw-r--r--web/iphone/iphone-allready.pngbin217429 -> 0 bytes
-rw-r--r--web/iphone/iphone-contactphoto.pngbin215181 -> 0 bytes
-rw-r--r--web/iphone/iphone-detailsdone.pngbin192072 -> 0 bytes
-rw-r--r--web/iphone/iphone-editname.pngbin262355 -> 0 bytes
-rw-r--r--web/iphone/iphone-editsummary.pngbin263601 -> 0 bytes
-rw-r--r--web/iphone/iphone-editsummary2.pngbin264365 -> 0 bytes
-rw-r--r--web/iphone/iphone-pickpicture1.pngbin200224 -> 0 bytes
-rw-r--r--web/iphone/iphone-pickpicture2.pngbin268191 -> 0 bytes
-rw-r--r--web/iphone/iphone-pickpicture3.pngbin275753 -> 0 bytes
25 files changed, 10 insertions, 57 deletions
diff --git a/templates/web/base/about/iphone.html b/templates/web/base/about/iphone.html
deleted file mode 100755
index 8f7992713..000000000
--- a/templates/web/base/about/iphone.html
+++ /dev/null
@@ -1,52 +0,0 @@
-[% INCLUDE header.html
- title = 'FixMyStreet for iPhone screenshots'
-%]
-
-<h1>iPhone simulator simulator</h1>
-
-[%
- SET screens = [
- [ "iphone-1start.png", 'Click the image to progress through the flow of using the iPhone FixMyStreet application.
- <br>When launched, the user&rsquo;s location automatically gets fetched&hellip;' ],
- [ "iphone-2locfound.png", 'They want to take a photo.' ],
- [ "iphone-pickpicture1.png", 'The simulator doesn&rsquo;t have a camera, so we&rsquo;re taken to the photo albums. Let&rsquo;s pick Hawaii.' ],
- [ "iphone-pickpicture2.png", 'That red clouds photo looks nice.' ],
- [ "iphone-pickpicture3.png", 'After any moving or scaling we want, we select the photo.' ],
- [ "iphone-3picture.png", 'Okay, now we need to edit the summary of the report.' ],
- [ "iphone-editsummary.png", 'Enter some text.' ],
- [ "iphone-editsummary2.png", 'And done.' ],
- [ "iphone-4subject.png", 'I haven&rsquo;t entered all my details yet, so that&rsquo;s next.' ],
- [ "iphone-5details.png", 'Your details are remembered so you only have to enter them once.' ],
- [ "iphone-6emailkeyboard.png", 'The iPhone has different keyboards, this is the email one.' ],
- [ "iphone-5details.png", 'Right, we need to enter a name.' ],
- [ "iphone-editname.png", 'Slightly different keyboard to the email one.' ],
- [ "iphone-detailsdone.png", 'Okay, details entered.' ],
- [ "iphone-allready.png", 'That&rsquo;s everything, hit Report!' ],
- [ "iphone-7uploading.png", 'Uploading&hellip;' ],
- [ "iphone-8response.png", 'The simulator always thinks it&rsquo;s in the US, which FixMyStreet won&rsquo;t like very much.' ],
- [ "iphone-allready.png", 'Ah well, let&rsquo;s read the About page instead' ],
- [ "iphone-9about.png", 'Donate? :)' ],
-];
-%]
-
-<script type="text/javascript">
-document.write('<style type="text/css">.vv { display: none; }</style>');
-function show(a) {
- if (a==[% screens.size %]) b = 1;
- else b = a+1;
- document.getElementById('d' + a).style.display='none';
- document.getElementById('d' + b).style.display='block';
-}
-</script>
-
-[% FOR screen IN screens %]
-
- <div id='d[% loop.count %]'[% " class='vv'" IF NOT loop.first %]>
- <p>[% screen.1 %]</p>
- <p align='center'><a onclick='show([% loop.count %]);return false' href='#d[% loop.count + 1 %]'><img src='[% screen.0 %]' width=414 border=0 height=770></a></p>
- </div>
-
-[% END %]
-
-[% INCLUDE footer.html %]
-
diff --git a/templates/web/base/admin/report_edit.html b/templates/web/base/admin/report_edit.html
index 48a02593b..16fd7b74e 100644
--- a/templates/web/base/admin/report_edit.html
+++ b/templates/web/base/admin/report_edit.html
@@ -81,7 +81,7 @@ class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a>
([% problem.send_method_used %])
[% END %]
[% IF problem.state == 'confirmed' AND problem.whensent %]
- <input onclick="return confirm('[% loc('You really want to resend?') %]')" type="submit" name="resend" value="[% loc('Resend report') %]">
+ <input data-confirm="[% loc('You really want to resend?') %]" type="submit" name="resend" value="[% loc('Resend report') %]">
[% ELSIF NOT problem.whensent %]
<input type="submit" name="mark_sent" value="[% loc('Mark as sent') %]">
[% END %]
diff --git a/templates/web/fixmystreet.com/about/posters.html b/templates/web/fixmystreet.com/about/posters.html
index 8a53cf1e2..1a9a4400c 100644
--- a/templates/web/fixmystreet.com/about/posters.html
+++ b/templates/web/fixmystreet.com/about/posters.html
@@ -85,7 +85,7 @@
<p class="badge-preview">[% badge %]</p>
<p>Copy and paste the text below to add this badge to your site:</p>
-<textarea class="badge-code" onclick="this.select()">[% badge | html %]</textarea>
+<textarea class="badge-code js-click-select">[% badge | html %]</textarea>
<p><small>(thanks to Lincolnshire Council for the image)</small></p>
<h2 id="print">Printed Materials</h2>
diff --git a/templates/web/zurich/footer.html b/templates/web/zurich/footer.html
index 98c24964e..d299284d6 100644
--- a/templates/web/zurich/footer.html
+++ b/templates/web/zurich/footer.html
@@ -14,8 +14,9 @@
</p>
[% END %]
<ul class="nav-menu nav-menu--main mob-only">
- <li><[% IF c.req.uri.path == '/' %]a onclick="$('html, body').animate({scrollTop:0}, 500); return false;" href="#site-header"[% ELSE %]a href="/"[% END %]
- >[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'a' : 'a' %]></li>[%
+ <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %]
+ class="report-a-problem-btn"
+ >[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[%
%]<li><[% IF c.req.uri.path == '/reports' %]span[% ELSE %]a href="/reports"[% END
%]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[%
%]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END
diff --git a/web/cobrands/fixmystreet.com/posters.js b/web/cobrands/fixmystreet.com/posters.js
index caf09fd0e..629ffb065 100644
--- a/web/cobrands/fixmystreet.com/posters.js
+++ b/web/cobrands/fixmystreet.com/posters.js
@@ -26,4 +26,5 @@ $.fn.link_track = function(eventCategory, eventAction, eventLabel) {
$(function() {
$("[data-goodielink]").link_track('goodie', 'download', 'goodielink');
+ $('.js-click-select').on('click', function() { this.select(); });
});
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index f0561a70b..682813070 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -194,6 +194,10 @@ $.extend(fixmystreet.set_up, {
// In case we've come here by clicking back to a form that disabled a submit button
$('input[type=submit]').removeAttr('disabled');
+
+ $('[data-confirm]').on('click', function() {
+ return confirm(this.getAttribute('data-confirm'));
+ });
},
questionnaire: function() {
diff --git a/web/iphone/.gitignore b/web/iphone/.gitignore
deleted file mode 100644
index 973f53659..000000000
--- a/web/iphone/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/_Inline
diff --git a/web/iphone/iphone-1start.png b/web/iphone/iphone-1start.png
deleted file mode 100644
index 1d804af8d..000000000
--- a/web/iphone/iphone-1start.png
+++ /dev/null
Binary files differ
diff --git a/web/iphone/iphone-2locfound.png b/web/iphone/iphone-2locfound.png
deleted file mode 100644
index bade44fd9..000000000
--- a/web/iphone/iphone-2locfound.png
+++ /dev/null
Binary files differ
diff --git a/web/iphone/iphone-3picture.png b/web/iphone/iphone-3picture.png
deleted file mode 100644
index 3bcab408a..000000000
--- a/web/iphone/iphone-3picture.png
+++ /dev/null
Binary files differ
diff --git a/web/iphone/iphone-4subject.png b/web/iphone/iphone-4subject.png
deleted file mode 100644
index cd1588b30..000000000
--- a/web/iphone/iphone-4subject.png
+++ /dev/null
Binary files differ
diff --git a/web/iphone/iphone-5details.png b/web/iphone/iphone-5details.png
deleted file mode 100644
index c05ec1626..000000000
--- a/web/iphone/iphone-5details.png
+++ /dev/null
Binary files differ
diff --git a/web/iphone/iphone-6emailkeyboard.png b/web/iphone/iphone-6emailkeyboard.png
deleted file mode 100644
index 32c7f690f..000000000
--- a/web/iphone/iphone-6emailkeyboard.png
+++ /dev/null
Binary files differ
diff --git a/web/iphone/iphone-7uploading.png b/web/iphone/iphone-7uploading.png
deleted file mode 100644
index 05bfde053..000000000
--- a/web/iphone/iphone-7uploading.png
+++ /dev/null
Binary files differ
diff --git a/web/iphone/iphone-8response.png b/web/iphone/iphone-8response.png
deleted file mode 100644
index a6a25bcbd..000000000
--- a/web/iphone/iphone-8response.png
+++ /dev/null
Binary files differ
diff --git a/web/iphone/iphone-9about.png b/web/iphone/iphone-9about.png
deleted file mode 100644
index b80f1972b..000000000
--- a/web/iphone/iphone-9about.png
+++ /dev/null
Binary files differ
diff --git a/web/iphone/iphone-allready.png b/web/iphone/iphone-allready.png
deleted file mode 100644
index ae193feb1..000000000
--- a/web/iphone/iphone-allready.png
+++ /dev/null
Binary files differ
diff --git a/web/iphone/iphone-contactphoto.png b/web/iphone/iphone-contactphoto.png
deleted file mode 100644
index 440511138..000000000
--- a/web/iphone/iphone-contactphoto.png
+++ /dev/null
Binary files differ
diff --git a/web/iphone/iphone-detailsdone.png b/web/iphone/iphone-detailsdone.png
deleted file mode 100644
index c7de03578..000000000
--- a/web/iphone/iphone-detailsdone.png
+++ /dev/null
Binary files differ
diff --git a/web/iphone/iphone-editname.png b/web/iphone/iphone-editname.png
deleted file mode 100644
index 5807235d3..000000000
--- a/web/iphone/iphone-editname.png
+++ /dev/null
Binary files differ
diff --git a/web/iphone/iphone-editsummary.png b/web/iphone/iphone-editsummary.png
deleted file mode 100644
index 251fad6df..000000000
--- a/web/iphone/iphone-editsummary.png
+++ /dev/null
Binary files differ
diff --git a/web/iphone/iphone-editsummary2.png b/web/iphone/iphone-editsummary2.png
deleted file mode 100644
index 7019071c4..000000000
--- a/web/iphone/iphone-editsummary2.png
+++ /dev/null
Binary files differ
diff --git a/web/iphone/iphone-pickpicture1.png b/web/iphone/iphone-pickpicture1.png
deleted file mode 100644
index 8f55bff93..000000000
--- a/web/iphone/iphone-pickpicture1.png
+++ /dev/null
Binary files differ
diff --git a/web/iphone/iphone-pickpicture2.png b/web/iphone/iphone-pickpicture2.png
deleted file mode 100644
index 582673abd..000000000
--- a/web/iphone/iphone-pickpicture2.png
+++ /dev/null
Binary files differ
diff --git a/web/iphone/iphone-pickpicture3.png b/web/iphone/iphone-pickpicture3.png
deleted file mode 100644
index e7960798f..000000000
--- a/web/iphone/iphone-pickpicture3.png
+++ /dev/null
Binary files differ