Skip to content

Commit

Permalink
feat: move toast parent into footer
Browse files Browse the repository at this point in the history
  • Loading branch information
dodumosu committed Nov 4, 2019
1 parent 55e20d4 commit 34eb5a4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
5 changes: 3 additions & 2 deletions apollo/templates/admin/form_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,10 @@ <h5 id="formImportModalLabel" class="modal-title">{{ _('Import Form') }}</h5>
</div>
</div>
</form>
{{ render_toast_parent(toast_app_id) }}
{% endblock %}

{% block footer %}
{{ render_toast_parent(toast_app_id) }}
{% endblock footer %}
{%- block tail_js %}
{{ super() }}
{{ render_toast_template() }}
Expand Down
4 changes: 3 additions & 1 deletion apollo/templates/admin/locations_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,12 @@ <h3>{{ _('Finalize') }}</h3>
<div class="card-footer">
{{ render_pager(locations, 'locationset.locations_list', args) }}
</div>
{{ render_toast_parent(toast_app_id) }}
</div>
{% endblock %}

{% block footer %}
{{ render_toast_parent(toast_app_id) }}
{% endblock footer %}

{%- block tail_js -%}
{{ super() }}
Expand Down
5 changes: 4 additions & 1 deletion apollo/templates/admin/participant_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@
{{ render_pager(participants, 'participants.participant_list', args) }}
{%- endif %}
</div>
{{ render_toast_parent(toast_app_id) }}

<div class="wizard" id="import-wizard" data-title="{{ _('Import Participants') }}">
<div class="wizard-card" data-cardname="uploadFile">
Expand Down Expand Up @@ -248,6 +247,10 @@ <h3>{{ _('Finalize') }}</h3>
</div>
{%- endblock -%}

{% block footer %}
{{ render_toast_parent(toast_app_id) }}
{% endblock footer %}

{%- block tail_js -%}
{{ super() }}
{{ render_toast_template() }}
Expand Down
2 changes: 1 addition & 1 deletion apollo/templates/admin/task_toast.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

{% macro render_toast_parent(toast_app_id) %}
<div aria-live="polite" aria-atomic="true" id="{{ toast_app_id }}">
<div style="position: absolute; bottom: 2rem; right: 2rem;">
<div style="position: relative; margin-bottom: 2rem; margin-right: 2rem;">
<task-toast v-for="task in tasks" :key="task.id" :task-info="task"></task-toast>
</div>
</div>
Expand Down

0 comments on commit 34eb5a4

Please sign in to comment.