Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/build/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"isEntry": true
},
"resources/js/app.js": {
"file": "assets/app-CEaP14Ci.js",
"file": "assets/app-BnlgfPey.js",
"name": "app",
"src": "resources/js/app.js",
"isEntry": true,
Expand Down
37 changes: 37 additions & 0 deletions public/js/ext/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2398,6 +2398,16 @@ var SEMICOLON = SEMICOLON || {};
// el.darkRetinaLogo.prependTo("body");
// el.darkLogo.css({'position':'absolute','z-index':'-100'});
// el.darkRetinaLogo.css({'position':'absolute','z-index':'-100'});

if (document.getElementById('scroll-to-venue')) {
document.getElementById('scroll-to-venue').addEventListener('click', function () {
const venueTable = document.getElementById('venue-table');
if (venueTable) {
const top = venueTable.getBoundingClientRect().top + window.pageYOffset - 150;
window.scrollTo({ top, behavior: 'smooth' });
}
});
}
}

};
Expand Down Expand Up @@ -2573,3 +2583,30 @@ var SEMICOLON = SEMICOLON || {};
$window.on( 'resize', SEMICOLON.documentOnResize.init );

})(jQuery);

(function pollForSemicolonAndDOM() {
let attempts = 0;
const MAX_ATTEMPTS = 10;

const interval = setInterval(() => {
attempts++;

const wrapper = document.getElementsByClassName('new-layout')[0];
const isSemicolonReady =
typeof window.SEMICOLON !== 'undefined' &&
typeof SEMICOLON.documentOnReady?.init === 'function';

if (wrapper && isSemicolonReady) {
console.log('[SAFE INIT] SEMICOLON rebind triggered via polling');
SEMICOLON.documentOnReady.init();
SEMICOLON.documentOnLoad.init();
SEMICOLON.documentOnResize.init();
clearInterval(interval);
}

if (attempts >= MAX_ATTEMPTS) {
console.warn('[SAFE INIT] SEMICOLON rebind failed after polling timeout');
clearInterval(interval);
}
}, 500);
})();
5 changes: 1 addition & 4 deletions resources/js/components/activity-form/AddConfirmation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,6 @@ export default {
].join(', '),
].join(' - ');
const ageValues = (ages || []).map((item) => ageOptionsMap.value[item]);
const teacherValues = (leading_teacher_tag || []).map(
(item) => props.leadingTeachers.find(({ id }) => id === item)?.name
);

const step2List = [
{
Expand Down Expand Up @@ -177,7 +174,7 @@ export default {
},
{
label: trans('community.titles.2'),
value: teacherValues?.join(', '),
value: leading_teacher_tag,
},
{
label: trans('event.image'),
Expand Down
7 changes: 6 additions & 1 deletion resources/js/components/activity-form/FormStep2.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
<SelectField
v-model="formValues.leading_teacher_tag"
name="leading_teacher_tag"
:options="leadingTeachers"
:options="leadingTeacherOptions"
/>
</FieldWrapper>

Expand Down Expand Up @@ -216,6 +216,10 @@ export default {
setup(props, { emit }) {
const { ageOptions } = useDataOptions();

const leadingTeacherOptions = computed(() =>
props.leadingTeachers.map((name) => ({ id: name, name }))
);

const onPictureChange = (data) => {
props.formValues.picture = data.imageName;
props.formValues.pictureUrl = data.path;
Expand All @@ -231,6 +235,7 @@ export default {
};

return {
leadingTeacherOptions,
ageOptions,
onPictureChange,
handleCorrectCount,
Expand Down
13 changes: 2 additions & 11 deletions resources/js/components/activity-form/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ export default {
CheckboxField,
},
setup(props, { emit }) {
console.log('event', props.event);
const { stepTitles } = useDataOptions();

const newEvent = ref(null);
Expand Down Expand Up @@ -518,9 +519,7 @@ export default {
),
codeweek_for_all_participation_code:
event.codeweek_for_all_participation_code,
leading_teacher_tag: event.leading_teacher_tag
? Number(event.leading_teacher_tag)
: null,
leading_teacher_tag: event.leading_teacher_tag,
picture: event.picture,
pictureUrl: props.selectedValues.picture,

Expand All @@ -536,14 +535,6 @@ export default {
user_email: event.user_email,
};

formValues.value.leading_teacher_tag = event.leading_teacher_tag || [];
if (
typeof event.leading_teacher_tag === 'number' ||
typeof event.leading_teacher_tag === 'string'
) {
formValues.value.leading_teacher_tag = [event.leading_teacher_tag];
}

if (event.recurring_event) {
formValues.value.is_recurring_event_local = 'true';
}
Expand Down
12 changes: 5 additions & 7 deletions resources/views/layout/new_base.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@
@else
<title>EU Code Week</title>
@endif

<!-- Start - Cookie Bot -->
<script id="Cookiebot" src="https://consent.cookiebot.com/uc.js" data-cbid="719385d2-f5d2-4806-8352-72e5ebe53996" data-blockingmode="auto" type="text/javascript"></script>
<!-- End - Cookie Bot -->

</head>

<body class="new-layout">
Expand Down Expand Up @@ -186,13 +181,12 @@ classList = ['scale-0', 'opacity-0', 'translate-y-1/2'];
};
</script>

@vite('resources/js/app.js')
<script type="text/javascript" src="{{ asset('lib/jquery/jquery.js') }}"></script>
{{--<script src=//cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.min.js charset=utf-8></script>--}}
<script type="text/javascript" src="{{ asset('js/ext/plugins.js') }}"></script>
@include('scripts.countdown')
<script type="text/javascript" src="{{ asset('plugins/slick-slider/slick.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/ext/functions.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/ext/functions.js') }}" data-cookieconsent="necessary"></script>
@livewireScripts
<script src="https://unpkg.com/vue-select@latest"></script>
{{-- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js"></script>--}}
Expand All @@ -208,5 +202,9 @@ classList = ['scale-0', 'opacity-0', 'translate-y-1/2'];
window.Livewire.start();
}
</script>

<!-- Start - Cookie Bot -->
<script id="Cookiebot" src="https://consent.cookiebot.com/uc.js" data-cbid="719385d2-f5d2-4806-8352-72e5ebe53996" data-blockingmode="auto" type="text/javascript"></script>
<!-- End - Cookie Bot -->
</body>
</html>
12 changes: 0 additions & 12 deletions resources/views/locations/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,3 @@ class="duration-500 transform -translate-x-6 min-w-4 group-hover:translate-x-0"
</section>
</section>
@endsection

@push('scripts')
<script type="text/javascript">
document.getElementById('scroll-to-venue').addEventListener('click', function () {
const venueTable = document.getElementById('venue-table');
if (venueTable) {
const top = venueTable.getBoundingClientRect().top + window.pageYOffset - 150;
window.scrollTo({ top, behavior: 'smooth' });
}
});
</script>
@endpush
Loading