From 9d971a56542072b5001ad77aa62ec04531bfeb67 Mon Sep 17 00:00:00 2001 From: Arona Jones Date: Wed, 22 Dec 2021 11:58:48 +0000 Subject: [PATCH] Initial fixes --- RIGS/templates/event_detail.html | 4 ++- RIGS/templates/event_form.html | 14 ++++++++- RIGS/templates/event_print.xml | 8 ++++++ RIGS/templates/event_print_page.xml | 6 ++-- RIGS/templates/partials/event_details.html | 3 +- RIGS/templates/partials/item_row.html | 3 +- gulpfile.js | 5 +++- package-lock.json | 33 ++++++++++++++++++++++ package.json | 1 + pipeline/source_assets/scss/screen.scss | 30 ++++++++++++++++++++ 10 files changed, 98 insertions(+), 9 deletions(-) diff --git a/RIGS/templates/event_detail.html b/RIGS/templates/event_detail.html index a0afc50e..b04089fb 100644 --- a/RIGS/templates/event_detail.html +++ b/RIGS/templates/event_detail.html @@ -1,5 +1,7 @@ {% extends request.is_ajax|yesno:"base_ajax.html,base_rigs.html" %} +{% load markdown_tags %} + {% block content %}
{% if not request.is_ajax %} @@ -43,7 +45,7 @@ {% if perms.RIGS.view_event %}

Notes


-

{{ event.notes|linebreaksbr }}

+

{{ event.notes|markdown }}

{% endif %}
{% include 'partials/item_table.html' %} diff --git a/RIGS/templates/event_form.html b/RIGS/templates/event_form.html index dd98c17a..cc896930 100644 --- a/RIGS/templates/event_form.html +++ b/RIGS/templates/event_form.html @@ -8,11 +8,13 @@ {% block css %} {{ block.super }} + {% endblock %} {% block preload_js %} {{ block.super }} + {% endblock %} {% block js %} @@ -63,6 +65,16 @@ {% endif %} }); $(document).ready(function () { + setupMDE('#id_description'); + setupMDE('#id_notes'); + setupMDE('#item_description'); + + $('#itemModal').on('shown.bs.modal', function (e) { + $('#item_description').data('mde_editor').value( + $('#item_description').val() + ); + }); + setupItemTable($("#{{ form.items_json.id_for_label }}").val()); }); $(function () { @@ -345,7 +357,7 @@
- {% render_field form.notes class+="form-control" %} + {% render_field form.notes class+="form-control md-enabled" %}
{% include 'partials/item_table.html' %} diff --git a/RIGS/templates/event_print.xml b/RIGS/templates/event_print.xml index 133fef1d..e43ea413 100644 --- a/RIGS/templates/event_print.xml +++ b/RIGS/templates/event_print.xml @@ -74,6 +74,14 @@ + + + +