| Server IP : 85.158.181.41 / Your IP : 216.73.217.12 Web Server : Apache System : Linux cloud9-vm129 6.1.178+1-ph #ph SMP PREEMPT_DYNAMIC Wed Jul 29 09:00:54 UTC 2026 x86_64 User : moncbefd ( 1024) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/moncbefd/www.moneta.at/public/theme/javascripts/system/widgets/ |
Upload File : |
"use strict";gambio.widgets.module("cart_dropdown",["xhr",gambio.source+"/libs/events"],function(e){var t=$(this),o=$(window),n=$("body"),r=null,s=null,i=!1,l=null,c=null,a=null,p={part1:"header",part2:"dropdown"},u={delay:5e3,url:"shop.php?do=CartDropdown",fillTarget:"header",countAnimation:2e3,selectorMapping:{cartDropdown:".cart-dropdown",cartDropdownProducts:".products",cartDropdownProductsCount:".cart-products-count"}},d=$.extend(!0,{},u,e),g={},f=function(){var e=t.find(".products-list"),o=2*e.outerHeight();e.animate({scrollTop:o+"px"},0)},m=function(e){e.stopPropagation(),"0"!==$(u.selectorMapping.cartDropdownProductsCount).text()&&$(u.selectorMapping.cartDropdownProductsCount).removeClass("hidden"),r.trigger("mouseenter",{prog:!0})},h=function(e){e.stopPropagation(),r.trigger("mouseleave",{prog:!0})},v=function(e,t){if(void 0===d.selectorMapping[t.selector])return jse.core.debug.warn('The selector mapping "'+t.selector+"\" doesn't exist."),!0;var o=$(t.value).text(),n=s.find(d.selectorMapping[t.selector]);e!==o&&(c&&clearTimeout(c),n.addClass("big"),c=setTimeout(function(){n.removeClass("big")},d.countAnimation))},w=function(e,o){a&&a.abort(),a=jse.libs.xhr.ajax({url:d.url,data:p}).done(function(e){if(void 0===d.selectorMapping[e.content.count.selector])return jse.core.debug.warn('The selector mapping "'+e.content.count.selector+"\" doesn't exist."),!0;var n=$(d.selectorMapping[e.content.count.selector]).first().text();jse.libs.theme.helpers.fill(e.content,s,d.selectorMapping),v(n,e.content.count),f(),o&&(t.trigger(jse.libs.theme.events.CART_OPEN(),[]),l=setTimeout(function(){t.trigger(jse.libs.theme.events.CART_CLOSE(),[])},d.delay))})},T=function(e,t){t&&t.prog||!l||clearTimeout(l)},b=function C(){if(!r.hasClass("open")){var e=setInterval(function(){r.hasClass("open")&&(C(),clearInterval(e))},100);return void(i=!1)}var t=$(d.selectorMapping.cartDropdown),o=t.offset();!i&&o.top<$(window).scrollTop()&&(t.css({position:"fixed",top:20,left:o.left}),i=!0),i&&o.top<r.offset().top&&(t.css({position:"",top:"",left:""}),i=!1)};return g.init=function(e){r=t.find("> ul > li"),s=d.fillTarget?$(d.fillTarget):t,o.on("scroll",b),n.on(jse.libs.theme.events.CART_OPEN(),m).on(jse.libs.theme.events.CART_CLOSE(),h).on(jse.libs.theme.events.CART_UPDATE(),w),r.on("mouseenter mouseleave",T).on("mouseenter",b),f(),location.search.search("open_cart_dropdown=1")!==-1&&n.trigger(jse.libs.theme.events.CART_OPEN()),e()},g});