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
 | 
			
		||||
   * ldap_migration: Migrate django users to Ldap
 | 
			
		||||
     Notes for deployment:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -184,6 +184,11 @@ class DCLNavbarPluginModel(CMSPlugin):
 | 
			
		|||
        default=True,
 | 
			
		||||
        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):
 | 
			
		||||
        # 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() {
 | 
			
		||||
        if ($(window).scrollTop() > 10) {
 | 
			
		||||
            $(".navbar").removeClass("navbar-transparent");
 | 
			
		||||
            $(".navbar-default .btn-link").css("color", "#777");
 | 
			
		||||
            $(".dropdown-menu").removeClass("navbar-transparent");
 | 
			
		||||
            $(".dropdown-menu > li > a").css("color", "#777");
 | 
			
		||||
        } else {
 | 
			
		||||
            $(".navbar").addClass("navbar-transparent");
 | 
			
		||||
            $(".navbar-default .btn-link").css("color", "#fff");
 | 
			
		||||
            $(".dropdown-menu").addClass("navbar-transparent");
 | 
			
		||||
            $(".dropdown-menu > li > a").css("color", "#fff");
 | 
			
		||||
        if (!window.non_transparent_navbar_always) {
 | 
			
		||||
            if ($(window).scrollTop() > 10) {
 | 
			
		||||
                $(".navbar").removeClass("navbar-transparent");
 | 
			
		||||
                $(".navbar-default .btn-link").css("color", "#777");
 | 
			
		||||
                $(".dropdown-menu").removeClass("navbar-transparent");
 | 
			
		||||
                $(".dropdown-menu > li > a").css("color", "#777");
 | 
			
		||||
            } else {
 | 
			
		||||
                $(".navbar").addClass("navbar-transparent");
 | 
			
		||||
                $(".navbar-default .btn-link").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 %}
 | 
			
		||||
{% get_current_language as LANGUAGE_CODE %}
 | 
			
		||||
 | 
			
		||||
<nav class="navbar navbar-default navbar-fixed-top topnav navbar-transparent">
 | 
			
		||||
{% if instance.show_non_transparent_navbar_always %}
 | 
			
		||||
<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 -->
 | 
			
		||||
  <div class="navbar-header">
 | 
			
		||||
    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#dcl-topnav">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,7 +14,7 @@
 | 
			
		|||
    </script>
 | 
			
		||||
{% 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 %}
 | 
			
		||||
    <input type="hidden" name="pid" value="{{instance.id}}">
 | 
			
		||||
    <div class="title">
 | 
			
		||||
| 
						 | 
				
			
			@ -102,4 +102,4 @@
 | 
			
		|||
    </div>
 | 
			
		||||
    <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>
 | 
			
		||||
</form>
 | 
			
		||||
</form>
 | 
			
		||||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
{% load staticfiles i18n custom_tags %}
 | 
			
		||||
{% get_current_language as LANGUAGE_CODE %}
 | 
			
		||||
 | 
			
		||||
<nav class="navbar navbar-default navbar-fixed-top topnav navbar-transparent">
 | 
			
		||||
<nav class="navbar navbar-default navbar-fixed-top topnav {% if instance.show_non_transparent_navbar_always is False %}navbar-transparent{% endif %}">
 | 
			
		||||
    <!-- Brand and toggle get grouped for better mobile display -->
 | 
			
		||||
    <div class="navbar-header">
 | 
			
		||||
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue