Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cal-5] Added the calendar-modal #318

Closed
wants to merge 2 commits into from
Closed
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
4 changes: 3 additions & 1 deletion webclient/src/views/view/i18n-view.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ view_view:
share: { de: "Teilen", en: "Share" }
share_link: { de: "Teilen mit ...", en: "Share with ..." }
copied: { de: "Kopiert", en: "Copied" }
calendar: { de: "Kalender öffnen", en: "Open calendar" }
calendar:
open: { de: "Kalender öffnen", en: "Open calendar" }
close: { de: "Kalender schließen", en: "Close calendar" }
feedback:
de: "Problem melden oder Änderung vorschlagen"
en: "Report issue or suggest changes"
Expand Down
29 changes: 27 additions & 2 deletions webclient/src/views/view/view-view.inc
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@
<a
class="btn btn-link btn-action btn-sm"
v-if="view_data.props?.calendar_url"
v-bind:href="view_data.props.calendar_url"
target="_blank"
title="${{ _.view_view.header.calendar }}$"
>
<svg
Expand Down Expand Up @@ -184,6 +182,33 @@
</div>
</div>
<div class="divider"></div>
<!-- Modal-Calendar -->
<div
class="modal modal-lg"
id="modal-calendar"
v-bind:class="{active: calendar.modalOpen}"
>
<a
class="modal-overlay"
aria-label="Close"
@click="calendar.modalOpen=false"
>
</a>
<div class="modal-container modal-fullheight" id="calendarModal-container">
<div class="modal-header">
<button
class="btn btn-clear float-right"
aria-label="${{_.view_view.header.calendar.close}}$"
@click="calendar.modalOpen=false"
></button>
</div>
<div class="modal-body">
<div class="content" id="modalCalendarContent">
<iframe src="view_data.props.calendar_url" id="calendarModalIFrame"></iframe>
</div>
</div>
</div>
</div>
</div>

<!-- First info section (map + infocard) -->
Expand Down
3 changes: 3 additions & 0 deletions webclient/src/views/view/view-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ navigatum.registerView("view", {
body_backup: null,
force_reopen: false,
},
calendar: {
modalOpen: false,
},
browser_supports_share: "share" in navigator,
};
},
Expand Down
14 changes: 14 additions & 0 deletions webclient/src/views/view/view-view.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,20 @@
}
}

/* --- Modal Calendar --- */
#modal-calendar {
align-items: baseline;

& .modal-container {
position: relative;
top: 5em;
}
}

#calendarModalIFrame {
width: 100%;
}

/* --- Pending coordinates counter --- */
.coord-counter {
margin: 8px 0;
Expand Down