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,16 +77,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function _navScroll() {
|
function _navScroll() {
|
||||||
if ($(window).scrollTop() > 10) {
|
if (!window.non_transparent_navbar_always) {
|
||||||
$(".navbar").removeClass("navbar-transparent");
|
if ($(window).scrollTop() > 10) {
|
||||||
$(".navbar-default .btn-link").css("color", "#777");
|
$(".navbar").removeClass("navbar-transparent");
|
||||||
$(".dropdown-menu").removeClass("navbar-transparent");
|
$(".navbar-default .btn-link").css("color", "#777");
|
||||||
$(".dropdown-menu > li > a").css("color", "#777");
|
$(".dropdown-menu").removeClass("navbar-transparent");
|
||||||
} else {
|
$(".dropdown-menu > li > a").css("color", "#777");
|
||||||
$(".navbar").addClass("navbar-transparent");
|
} else {
|
||||||
$(".navbar-default .btn-link").css("color", "#fff");
|
$(".navbar").addClass("navbar-transparent");
|
||||||
$(".dropdown-menu").addClass("navbar-transparent");
|
$(".navbar-default .btn-link").css("color", "#fff");
|
||||||
$(".dropdown-menu > li > a").css("color", "#fff");
|
$(".dropdown-menu").addClass("navbar-transparent");
|
||||||
|
$(".dropdown-menu > li > a").css("color", "#fff");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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">
|
||||||
|
@ -102,4 +102,4 @@
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" name="pricing_name" value="{% if vm_pricing.name %}{{vm_pricing.name}}{% else %}unknown{% endif%}"></input>
|
<input type="hidden" name="pricing_name" value="{% if vm_pricing.name %}{{vm_pricing.name}}{% else %}unknown{% endif%}"></input>
|
||||||
<input type="submit" class="btn btn-primary disabled" value="{% trans 'Continue' %}"></input>
|
<input type="submit" class="btn btn-primary disabled" value="{% trans 'Continue' %}"></input>
|
||||||
</form>
|
</form>
|
|
@ -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