Merge remote-tracking branch 'origin/master' into feature/VAT_number
This commit is contained in:
commit
6eb4b03afe
7 changed files with 46 additions and 16 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
2.8.1: 2019-12-24
|
||||||
|
* [dcl cms navbar plugin]: Provide an option to show non transparent navar always
|
||||||
2.8: 2019-12-20
|
2.8: 2019-12-20
|
||||||
* ldap_migration: Migrate django users to Ldap
|
* ldap_migration: Migrate django users to Ldap
|
||||||
Notes for deployment:
|
Notes for deployment:
|
||||||
|
|
|
@ -184,6 +184,11 @@ class DCLNavbarPluginModel(CMSPlugin):
|
||||||
default=True,
|
default=True,
|
||||||
help_text='Uncheck this if you do not want to show login/dashboard.'
|
help_text='Uncheck this if you do not want to show login/dashboard.'
|
||||||
)
|
)
|
||||||
|
show_non_transparent_navbar_always = models.BooleanField(
|
||||||
|
default=False,
|
||||||
|
help_text='Check this if you want to show non transparent navbar only.'
|
||||||
|
'(Useful when we want to setup a simple page)'
|
||||||
|
)
|
||||||
|
|
||||||
def get_logo_dark(self):
|
def get_logo_dark(self):
|
||||||
# used only if atleast one logo exists
|
# used only if atleast one logo exists
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.9.4 on 2019-12-24 03:34
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('datacenterlight', '0029_auto_20190420_1022'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='dclnavbarpluginmodel',
|
||||||
|
name='show_non_transparent_navbar_always',
|
||||||
|
field=models.BooleanField(default=False, help_text='Check this if you want to show non transparent navbar only.(Useful when we want to setup a simple page)'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -77,6 +77,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function _navScroll() {
|
function _navScroll() {
|
||||||
|
if (!window.non_transparent_navbar_always) {
|
||||||
if ($(window).scrollTop() > 10) {
|
if ($(window).scrollTop() > 10) {
|
||||||
$(".navbar").removeClass("navbar-transparent");
|
$(".navbar").removeClass("navbar-transparent");
|
||||||
$(".navbar-default .btn-link").css("color", "#777");
|
$(".navbar-default .btn-link").css("color", "#777");
|
||||||
|
@ -89,6 +90,7 @@
|
||||||
$(".dropdown-menu > li > a").css("color", "#fff");
|
$(".dropdown-menu > li > a").css("color", "#fff");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_navScroll();
|
_navScroll();
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{% load static i18n custom_tags cms_tags %}
|
{% load static i18n custom_tags cms_tags %}
|
||||||
{% get_current_language as LANGUAGE_CODE %}
|
{% get_current_language as LANGUAGE_CODE %}
|
||||||
|
{% if instance.show_non_transparent_navbar_always %}
|
||||||
<nav class="navbar navbar-default navbar-fixed-top topnav navbar-transparent">
|
<script>window.non_transparent_navbar_always=true;</script>
|
||||||
|
{% endif %}
|
||||||
|
<nav class="navbar navbar-default navbar-fixed-top topnav {% if instance.show_non_transparent_navbar_always != True %}navbar-transparent{% endif %}">
|
||||||
<!-- Brand and toggle get grouped for better mobile display -->
|
<!-- Brand and toggle get grouped for better mobile display -->
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#dcl-topnav">
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#dcl-topnav">
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<form id="order_form" method="POST" action="{{calculator_form_url}}" data-toggle="validator" role="form">
|
<form id="order_form" method="POST" action="{% url 'datacenterlight:index' %}" data-toggle="validator" role="form">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="pid" value="{{instance.id}}">
|
<input type="hidden" name="pid" value="{{instance.id}}">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{% load staticfiles i18n custom_tags %}
|
{% load staticfiles i18n custom_tags %}
|
||||||
{% get_current_language as LANGUAGE_CODE %}
|
{% get_current_language as LANGUAGE_CODE %}
|
||||||
|
<nav class="navbar navbar-default navbar-fixed-top topnav {% if instance.show_non_transparent_navbar_always is False %}navbar-transparent{% endif %}">
|
||||||
<nav class="navbar navbar-default navbar-fixed-top topnav navbar-transparent">
|
|
||||||
<!-- Brand and toggle get grouped for better mobile display -->
|
<!-- Brand and toggle get grouped for better mobile display -->
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
||||||
|
|
Loading…
Reference in a new issue