merge master

This commit is contained in:
Arvind Tiwari 2018-03-22 03:49:06 +05:30
commit adee93ca12
12 changed files with 121 additions and 46 deletions

View file

@ -1,3 +1,6 @@
1.5.5: 2018-03-22
* #4278: [dcl cms] edit options for cms navbar and header plugins
* bgfix: [dcl cms] fix link plugin issues and section image alignment
1.5.4: 2018-03-17 1.5.4: 2018-03-17
* bgfix: [dcl cms] update DCLNavbarPlugin to allow change of brand logo and url * bgfix: [dcl cms] update DCLNavbarPlugin to allow change of brand logo and url
1.5.3: 2018-03-16 1.5.3: 2018-03-16

View file

@ -132,6 +132,10 @@ class DCLNavbarPluginModel(CMSPlugin):
related_name="dcl_navbar_logo_dark", related_name="dcl_navbar_logo_dark",
) )
logo_url = models.URLField(max_length=300, null=True, blank=True) logo_url = models.URLField(max_length=300, null=True, blank=True)
language_dropdown = models.BooleanField(
default=True,
help_text='Select to include the language selection dropdown.'
)
def get_logo_dark(self): def get_logo_dark(self):
# used only if atleast one logo exists # used only if atleast one logo exists

View file

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2018-03-19 20:46
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('datacenterlight', '0013_dclnavbarpluginmodel'),
]
operations = [
migrations.AddField(
model_name='dclnavbarpluginmodel',
name='language_dropdown',
field=models.BooleanField(default=True, help_text='Select to include the language selection dropdown.'),
),
]

View file

@ -58,6 +58,16 @@ textarea {
min-width: 180px; min-width: 180px;
} }
.lead {
font-size: 18px;
}
@media (min-width: 768px) {
.lead {
font-size: 21px;
}
}
/* Top navbar */ /* Top navbar */
@ -107,6 +117,12 @@ textarea {
text-decoration: none; text-decoration: none;
} }
.topnav .nav .open>a,
.topnav .nav .open>a:focus,
.topnav .nav .open>a:hover {
background: transparent;
}
.navbar .dcl-link { .navbar .dcl-link {
display: block; display: block;
padding: 15px; padding: 15px;
@ -429,17 +445,20 @@ textarea {
} }
.split-section.left .split-description { .split-section.left .split-description {
/* width: 90%; */
margin-right: auto; margin-right: auto;
} }
.split-section .split-description .lead { .split-section .split-description .lead {
color: #3a3a3a; color: #3a3a3a;
font-size: 21px;
} }
.split-section .space .split-description .lead { @media (min-width: 768px) {
font-size: 20px; .split-section .split-description .lead {
font-size: 21px;
}
.split-section .space .split-description .lead {
font-size: 20px;
}
} }
.split-section.right .split-description { .split-section.right .split-description {
@ -536,6 +555,7 @@ textarea {
padding-top: 20px; padding-top: 20px;
display: inline-block; display: inline-block;
color: #999 !important; color: #999 !important;
word-break: break-all;
} }
.price-calc-section .card { .price-calc-section .card {
@ -764,17 +784,11 @@ textarea {
.ssdimg { .ssdimg {
margin: 0 15px; margin: 0 15px;
/* vertical-align: middle; */
/* display: inline-block; */
}
.ssdimg img {
max-width: 125px;
} }
@media (max-width: 767px) { @media (max-width: 767px) {
.ssdimg img { .ssdimg img {
width: 100px; max-height: 120px;
} }
} }
@ -1190,7 +1204,7 @@ footer {
max-width: 430px; max-width: 430px;
} }
.flex-row-rev .desc-text { .flex-row-rev .desc-text {
max-width: 710px; max-width: 600px;
text-align: left; text-align: left;
} }
.flex-row-rev .percent-text { .flex-row-rev .percent-text {

View file

@ -104,21 +104,33 @@
}); });
$('.url').click(function(event) { $('.url').click(function(event) {
event.preventDefault(); event.preventDefault();
var href = $(this).attr('href'); var $this = $(this);
var href = $this.attr('href');
$('.navbar-collapse').removeClass('in'); $('.navbar-collapse').removeClass('in');
$('.navbar-collapse').addClass('collapsing'); $('.navbar-collapse').addClass('collapsing');
if (href[0] === "#") { if (href[0] === "#") {
if ($(href).length) { scrollToElement(href);
$('html, body').animate({
scrollTop: $(href).offset().top - 50
}, 1000);
}
} else if (href) { } else if (href) {
window.location = href; var path = $(this).prop('href').split('#');
var currentPath = window.location.origin + window.location.pathname;
if (!path[1]) {
window.location = href;
} else if (currentPath == path[0]) {
scrollToElement('#' + path[1]);
}
} }
}); });
} }
function scrollToElement(el) {
var $el = $(el);
if ($el.length) {
$('html, body').animate({
scrollTop: $el.offset().top - 50
}, 1000);
}
}
function verifiedUrl() { function verifiedUrl() {
if (window.location.href.indexOf('#success') > -1) { if (window.location.href.indexOf('#success') > -1) {
form_success(); form_success();

View file

@ -1,11 +1,11 @@
<div id="{{ instance.id }}" class="full-contact-section"> <div id="contact" class="full-contact-section">
<div class="intro-header-2 contact-section"> <div class="intro-header-2 contact-section">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
{% if instance.contact_text %} {% if instance.heading%}
<div class="title"> <div class="title">
<h2>{{ instance.contact_text }}</h2> <h2>{{ instance.heading}}</h2>
</div> </div>
{% endif %} {% endif %}
<div class="contact-details"> <div class="contact-details">
@ -40,4 +40,4 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -10,13 +10,12 @@
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
{% url 'datacenterlight:index' as default_logo_url %}
{% if instance.logo_dark or instance.logo_light %} {% if instance.logo_dark or instance.logo_light %}
<a href="{{ instance.logo_url|default:default_logo_url }}" id="logoBlack" class="navbar-brand topnav"><img src="{{ instance.get_logo_dark }}"></a> <a href="{{ instance.logo_url|default:'/' }}" id="logoBlack" class="navbar-brand topnav"><img src="{{ instance.get_logo_dark }}"></a>
<a href="{{ instance.logo_url|default:default_logo_url }}" id="logoWhite" class="navbar-brand topnav"><img src="{{ instance.get_logo_light }}"></a> <a href="{{ instance.logo_url|default:'/' }}" id="logoWhite" class="navbar-brand topnav"><img src="{{ instance.get_logo_light }}"></a>
{% else %} {% else %}
<a href="{{ default_logo_url }}" id="logoBlack" class="navbar-brand topnav"><img src="{% static 'datacenterlight/img/logo_black.svg' %}"></a> <a href="/" id="logoBlack" class="navbar-brand topnav"><img src="{% static 'datacenterlight/img/logo_black.svg' %}"></a>
<a href="{{ default_logo_url }}" id="logoWhite" class="navbar-brand topnav"><img src="{% static 'datacenterlight/img/logo_white.svg' %}"></a> <a href="/" id="logoWhite" class="navbar-brand topnav"><img src="{% static 'datacenterlight/img/logo_white.svg' %}"></a>
{% endif %} {% endif %}
</div> </div>
<div class="collapse navbar-collapse" id="dcl-topnav"> <div class="collapse navbar-collapse" id="dcl-topnav">
@ -27,13 +26,15 @@
{% render_plugin plugin %} {% render_plugin plugin %}
</li> </li>
{% endfor %} {% endfor %}
<li> {% if instance.language_dropdown %}
{% if LANGUAGE_CODE == 'en-us'%} <li>
<a class="on-hover-border" href="{% change_lang 'de' %}">Deutsch&nbsp;&nbsp;<i class="fa fa-globe" aria-hidden="true"></i></a> {% if LANGUAGE_CODE == 'en-us'%}
{% else %} <a class="on-hover-border" href="{% change_lang 'de' %}">Deutsch&nbsp;&nbsp;<i class="fa fa-globe" aria-hidden="true"></i></a>
<a class="on-hover-border" href="{% change_lang 'en-us' %}">English&nbsp;&nbsp;<i class="fa fa-globe" aria-hidden="true"></i></a> {% else %}
{% endif %} <a class="on-hover-border" href="{% change_lang 'en-us' %}">English&nbsp;&nbsp;<i class="fa fa-globe" aria-hidden="true"></i></a>
</li> {% endif %}
</li>
{% endif %}
{% if not request.user.is_authenticated %} {% if not request.user.is_authenticated %}
<li> <li>
<a href="{% url 'hosting:login' %}">{% trans "Login" %}&nbsp;&nbsp;<span class="fa fa-sign-in"></span></a> <a href="{% url 'hosting:login' %}">{% trans "Login" %}&nbsp;&nbsp;<span class="fa fa-sign-in"></span></a>

View file

@ -1,17 +1,20 @@
from django.conf.urls import url from django.conf.urls import url
from django.views.generic import TemplateView from django.views.generic import TemplateView, RedirectView
from .views import ( from .views import (
IndexView, PaymentOrderView, OrderConfirmationView, IndexView, PaymentOrderView, OrderConfirmationView,
WhyDataCenterLightView, ContactUsView WhyDataCenterLightView, ContactUsView
) )
urlpatterns = [ urlpatterns = [
url(r'^$', IndexView.as_view(), name='index'), url(r'^$', IndexView.as_view(), name='index'),
url(r'^t/$', IndexView.as_view(), name='index_t'), url(r'^t/$', IndexView.as_view(), name='index_t'),
url(r'^g/$', IndexView.as_view(), name='index_g'), url(r'^g/$', IndexView.as_view(), name='index_g'),
url(r'^f/$', IndexView.as_view(), name='index_f'), url(r'^f/$', IndexView.as_view(), name='index_f'),
url(r'^l/$', IndexView.as_view(), name='index_l'), url(r'^l/$', IndexView.as_view(), name='index_l'),
url(r'^new/$', RedirectView.as_view(url='/cms/datacenterlight/'),
name='cms_index'),
url(r'^whydatacenterlight/?$', WhyDataCenterLightView.as_view(), url(r'^whydatacenterlight/?$', WhyDataCenterLightView.as_view(),
name='whydatacenterlight'), name='whydatacenterlight'),
url(r'^payment/?$', PaymentOrderView.as_view(), name='payment'), url(r'^payment/?$', PaymentOrderView.as_view(), name='payment'),

View file

@ -96,12 +96,7 @@ class IndexView(CreateView):
for session_var in ['specs', 'user', 'billing_address_data']: for session_var in ['specs', 'user', 'billing_address_data']:
if session_var in request.session: if session_var in request.session:
del request.session[session_var] del request.session[session_var]
return HttpResponseRedirect(reverse('datacenterlight:cms_index'))
vm_templates = VMTemplate.objects.all()
context = {
'templates': vm_templates
}
return render(request, self.template_name, context)
def post(self, request): def post(self, request):
cores = request.POST.get('cpu') cores = request.POST.get('cpu')

View file

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2018-03-19 20:46
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ungleich_page', '0019_merge'),
]
operations = [
migrations.AlterField(
model_name='ungleichheaderwithbackgroundvideoslideritem',
name='btn_link',
field=models.CharField(blank=True, help_text='Url or #id to navigate on click. If this field is left empty, no button would be displayed.', max_length=100, null=True),
),
]

View file

@ -125,9 +125,12 @@ class UngleichHeaderWithBackgroundVideoSliderItem(CMSPlugin):
blank=True, null=True, blank=True, null=True,
help_text='An optional description for this slide.' help_text='An optional description for this slide.'
) )
btn_link = models.URLField( btn_link = models.CharField(
blank=True, null=True, max_length=100, blank=True, null=True,
help_text='If this field is left empty, no button would be displayed.' help_text=(
'Url or #id to navigate on click. If this field is left empty, no '
'button would be displayed.'
)
) )
btn_text = models.CharField( btn_text = models.CharField(
blank=True, null=True, max_length=50, blank=True, null=True, max_length=50,

View file

@ -22,6 +22,6 @@
{% endif %} {% endif %}
{% if instance.btn_link %} {% if instance.btn_link %}
{% trans "Learn More" as default_btn_text %} {% trans "Learn More" as default_btn_text %}
<a class="btn btn-trans" href="{{ instance.btn_link }}">{{ instance.btn_text|default:default_btn_text }}</a> <a class="btn btn-trans page-scroll url" href="{{ instance.btn_link }}">{{ instance.btn_text|default:default_btn_text }}</a>
{% endif %} {% endif %}
</div> </div>