diff options
-rw-r--r-- | www/js/views/sent.js | 11 | ||||
-rw-r--r-- | www/templates/en/sent.html | 6 |
2 files changed, 16 insertions, 1 deletions
diff --git a/www/js/views/sent.js b/www/js/views/sent.js index 179d9f7..d146db6 100644 --- a/www/js/views/sent.js +++ b/www/js/views/sent.js @@ -9,7 +9,8 @@ 'pagehide': 'destroy', 'pagebeforeshow': 'beforeDisplay', 'pageshow': 'afterDisplay', - 'vclick .ui-btn-left': 'onClickButtonPrev' + 'vclick .ui-btn-left': 'onClickButtonPrev', + 'vclick #rate_app': 'onClickRateApp' }, render: function(){ @@ -21,6 +22,14 @@ this.$el.html(template(FMS.createdReport.toJSON())); this.afterRender(); return this; + }, + + onClickRateApp: function(e) { + e.preventDefault(); + var el = $('#rate_app'); + var href = el.attr('href'); + window.open(href, '_system'); + return false; } }) }); diff --git a/www/templates/en/sent.html b/www/templates/en/sent.html index f18a7aa..b4f20b3 100644 --- a/www/templates/en/sent.html +++ b/www/templates/en/sent.html @@ -15,4 +15,10 @@ <p><a onclick="FMS.openExternal(event); return false;" href="<%= site_url %>">View it on the site</a></p> <% } %> + + <% if ( device.platform == 'iOS' ) { %> + <p><a data-role="button" href="itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=<% print( CONFIG.APP_ID ) %>&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software">Please rate this app</a></p> + <% } else if ( device.platform == 'Android' ) { %> + <p><a id="rate_app" data-role="button" href="https://play.google.com/store/apps/details?id=<% print( CONFIG.PLAY_ID ) %>">Please rate this app</a></p> + <% } %> </div> |