Skip to content

Commit

Permalink
Merge pull request #720 from TheRestartProject/RES-1959_iframe_embed_…
Browse files Browse the repository at this point in the history
…stats

RES-1959 IFRAME embed stats
  • Loading branch information
edwh committed Apr 8, 2024
2 parents f43f629 + 40993fd commit 31bfe6c
Show file tree
Hide file tree
Showing 9 changed files with 664 additions and 580 deletions.
5 changes: 5 additions & 0 deletions app/Http/Controllers/OutboundController.php
Expand Up @@ -104,6 +104,11 @@ public static function info($type, $id, $format = 'fixometer', $return = 'view')
$title = 'Like manufacturing';
$measure = 'half car';
$equal_to = round($co2 / 3000);
} elseif ($format == 'leaf') { // Display new sapling / hectare stats.
// All constructed in Vue. We pass the raw CO2 value.
$title = '';
$measure = '';
$equal_to = $co2;
} else { // Display sofa
$title = 'Like manufacturing';
$measure = 'sofa';
Expand Down
5 changes: 4 additions & 1 deletion resources/js/app.js
Expand Up @@ -53,6 +53,7 @@ import VenueAddress from './components/VenueAddress.vue'
import RichTextEditor from './components/RichTextEditor'
import Notifications from './components/Notifications'
import GroupTimeZone from './components/GroupTimeZone'
import StatsShare from './components/StatsShare.vue'

// Without this, the default map marker doesn't appear in production. Fairly well-known problem.
// eslint-disable-next-line
Expand Down Expand Up @@ -776,7 +777,7 @@ function initAutocomplete() {
jQuery(document).ready(function () {
groupsMap();

if (window.gdprCookieNotice) {
if (window.gdprCookieNotice && !window.noCookieNotice) {
gdprCookieNotice({
locale: 'en',
timeout: 500, //Time until the cookie bar appears
Expand Down Expand Up @@ -1292,6 +1293,7 @@ jQuery(document).ready(function () {
// resources/js/components. Lower level components can be included from within those as normal;
// they don't need listing here.
$(".vue").each(function(index) {
console.log('Create vue', $(this).get(0))
new Vue({
el: $(this).get(0),
store: store,
Expand All @@ -1317,6 +1319,7 @@ jQuery(document).ready(function () {
'richtexteditor': RichTextEditor,
'notifications': Notifications,
'grouptimezone': GroupTimeZone,
'statsshare': StatsShare,
}
})
})
Expand Down

0 comments on commit 31bfe6c

Please sign in to comment.