Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
V13Axel committed Jul 7, 2024
1 parent d868f46 commit 2c3171d
Show file tree
Hide file tree
Showing 27 changed files with 970 additions and 4,099 deletions.
13 changes: 13 additions & 0 deletions resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,16 @@ window.Sortable = Sortable;

import { header_initialize } from './calendar/header.js';
window.header_initialize = header_initialize;

import { update_dynamic, update_view_dynamic, get_all_data, get_dynamic_data, check_last_change } from './calendar/calendar_ajax_functions.js';
window.update_dynamic = update_dynamic;
window.update_view_dynamic = update_view_dynamic;
window.get_all_data = get_all_data;
window.get_dynamic_data = get_dynamic_data;
window.check_last_change = check_last_change;

import { debounce } from './calendar/calendar_functions.js';
window.debounce = debounce;

import { set_up_view_inputs } from './calendar/calendar_inputs_view.js';
window.set_up_view_inputs = set_up_view_inputs;
2 changes: 2 additions & 0 deletions resources/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ Alpine.data('CalendarEventEditor', CalendarEventEditor);
Alpine.data('CalendarEventViewer', CalendarEventViewer);
Alpine.data('CalendarYearHeader', CalendarYearHeader);

import { precisionRound } from './calendar/calendar_functions.js';

Alpine.data('MainApp', () => ({
init: function() {
this.$nextTick(() => {
Expand Down
17 changes: 16 additions & 1 deletion resources/js/calendar-events-editor.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { submit_new_event, submit_edit_event, submit_delete_event } from "./calendar/calendar_ajax_functions";
import { matcher, ordinal_suffix_of, precisionRound } from "./calendar/calendar_functions";

export default () => ({

open: false,
Expand Down Expand Up @@ -2420,7 +2423,19 @@ export default () => ({

this.worker_event_tester.onmessage = e => {
if (e.data.callback) {
update_loading_bar(e.data.percentage, e.data.message);
percentage = precisionRound(percentage, 3);

if (progress == percentage) {
return;
}

loading_bar.set(percentage);

progress = percentage;

if (message) {
$('#loading_information_text').text(message).removeClass("hidden");
}
} else {

event_editor_ui.event_testing.occurrences = e.data.occurrences;
Expand Down
2 changes: 2 additions & 0 deletions resources/js/calendar-events-viewer.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { submit_new_comment, submit_delete_comment, get_event_comments } from "./calendar/calendar_ajax_functions";

export default () => ({

open: false,
Expand Down
2 changes: 2 additions & 0 deletions resources/js/calendar-layouts.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { do_update_all } from "./calendar/calendar_ajax_functions";

export default () => ({

open: false,
Expand Down
1 change: 1 addition & 0 deletions resources/js/calendar-presets.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import RandomCalendar from './random-calendar.js';
import { get_preset_data } from './calendar/calendar_ajax_functions.js';

export default () => ({

Expand Down
2 changes: 2 additions & 0 deletions resources/js/calendar-year-header.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { ordinal_suffix_of } from "./calendar/calendar_functions";

export default () => ({

static_data: undefined,
Expand Down
Loading

0 comments on commit 2c3171d

Please sign in to comment.