-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More realistic alternative to `current` Add custom elements scaffold looks right, doesn't open found a way to use import, but not have icons modal texts displayed before script is loaded fix usage of custom elements prototype before it was loaded make it open the modal dont know some progess with native dialogs make it look somewhat like bootstrap progress? make animations work implement confirmation logic ough, now the slots inherit values from the .card-header bar Use `:defined` instead of `.loaded` class more modals and fix blocktrans Allow putting extra stuff under `confirmation-modal` more modals format more modals
- Loading branch information
1 parent
93cf241
commit b94211d
Showing
14 changed files
with
391 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
evap/evaluation/templates/confirmation_modal_template.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{% load static %} | ||
|
||
<template id="confirmation-modal-template"> | ||
<link rel="stylesheet" href="{% static 'css/evap.css' %}" /> | ||
|
||
<dialog class="evap-modal-dialog"> | ||
<form method="dialog"> | ||
<div class="evap-modal-container"> | ||
<header> | ||
<h5><slot name="title"></slot></h5> | ||
<button class="btn-close"></button> | ||
</header> | ||
<section class="question-area"> | ||
<slot name="question"></slot> | ||
<slot name="extra-inputs"></slot> | ||
</section> | ||
<section class="button-area"> | ||
<button class="btn btn-light">{% trans 'Cancel' %}</button> | ||
<slot name="submit-group"> | ||
<button class="btn ms-2" data-event-type="confirm"> | ||
<slot name="action-text"></slot> | ||
</button> | ||
</slot> | ||
</section> | ||
</div> | ||
</form> | ||
</dialog> | ||
|
||
<slot name="show-button"></slot> | ||
|
||
{# All children without the "slot" attribute go into this unnamed slot #} | ||
<slot></slot> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{% load static %} | ||
|
||
{% include "confirmation_modal_template.html" %} | ||
|
||
<script type="module"> | ||
import { ConfirmationModal } from "{% static 'js/confirmation-modal.js' %}"; | ||
|
||
customElements.define("confirmation-modal", ConfirmationModal); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.