From 2ef67d53f4f171ba876e9e360dba7b8e504d62eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Fri, 12 Jun 2020 20:13:43 +0200 Subject: [PATCH] MAPG-28 fix static asset paths (add STATIC_ROOT and REVISION) --- public/static/js/game.js | 8 ++++---- public/static/js/map_editor.js | 6 +++--- views/admin/map_editor.php | 2 +- views/game.php | 2 +- views/templates/header.php | 2 +- views/templates/main_footer.php | 4 ++++ views/templates/main_header.php | 10 +++++----- 7 files changed, 19 insertions(+), 15 deletions(-) diff --git a/public/static/js/game.js b/public/static/js/game.js index 4145750..c961b1f 100644 --- a/public/static/js/game.js +++ b/public/static/js/game.js @@ -229,7 +229,7 @@ clickable: true, draggable: false, icon: { - url: '/static/img/markers/marker-green.svg', + url: STATIC_ROOT + '/img/markers/marker-green.svg?rev=' + REVISION, size: new google.maps.Size(24, 32), scaledSize: new google.maps.Size(24, 32), anchor: new google.maps.Point(12, 32) @@ -248,7 +248,7 @@ clickable: false, draggable: false, icon: { - url: '/static/img/markers/marker-gray-empty.svg', + url: STATIC_ROOT + '/img/markers/marker-gray-empty.svg?rev=' + REVISION, size: new google.maps.Size(24, 32), scaledSize: new google.maps.Size(24, 32), anchor: new google.maps.Point(12, 32), @@ -319,7 +319,7 @@ var round = Game.rounds[i]; round.realMarker.setIcon({ - url: '/static/img/markers/marker-green-empty.svg', + url: STATIC_ROOT + '/img/markers/marker-green-empty.svg?rev=' + REVISION, size: new google.maps.Size(24, 32), scaledSize: new google.maps.Size(24, 32), anchor: new google.maps.Point(12, 32), @@ -411,7 +411,7 @@ clickable: false, draggable: true, icon: { - url: '/static/img/markers/marker-gray-empty.svg', + url: STATIC_ROOT + '/img/markers/marker-gray-empty.svg?rev=' + REVISION, size: new google.maps.Size(24, 32), scaledSize: new google.maps.Size(24, 32), anchor: new google.maps.Point(12, 32), diff --git a/public/static/js/map_editor.js b/public/static/js/map_editor.js index 156d1ce..65cfa24 100644 --- a/public/static/js/map_editor.js +++ b/public/static/js/map_editor.js @@ -327,17 +327,17 @@ var IconCollection = { iconGreen: L.icon({ - iconUrl: '/static/img/markers/marker-green.svg', + iconUrl: STATIC_ROOT + '/img/markers/marker-green.svg?rev' + REVISION, iconSize: [24, 32], iconAnchor: [12, 32] }), iconRed: L.icon({ - iconUrl: '/static/img/markers/marker-red.svg', + iconUrl: STATIC_ROOT + '/img/markers/marker-red.svg?rev=' + REVISION, iconSize: [24, 32], iconAnchor: [12, 32] }), iconBlue: L.icon({ - iconUrl: '/static/img/markers/marker-blue.svg', + iconUrl: STATIC_ROOT + '/img/markers/marker-blue.svg?rev=' + REVISION, iconSize: [24, 32], iconAnchor: [12, 32] }), diff --git a/views/admin/map_editor.php b/views/admin/map_editor.php index cefbb24..ffc2be6 100644 --- a/views/admin/map_editor.php +++ b/views/admin/map_editor.php @@ -17,7 +17,7 @@ $jsFiles = [

- + MapGuesser

diff --git a/views/game.php b/views/game.php index e026764..6760866 100644 --- a/views/game.php +++ b/views/game.php @@ -12,7 +12,7 @@ $jsFiles = [

- + MapGuesser

diff --git a/views/templates/header.php b/views/templates/header.php index 033c791..b4998c8 100644 --- a/views/templates/header.php +++ b/views/templates/header.php @@ -1,7 +1,7 @@

- + MapGuesser

diff --git a/views/templates/main_footer.php b/views/templates/main_footer.php index 06b8035..f1008bc 100644 --- a/views/templates/main_footer.php +++ b/views/templates/main_footer.php @@ -1,3 +1,7 @@ + - - - - + + + +
- +
\ No newline at end of file