diff --git a/adminlte2_pdq/static/adminlte2_pdq/conflicts/conflicts.css b/adminlte2_pdq/static/adminlte2_pdq/conflicts/conflicts.css index ccc9243f511b7b820f9b4f6562efd4b2b7c1e05a..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 --- a/adminlte2_pdq/static/adminlte2_pdq/conflicts/conflicts.css +++ b/adminlte2_pdq/static/adminlte2_pdq/conflicts/conflicts.css @@ -1,153 +0,0 @@ -/* Handle any CSS conflicts between the various libraries */ - -/* -The django admin css applies a blanket square style to 'ul li', -this messes with our dropdown menus. -*/ -ul.dropdown-menu li, -ul.treeview-menu li { - list-style: none; - padding: initial; -} - -/* Fix datepickers in admin */ -.calendarbox, .clockbox { - z-index: 900; -} - -/* -Fix headers to remove the django base css -*/ -h1 { - margin: 0; - font-weight: 500; - color: inherit; -} - -/* -Fix headers in modals on admin pages -*/ -h4.modal-title { - font-size: initial; -} - -/* -Prevent label-success green from blending in with navbar green. -*/ -.skin-green-light .main-header .navbar .label-success { - /* background-color: white !important; - color: #00a65a !important; */ - /* font-size: 1em !important; */ - border: 1px solid white; -} - -/* -Fix extra padding added to nav-bar header from base.css -*/ -ul.nav > li, -ul.nav-bar-nav > li { - padding: 0; -} - -/* -Fix error lists so that the default is not have a style or margin -*/ -.error-list > ul { - list-style: none; - margin: 0; - padding: 0; -} - -/* Show scrollbars if form too wide */ -fieldset.module { - overflow: auto; -} - -/* -Show form errors for checkboxes too. -(Based on '.form-group.has-error .help-block') -*/ -.checkbox.has-error .help-block, -.checkbox.has-error label { - color: #dd4b39; -} - -/* -Fix error in content with content-main div -*/ -#content-main { - float: none; -} - -/* -Put object tools closer to the filter so it doesn't clash with other elements. -*/ -.object-tools { - margin-top: 0px; - position: inherit; - margin: 0 15px 15px 15px; -} - -/* -Fix error in delete button where it was not tall enough -*/ -.submit-row a.deletelink { - height: auto; - color: #fff; -} - -.delete-confirmation form a.cancel-link { - height: auto; -} - -/* -Fix color on links that are styled as buttons -*/ -a.btn-default { - color:#444; -} - -/* -Fix color on links that are styled as alerts -*/ -.alert a:link, -.alert a:visited { - color: #fff; - text-decoration: underline; -} - -/* -Bootstrap has a class 'collapse' that hides the element. -This conflicts with the admin that uses 'collapse' to signify -that an element can be 'collapsed' but isn't always hidden. -*/ -.admin-change-form .collapse { - display: block; -} -/* -For some reason the text that is str(object) for above inlines is cut off -because the height is only 1.1em. I reset it to initial here to fix that. -*/ -.inline-group .tabular td.original p { - height: initial; -} - -/* -Prevent tooltip opacity -*/ -.tooltip.in { - opacity: 1; -} - -/* -Prevent datepicker from being underneath top headers. -*/ -div.datepicker.datepicker-dropdown.dropdown-menu { - z-index: 1100 !important; -} - -@media (max-width: 767px) { - .selector ul.selector-chooser { - width: 56px; - } -} diff --git a/adminlte2_pdq/static/adminlte2_pdq/conflicts/django-admin-conflicts.css b/adminlte2_pdq/static/adminlte2_pdq/conflicts/django-admin-conflicts.css new file mode 100644 index 0000000000000000000000000000000000000000..d4a06614208212a74e1607517fb7b39a87e97702 --- /dev/null +++ b/adminlte2_pdq/static/adminlte2_pdq/conflicts/django-admin-conflicts.css @@ -0,0 +1,104 @@ +/* Handle any CSS conflicts between the various libraries */ + +/* Fix font-size in django admin which uses rem */ +html { + font-size: 16px; +} + +/* +The django admin css applies a blanket square style to 'ul li', +this messes with our dropdown menus. +*/ +ul.dropdown-menu li, +ul.treeview-menu li { + list-style: none; + padding: initial; +} + +/* Fix datepickers in django admin */ +.calendarbox, .clockbox { + z-index: 900; +} + +/* +Fix h1 tags in django admin by removing the django base css +*/ +h1 { + margin: 0; + font-weight: 500; + color: inherit; +} + +/* +Fix headers in modals on django admin pages +*/ +h4.modal-title { + font-size: initial; +} + +/* +Fix django admin where extra padding is added to nav-bar header from base.css +*/ +ul.nav > li, +ul.nav-bar-nav > li { + padding: 0; +} + +/* +Fix error lists in django admin so that the default does not have a style or margin +*/ +.error-list > ul { + list-style: none; + margin: 0; + padding: 0; +} + +/* Show scroll bars if form in django admin is too wide */ +fieldset.module { + overflow: auto; +} + +/* +Fix error in content with content-main div +NOTE: Checked on 08-29-22 and seemed to make no difference. Left in case still needed. +*/ +#content-main { + float: none; +} + +/* +Put django admin object tools closer to the filter so it doesn't clash with other elements. +*/ +.object-tools { + margin-top: 0px; + position: inherit; + margin: 0 15px 15px 15px; +} + +/* +Fix error in django admin where delete button and cancel button were not tall enough +*/ +.submit-row a.deletelink { + height: auto; + color: #fff; +} + +.delete-confirmation form a.cancel-link { + height: auto; +} + +/* +Bootstrap has a class 'collapse' that hides the element. +This conflicts with the django admin that uses 'collapse' to signify +that an element can be 'collapsed' but isn't always hidden. +*/ +.admin-change-form .collapse { + display: block; +} +/* +In django admin, for some reason the text that is str(object) above inlines is +cut off because the height is only 1.1em. I reset it to initial here to fix that. +*/ +.inline-group .tabular td.original p { + height: initial; +} diff --git a/adminlte2_pdq/static/adminlte2_pdq/extra-features/extra-features.css b/adminlte2_pdq/static/adminlte2_pdq/extra-features/extra-features.css index fbc71e28696961df3f3be15ad48e3c7d55c765c3..7874bcb5f083d6ec9a498636a49efa571e07469a 100644 --- a/adminlte2_pdq/static/adminlte2_pdq/extra-features/extra-features.css +++ b/adminlte2_pdq/static/adminlte2_pdq/extra-features/extra-features.css @@ -91,6 +91,14 @@ ul.no-bullets { display: block; } +/* +Prevent tooltip opacity +*/ +.tooltip.in { + opacity: 1; +} + +/* Add various colored tooltips */ .tooltip-default + .tooltip.top .tooltip-arrow, .tooltip-default.tooltip.top .tooltip-arrow { border-top-color: #d2d6de; } @@ -784,6 +792,28 @@ ul.no-bullets { background-color: #000000; } +/* Fix adminlte buttons in box-header on hover */ +.box.box-solid > .box-header .btn.btn-primary:hover, +.box.box-solid > .box-header a.btn.btn-primary:hover { + background-color: #367fa9; +} +.box.box-solid > .box-header .btn.btn-info:hover, +.box.box-solid > .box-header a.btn.btn-info:hover { + background-color: #00acd6; +} +.box.box-solid > .box-header .btn.btn-success:hover, +.box.box-solid > .box-header a.btn.btn-success:hover { + background-color: #008d4c; +} +.box.box-solid > .box-header .btn.btn-warning:hover, +.box.box-solid > .box-header a.btn.btn-warning:hover { + background-color: #e08e0b; +} +.box.box-solid > .box-header .btn.btn-danger:hover, +.box.box-solid > .box-header a.btn.btn-danger:hover { + background-color: #d73925; +} + /* Allow buttons in dropdown-menus and allow coloring with info,primary, etc. */ .dropdown-menu > li > a, .dropdown-menu > li > input, .dropdown-menu > li > button { display: block; @@ -1464,6 +1494,15 @@ Add support for Font Awesome 5 icons transform: rotate(30deg); } +/* Form tweaks */ +/* +Show form errors for checkboxes too. +(Based on '.form-group.has-error .help-block') +*/ +.checkbox.has-error .help-block, +.checkbox.has-error label { + color: #dd4b39; +} /** Add 'wiggle' to an element to have it rotate left and right quickly. Works well with bell icon: fa fa-bell diff --git a/adminlte2_pdq/templates/admin/base.html b/adminlte2_pdq/templates/admin/base.html index c81b83e8644642558b972facad7f130023dbc2b7..9aa2abec7b8b97afa92ca01e2915860c82831078 100755 --- a/adminlte2_pdq/templates/admin/base.html +++ b/adminlte2_pdq/templates/admin/base.html @@ -22,6 +22,12 @@ <!-- End Admin extrastyle --> {% endblock global_stylesheets %} +{% block global_conflict_stylesheets %} + {{ block.super }} + {# Conflicts is here because must override all previous library css including django admin. #} + <link rel="stylesheet" type="text/css" href="{% static 'adminlte2_pdq/conflicts/django-admin-conflicts.css' %}"> +{% endblock global_conflict_stylesheets %} + {% block global_javascript_head %} {{ block.super }} <!-- Admin extrahead --> diff --git a/adminlte2_pdq/templates/adminlte2/base.html b/adminlte2_pdq/templates/adminlte2/base.html index ae0f8cb72e21e8c325b45d28e5c6b11cb9b40898..271157bbf0f63fc592b5b0689ff666a57a27bcdd 100755 --- a/adminlte2_pdq/templates/adminlte2/base.html +++ b/adminlte2_pdq/templates/adminlte2/base.html @@ -26,16 +26,20 @@ {% block global_stylesheets %} {% include 'adminlte2/partials/_styles.html' %} {% endblock global_stylesheets %} - {# Conflicts is here because must override all previous library css. #} - <link rel="stylesheet" type="text/css" href="{% static 'adminlte2_pdq/conflicts/conflicts.css' %}"> + {% block global_conflict_stylesheets %} + {# Conflicts is here because must override all previous library css. #} + <link rel="stylesheet" type="text/css" href="{% static 'adminlte2_pdq/conflicts/conflicts.css' %}"> + {% endblock global_conflict_stylesheets %} {% block page_stylesheets %} {% endblock page_stylesheets %} {% block global_javascript_head %} {% include 'adminlte2/partials/_scripts.html' %} {% endblock global_javascript_head %} - {# Conflicts is here because must override all previous library js. #} - <script src="{% static 'adminlte2_pdq/conflicts/conflicts.js' %}"></script> + {% block global_conflict_javascript_head %} + {# Conflicts is here because must override all previous library js. #} + <script src="{% static 'adminlte2_pdq/conflicts/conflicts.js' %}"></script> + {% endblock global_conflict_javascript_head %} {% block page_javascript_head %} {% endblock page_javascript_head %} </head> diff --git a/adminlte2_pdq/templates/adminlte2/demo_css.html b/adminlte2_pdq/templates/adminlte2/demo_css.html index fe5abccde8e50c6f25ca9d46ca37ae644833009e..45aa42e3ec20c3e4d3382ef52f2670aa8628c15f 100644 --- a/adminlte2_pdq/templates/adminlte2/demo_css.html +++ b/adminlte2_pdq/templates/adminlte2/demo_css.html @@ -52,6 +52,29 @@ </div> </div> + {# Anchor Buttons #} + <div class="box box-solid box-default"> + <div class="box-header with-border"> + <h3 class="box-title">Anchor Buttons</h3> + </div> + <div class="box-body"> + <div class="row"> + <div class="col-sm-12"> + <h4><i class="fa fa-hand-o-up"></i> Buttons</h4> + </div> + </div> + <div class="row"> + {% for bootstrap_type in bootstrap_types %} + <div class="col-sm-2" style="margin-bottom:10px;"> + <a href="#" class="btn btn-{{ bootstrap_type }}"> + {{ bootstrap_type }} + </a> + </div> + {% endfor %} + </div> + </div> + </div> + {# Buttons #} <div class="box box-solid box-default"> <div class="box-header with-border"> diff --git a/adminlte2_pdq/templates/adminlte2/partials/_styles.html b/adminlte2_pdq/templates/adminlte2/partials/_styles.html index b90e6d9cbcd679cd99315749c67f2cddcd90f2aa..4b90078747094784cdd94d028960f6779c7cebdf 100644 --- a/adminlte2_pdq/templates/adminlte2/partials/_styles.html +++ b/adminlte2_pdq/templates/adminlte2/partials/_styles.html @@ -5,8 +5,6 @@ <!-- bootstrap --> <link rel="stylesheet" type="text/css" href="{% static 'third-party/bootstrap/3.3.7/css/bootstrap.min.css' %}"> - <!-- bootstrap-datepicker --> - <link rel="stylesheet" type="text/css" href="{% static 'third-party/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.standalone.min.css' %}"> <!-- Font Awesome 5 NOTE: Must load 5 before 4 to avoid conflicts --> <link rel="stylesheet" type="text/css" href="{% static 'third-party/font-awesome-5/5.8.2/css/all.min.css' %}"> <!-- Font Awesome 4 --> @@ -17,8 +15,7 @@ {% else %} <!-- bootstrap --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" /> - <!-- bootstrap-datepicker --> - <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.standalone.min.css" integrity="sha256-jO7D3fIsAq+jB8Xt3NI5vBf3k4tvtHwzp8ISLQG4UWU=" crossorigin="anonymous" /> + <!-- Font Awesome 5 NOTE: Must load 5 before 4 to avoid conflicts --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.min.css" integrity="sha256-BtbhCIbtfeVWGsqxk1vOHEYXS6qcvQvLMZqjtpWUEx8=" crossorigin="anonymous" /> <!-- Font Awesome 4 -->