From fd85d506795162a02b54179e52ba4472c01b2258 Mon Sep 17 00:00:00 2001 From: FreneticScribbler Date: Mon, 12 Oct 2020 22:16:09 +0100 Subject: [PATCH] Remove flash of content when loading new rig page --- RIGS/templates/event_form.html | 38 +++++++++++-------- .../partials/contact_details_form.html | 4 +- .../partials/event_details_form.html | 2 +- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/RIGS/templates/event_form.html b/RIGS/templates/event_form.html index e9a6528a..b31b3d4f 100644 --- a/RIGS/templates/event_form.html +++ b/RIGS/templates/event_form.html @@ -45,7 +45,6 @@ } $('#'+id_end_time).val('02:00'); } - $(document).ready(function () { {% if not object.pk and not form.errors %} $('.form-hws').slideUp(function () { @@ -56,9 +55,9 @@ $('.form-is_rig').hide(); } {% endif %} - {% if not object.pk %} $('#is_rig-selector button').on('click', function () { + $('.form-hws').removeAttr('style'); $('.form-non_rig').slideDown(); if ($(this).data('is_rig') == 1) { $('#{{form.is_rig.auto_id}}').prop('checked', true); @@ -82,6 +81,13 @@ $('[data-toggle="tooltip"]').tooltip(); }) + {% endblock %} {% block content %} @@ -98,20 +104,20 @@ {# New rig buttons #} {% if not object.pk %} -
-
-
- - - - - - -
+
+
+
+ + + + + +
+
{% endif %} {# Contact details #} @@ -122,7 +128,7 @@ {# Notes and item shit #}
-
+