diff options
author | Steven Day <steve@mysociety.org> | 2016-04-28 14:43:26 +0100 |
---|---|---|
committer | Steven Day <steve@mysociety.org> | 2016-04-28 14:43:26 +0100 |
commit | 6b6e227bd7e9e5af69274c9d71a6bd28573cdad5 (patch) | |
tree | 78cb530020a713813fd96a4042be47b3c2285e6a | |
parent | 3bc83903d0c3467d0659b9fb47374a476b4a0a3f (diff) | |
parent | ccce5414fc8f3242ad531c53811c8174ee5f69ba (diff) |
Merge remote-tracking branch 'mysociety/cordova-6-fix-double-slash' into cordova-6
-rw-r--r-- | www/js/config.js-example | 3 | ||||
-rw-r--r-- | www/js/locate.js | 2 | ||||
-rw-r--r-- | www/js/models/report.js | 7 |
3 files changed, 6 insertions, 6 deletions
diff --git a/www/js/config.js-example b/www/js/config.js-example index 75c66f9..49c2003 100644 --- a/www/js/config.js-example +++ b/www/js/config.js-example @@ -6,7 +6,8 @@ var CONFIG = { APP_NAME: 'FixMyStreet', // URL of the fixmystreet install to report to. See also config.xml-example - FMS_URL: 'http://fixmystreet.example.org/', + // Make sure it does *not* end with a slash. + FMS_URL: 'http://fixmystreet.example.org', // Name of the cobrand to use for templates, stylesheets etc. // Cobrand files should be placed in a new directory within www/cobrands/ diff --git a/www/js/locate.js b/www/js/locate.js index 97beece..b589ddf 100644 --- a/www/js/locate.js +++ b/www/js/locate.js @@ -108,7 +108,7 @@ } var that = this; $.ajax( { - url: CONFIG.FMS_URL + 'report/new/ajax', + url: CONFIG.FMS_URL + '/report/new/ajax', global: showSpinner, dataType: 'json', data: { diff --git a/www/js/models/report.js b/www/js/models/report.js index 9e6290c..1a72e73 100644 --- a/www/js/models/report.js +++ b/www/js/models/report.js @@ -1,7 +1,7 @@ (function(FMS, Backbone, _, $) { _.extend( FMS, { Report: Backbone.Model.extend({ - urlRoot: CONFIG.FMS_URL + 'report/ajax', + urlRoot: CONFIG.FMS_URL + '/report/ajax', defaults: { lat: 0, @@ -36,7 +36,6 @@ lon: res.report.longitude, title: res.report.title, details: res.report.detail, - photo: res.report.photo && res.report.photo.url ? CONFIG.FMS_URL + res.report.photo.url : null, meta: res.report.meta, confirmed_pp: res.report.confirmed_pp, created_pp: res.report.created_pp, @@ -177,12 +176,12 @@ }); window.setTimeout( checkUpload, 15000 ); FMS.uploading = true; - ft.upload(fileURI, CONFIG.FMS_URL + "report/new/mobile", fileUploadSuccess, fileUploadFail, fileOptions); + ft.upload(fileURI, CONFIG.FMS_URL + "/report/new/mobile", fileUploadSuccess, fileUploadFail, fileOptions); }; setupChecker(); } else { $.ajax( { - url: CONFIG.FMS_URL + "report/new/mobile", + url: CONFIG.FMS_URL + "/report/new/mobile", type: 'POST', data: params, dataType: 'json', |