From 434f23d2f1389ff3c81ec8fddf0889f72b47dc1c Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Tue, 20 Aug 2013 11:25:54 +0100 Subject: Replace view report link with a button on final screen Link is inconsistent with the rest of the app. --- src/js/views/sent.js | 7 +++++++ src/templates/en/sent.html | 2 +- templates/sent.html | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/js/views/sent.js b/src/js/views/sent.js index a483706..47e4ab8 100644 --- a/src/js/views/sent.js +++ b/src/js/views/sent.js @@ -11,6 +11,7 @@ 'pageshow': 'afterDisplay', 'vclick .ui-btn-left': 'onClickButtonPrev', 'vclick #id_report_another': 'onClickButtonPrev', + 'vclick #open_report': 'onClickOpenReport', 'vclick #rate_app': 'onClickRateApp' }, @@ -25,6 +26,12 @@ return this; }, + onClickOpenReport: function(e) { + e.preventDefault(); + window.open(FMS.createdReport.get('site_url'), '_system'); + return false; + }, + onClickRateApp: function(e) { e.preventDefault(); var el = $('#rate_app'); diff --git a/src/templates/en/sent.html b/src/templates/en/sent.html index 5094c4b..f4f1541 100644 --- a/src/templates/en/sent.html +++ b/src/templates/en/sent.html @@ -12,7 +12,7 @@ <% } else { %>

Thanks. Your report will be sent to the authorities immediately.

-

View it on the site

+

<% } %> diff --git a/templates/sent.html b/templates/sent.html index ffaaa1d..01f04a1 100644 --- a/templates/sent.html +++ b/templates/sent.html @@ -12,7 +12,7 @@ <% } else { %>

[% loc('Thanks. Your report will be sent to the authorities immediately.') %]

-

[% loc('View it on the site') %]

+

<% } %> -- cgit v1.2.3