123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- // Owl slider
- $(document).ready(function(){
- $('.oe_website_sale').each(function () {
- var oe_website_sale = this;
- $(oe_website_sale).on("change", ".oe_cart input.js_quantity", function () {
- setTimeout("location.reload();", 1000);
- });
- $(oe_website_sale).on('click', 'a.js_add_cart_json_new', function (ev) {
- ev.preventDefault();
- var $link = $(ev.currentTarget);
- var $input = $link.parent().parent().find("input");
- var value = parseInt(0, 10);
- var line_id = parseInt($input.data('line-id'),10);
- if (isNaN(value)) value = 0;
- openerp.jsonRpc("/shop/cart/update_json", 'call', {
- 'line_id': line_id,
- 'product_id': parseInt($input.data('product-id'),10),
- 'set_qty': value})
- .then(function (data) {
- if (!data.quantity) {
- location.reload();
- return;
- }
- });
- });
- });
- $('.owl-carousel').owlCarousel({
- loop:true,
- margin:30,
- responsiveClass:true,
- responsive:{
- 0:{
- items:1,
- nav:false,
- dots:true
- },
- 480:{
- items:2,
- nav:false,
- dots:true
- },
- 768:{
- items:3,
- nav:false,
- dots:true
- },
- 1000:{
- items:4,
- nav:true,
- loop:false,
- dots:false
- }
- }
- })
- });
- // header fix
- $(window).scroll(function(){
- if ($(window).scrollTop() >= 110) {
- $('.nav-top').addClass('navbar-fixed-top');
- }
- else {
- $('.nav-top').removeClass('navbar-fixed-top');
- }
- });
- $(window).load(function(){
- function resetHeight() {
- var maxHeight = 0;
- jQuery(".product .title").height("auto").each(function () {
- maxHeight = $(this).height() > maxHeight ? $(this).height() : maxHeight;
- }).height(maxHeight);
- }
- resetHeight();
- jQuery(window).resize(function () {
- resetHeight();
- });
- function resetHeight1() {
- var maxHeight = 0;
- jQuery(".product-img").height("auto").each(function () {
- maxHeight = $(this).height() > maxHeight ? $(this).height() : maxHeight;
- }).height(maxHeight);
- }
- resetHeight1();
- function resetHeight2() {
- var maxHeight = 0;
- jQuery(".product .price-box .oe_subdescription").height("auto").each(function() {
- maxHeight = $(this).height() > maxHeight ? $(this).height() : maxHeight;
- }).height(maxHeight);
- }
- resetHeight2();
- jQuery(window).resize(function () {
- resetHeight();
- resetHeight1();
- resetHeight2();
- });
- });
-
- $(window).load(function(){
- function resetHeight() {
- var maxHeight = 0;
- jQuery(".product .title").height("auto").each(function () {
- maxHeight = $(this).height() > maxHeight ? $(this).height() : maxHeight;
- }).height(maxHeight);
- }
- resetHeight();
- jQuery(window).resize(function () {
- resetHeight();
- });
- function resetHeight1() {
- var maxHeight = 0;
- jQuery(".item col-lg-4 col-md-4 col-sm-4 col-xs-6 .product-img1").height("auto").each(function () {
- maxHeight = $(this).height() > maxHeight ? $(this).height() : maxHeight;
- }).height(maxHeight);
- }
- resetHeight1();
- jQuery(window).resize(function () {
- resetHeight();
- resetHeight1();
- });
- });
- /*Added By BC 03-07-2015*/
- $(document).ready(function() {
- $("<span class='mob_sub'><span data-icon-name='plus'></span></span>").insertBefore(".mega-menu");
- $("<span class='mob_sub'><span data-icon-name='plus'></span></span>").insertBefore(".navbar-nav ul.mega-menu > .column > .js_usermenu");
- $("<span class='mob_sub'><span data-icon-name='plus'></span></span>").insertBefore(".navbar-nav ul.mega-menu > .column ul > li > ul");
- $('.mob_sub').click(
- function(e) {
- e.preventDefault(); // prevent the default action
- e.stopPropagation(); // stop the click from bubbling
- $(this).parent().toggleClass('selected');
- $(this).toggleClass('mob_sub_open');
- });
- });
|