From 817e0b73ebf27824041aa2a66cbe7d6ef01ae45e Mon Sep 17 00:00:00 2001 From: ARvind Tiwari Date: Tue, 1 Aug 2017 20:54:42 +0530 Subject: [PATCH 01/35] removed navbar toggle btn for unregistered users --- hosting/templates/hosting/base_short.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hosting/templates/hosting/base_short.html b/hosting/templates/hosting/base_short.html index 5cce6533..5120bde9 100644 --- a/hosting/templates/hosting/base_short.html +++ b/hosting/templates/hosting/base_short.html @@ -56,12 +56,14 @@
{% if request.user.is_authenticated %} From a3d5c81530709d75322f0dfa935729309e02eead Mon Sep 17 00:00:00 2001 From: ARvind Tiwari Date: Thu, 3 Aug 2017 02:35:44 +0530 Subject: [PATCH 02/35] navbar fixed on payment, order-success, order-confirmation --- .../static/datacenterlight/js/main.js | 2 +- .../datacenterlight/includes/_navbar.html | 108 ++++++++---------- .../datacenterlight/order_detail.html | 5 + hosting/static/hosting/js/initial.js | 33 +++++- hosting/templates/hosting/payment.html | 6 +- 5 files changed, 93 insertions(+), 61 deletions(-) diff --git a/datacenterlight/static/datacenterlight/js/main.js b/datacenterlight/static/datacenterlight/js/main.js index 5594fe11..2c5333ae 100644 --- a/datacenterlight/static/datacenterlight/js/main.js +++ b/datacenterlight/static/datacenterlight/js/main.js @@ -88,7 +88,7 @@ function _initNavUrl() { $('.url').click(function(event) { event.preventDefault(); - var href = $(this).attr('data-url'); + var href = $(this).attr('href'); $('.navbar-collapse').removeClass('in'); $('.navbar-collapse').addClass('collapsing'); if ($(href).length) { diff --git a/datacenterlight/templates/datacenterlight/includes/_navbar.html b/datacenterlight/templates/datacenterlight/includes/_navbar.html index 99f6a4a8..87534b66 100644 --- a/datacenterlight/templates/datacenterlight/includes/_navbar.html +++ b/datacenterlight/templates/datacenterlight/includes/_navbar.html @@ -1,7 +1,10 @@ -{% load staticfiles i18n%} {% get_current_language as LANGUAGE_CODE %} {% load custom_tags %} +{% load staticfiles i18n%} +{% load custom_tags %} +{% get_current_language as LANGUAGE_CODE %} +
\ No newline at end of file diff --git a/datacenterlight/templates/datacenterlight/order_detail.html b/datacenterlight/templates/datacenterlight/order_detail.html index 8b1180bb..f3c946a1 100644 --- a/datacenterlight/templates/datacenterlight/order_detail.html +++ b/datacenterlight/templates/datacenterlight/order_detail.html @@ -2,6 +2,11 @@ {% load staticfiles bootstrap3 %} {% load i18n %} {% load custom_tags %} + +{% block navbar %} + {% include "datacenterlight/includes/_navbar.html" %} +{% endblock navbar %} + {% block content %}
diff --git a/hosting/static/hosting/js/initial.js b/hosting/static/hosting/js/initial.js index da2887c6..9d1cabe8 100644 --- a/hosting/static/hosting/js/initial.js +++ b/hosting/static/hosting/js/initial.js @@ -1,5 +1,34 @@ -$( document ).ready(function() { +// also declared in datacenterlight/js/main.js +function _initNavUrl() { + $('.url').click(function(event) { + event.preventDefault(); + var href = $(this).attr('href'); + $('.navbar-collapse').removeClass('in'); + $('.navbar-collapse').addClass('collapsing'); + if ($(href).length) { + $('html, body').animate({ + scrollTop: $(href).offset().top + }, 1000); + } else { + window.location.href = '/datacenterlight' + href; + } + }); +} +/* --------------------------------------------- + Nav panel classic + --------------------------------------------- */ +if (window.matchMedia("(min-width: 767px)").matches) { + $('ul.nav li.dropdown').hover(function() { + $(this).find('.dropdown-menu').stop(true, true).fadeIn(500); + }, function() { + $(this).find('.dropdown-menu').stop(true, true).fadeOut(500); + }); +} else { + /* the viewport is less than 400 pixels wide */ +} + +$( document ).ready(function() { $('[data-toggle="tooltip"]').tooltip(); @@ -13,4 +42,6 @@ $( document ).ready(function() { }, 1000); }); + _initNavUrl(); + }); \ No newline at end of file diff --git a/hosting/templates/hosting/payment.html b/hosting/templates/hosting/payment.html index d03713c1..8b4f2800 100644 --- a/hosting/templates/hosting/payment.html +++ b/hosting/templates/hosting/payment.html @@ -1,5 +1,10 @@ {% extends "hosting/base_short.html" %} {% load staticfiles bootstrap3 i18n %} + +{% block navbar %} + {% include "datacenterlight/includes/_navbar.html" %} +{% endblock navbar %} + {% block content %} @@ -190,7 +195,6 @@ window.hasCreditcard = true; })(); - {%endif%} {%endblock%} From 3b575b47e2db74f145d7b715b8122c25d8352c53 Mon Sep 17 00:00:00 2001 From: ARvind Tiwari Date: Thu, 3 Aug 2017 22:28:20 +0530 Subject: [PATCH 03/35] navbar right margin --- hosting/static/hosting/css/commons.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hosting/static/hosting/css/commons.css b/hosting/static/hosting/css/commons.css index 78bfd827..60866831 100644 --- a/hosting/static/hosting/css/commons.css +++ b/hosting/static/hosting/css/commons.css @@ -1,3 +1,7 @@ +.navbar-right { + margin-right: 10px; +} + .dashboard-container { padding-top:70px; padding-bottom: 70px; width: 90%; From 8edbd29fad99225e57efe1277ba0c000da699770 Mon Sep 17 00:00:00 2001 From: ARvind Tiwari Date: Thu, 3 Aug 2017 23:18:58 +0530 Subject: [PATCH 04/35] navbar made white, dropdown fix --- .../datacenterlight/includes/_navbar.html | 3 ++- datacenterlight/views.py | 4 +-- hosting/static/hosting/css/commons.css | 6 +++-- hosting/static/hosting/css/landing-page.css | 22 ++++++++++++++++ utils/migrations/0006_auto_20170728_1702.py | 25 +++++++++++++++++++ 5 files changed, 55 insertions(+), 5 deletions(-) create mode 100644 utils/migrations/0006_auto_20170728_1702.py diff --git a/datacenterlight/templates/datacenterlight/includes/_navbar.html b/datacenterlight/templates/datacenterlight/includes/_navbar.html index 87534b66..0fd6af9a 100644 --- a/datacenterlight/templates/datacenterlight/includes/_navbar.html +++ b/datacenterlight/templates/datacenterlight/includes/_navbar.html @@ -18,7 +18,8 @@