navbar fixed on payment, order-success, order-confirmation

This commit is contained in:
ARvind Tiwari 2017-08-03 02:35:44 +05:30
commit a3d5c81530
5 changed files with 93 additions and 61 deletions

View file

@ -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();
});

View file

@ -1,5 +1,10 @@
{% extends "hosting/base_short.html" %}
{% load staticfiles bootstrap3 i18n %}
{% block navbar %}
{% include "datacenterlight/includes/_navbar.html" %}
{% endblock navbar %}
{% block content %}
<!-- Credit card form -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/paymentfont/1.1.2/css/paymentfont.min.css"/>
@ -190,7 +195,6 @@
window.hasCreditcard = true;
})();
</script>
{%endif%}
{%endblock%}