Version 5.0.13

This commit is contained in:
Neo committed 2025-12-19 19:04:57 -08:00
1 parent b89858b2ff
commit 5efe744c5f
1407 files changed
+69690 -30177

No files matched your search

+2 -2
View File
@@ -1,5 +1,5 @@
ips.templates.set('nexus.store.productImage'," <a href='{{fullURL}}' data-fullURL='{{fullURL}}' class='cNexusProduct_primaryImage' data-ipsLightbox data-ipsLightbox-group='product' style='background-image:url({{thumbURL}})'> <img src='{{thumbURL}}' alt=''> </a>");;
;(function($,_,undefined){"use strict";ips.controller.register('nexus.front.store.cartReview',{initialize:function(){this.on('click','[data-action="removeFromCart"]',this.removeFromCart);this.on('submit','[data-role="quantityForm"]',this.quantityForm);this.on('click','[data-action="checkout"]',this.checkout);},checkout:function(e){if($(e.target).hasClass('ipsButton--disabled')){e.preventDefault();}else{$(e.target).addClass('ipsButton--disabled');}},removeFromCart:function(e){e.preventDefault();var self=this;var url=$(e.currentTarget).attr('href');ips.ui.alert.show({type:'confirm',message:ips.getString('confirmRemoveItem'),icon:'warn',callbacks:{ok:function(){ips.getAjax()(url).done(function(response){self.scope.find('[data-role="cart"]').html(response);});}}});},quantityForm:function(e){e.preventDefault();var self=this;var form=$(e.currentTarget);var menu=form.closest('.ipsMenu');menu.css({height:menu.outerHeight()+'px'}).addClass('ipsLoading');form.hide();ips.getAjax()(form.attr('action'),{data:form.serialize()}).done(function(response){self.scope.find('[data-role="cart"]').html(response);}).fail(function(response){menu.removeClass('ipsLoading');form.show();ips.ui.alert.show({type:'alert',icon:'warn',message:response.responseJSON});});}});}(jQuery,_));;
;(function($,_,undefined){"use strict";ips.controller.register('nexus.front.store.cartReview',{initialize:function(){this.on('click','[data-action="removeFromCart"]',this.removeFromCart);this.on('submit','[data-role="quantityForm"]',this.quantityForm);this.on('click','[data-action="checkout"]',this.checkout);},checkout:function(e){if($(e.target).hasClass('ipsButton--disabled')){e.preventDefault();}else{$(e.target).addClass('ipsButton--disabled');}},removeFromCart:function(e){e.preventDefault();var self=this;var url=$(e.currentTarget).attr('href');ips.ui.alert.show({type:'confirm',message:ips.getString('confirmRemoveItem'),icon:'warn',callbacks:{ok:function(){ips.getAjax()(url).done(function(response){self.scope.find('[data-role="cart"]').html(response);});}}});},quantityForm:function(e){e.preventDefault();var self=this;var form=$(e.currentTarget);ips.getAjax()(form.attr('action'),{data:form.serialize()}).done(function(response){self.scope.find('[data-role="cart"]').html(response);}).fail(function(response){ips.ui.alert.show({type:'alert',icon:'warn',message:response.responseJSON});});}});}(jQuery,_));;
;(function($,_,undefined){"use strict";ips.controller.register('nexus.front.store.category',{_ajaxObj:null,initialize:function(){this.on('click','[data-action="filter"],[data-page]',this.changeView);this.setup();},setup:function(){ips.utils.history.replaceState({controller:'storeCategoryView'},'nexus.front.store.category',window.location.href);window.addEventListener('historychange:nexus.front.store.category',e=>this.stateChange(e));},changeView:function(e){e.preventDefault();if($(e.target).hasClass('ipsSideMenu_item')){$(e.target).toggleClass('ipsSideMenu_itemActive');}
const url=$(e.currentTarget).attr('href');ips.utils.history.pushState({controller:'storeCategoryView'},'nexus.front.store.category',$(e.currentTarget).attr('href'));},stateChange:function(){const url=window.location.href;if(!('nexus.front.store.category'in ips.utils.history.getState())){return;}
ips.utils.analytics.trackPageView(url);this._updateView(url)},async _updateView(url){if(this._ajaxObj&&_.isFunction(this._ajaxObj.abort)){this._ajaxObj.abort();}
@@ -20,7 +20,7 @@ form.replaceWith(newForm);$(document).trigger('contentChange');}});},insertCssUr
_.each(urls,function(url){if(url.indexOf('?')!=-1){url=url+'&v='+ips.getSetting('antiCache');}
else
{url=url+'?v='+ips.getSetting('antiCache');}
if(!$('link[href="'+url+'"]').length){var stylesheet=document.createElement("link");stylesheet.setAttribute("href",url);stylesheet.setAttribute("rel","stylesheet");stylesheet.setAttribute("media","all");$('head')[0].appendChild(stylesheet);Debug.log("Added stylesheet "+url+" to document");}});},updatePriceAndStock:function(){var self=this;var form=this.scope.find('form');ips.getAjax()(form.attr('action'),{dataType:'json',data:form.serialize()+'&stockCheck=1',type:'post'}).done(function(response){self.scope.find('[data-role="price"]').html(response.price);self.scope.find('[data-role="stock"]').html(response.stock);self.scope.find('[data-role="renewalTerm"]').html(response.renewal);self.scope.find('[data-role="initialTerm"]').html(response.initialTerm);if(response.okay){self.scope.find('button').removeAttr('disabled').text(ips.getString('add_to_cart_js'));}else{self.scope.find('button').attr('disabled','disabled').text(ips.getString('out_of_stock'));}}).fail(function(response){Debug.error(response);});}});}(jQuery,_));;
if(!$('link[href="'+url+'"]').length){var stylesheet=document.createElement("link");stylesheet.setAttribute("href",url);stylesheet.setAttribute("rel","stylesheet");stylesheet.setAttribute("media","all");$('head')[0].appendChild(stylesheet);Debug.log("Added stylesheet "+url+" to document");}});},updatePriceAndStock:function(){var self=this;var form=this.scope.find('form');ips.getAjax()(form.attr('action'),{dataType:'json',data:form.serialize()+'&stockCheck=1',type:'post'}).done(function(response){self.scope.find('[data-role="price"]').html(response.price);self.scope.find('[data-role="stock"]').html(response.stock);self.scope.find('[data-role="renewalTerm"]').html(response.renewal);self.scope.find('[data-role="initialTerm"]').html(response.initialTerm);if(response.okay){self.scope.find('[type="submit"]').removeAttr('disabled').text(ips.getString('add_to_cart_js'));}else{self.scope.find('[type="submit"]').attr('disabled','disabled').text(ips.getString('out_of_stock'));}}).fail(function(response){Debug.error(response);});}});}(jQuery,_));;
;(function($,_,undefined){"use strict";ips.controller.register('nexus.front.store.register',{_infoPaneWrapper:null,_infoPane:null,initialize:function(){this.on('click','[data-role="productCarousel"] .cNexusProduct',this.selectProduct);this.on('click','[data-action="closeInfo"]',this.closeInfo);this.on('addToCart.nexus',this.addToCart);this.setup();},setup:function(){this._infoPaneWrapper=this.scope.find('[data-role="productInformationWrapper"]');this._infoPane=this.scope.find('[data-role="productInformation"]');},closeInfo:function(e){e.preventDefault();this.scope.find('[data-role="productCarousel"] .cNexusProduct').removeClass('cNexusProduct_selected');this._infoPaneWrapper.hide().find('[data-action="closeInfo"]').hide();},selectProduct:function(e){e.preventDefault();var selectedProduct=$(e.currentTarget);var self=this;this.scope.find('[data-role="productCarousel"] .cNexusProduct').removeClass('cNexusProduct_selected');selectedProduct.addClass('cNexusProduct_selected');var url=selectedProduct.find('[data-role="productLink"]').attr('href');var height=200;if(this._infoPaneWrapper.is(':visible')){height=this._infoPane.height();}
this._infoPaneWrapper.show().find('[data-action="closeInfo"]').hide();this._infoPane.css({height:height+'px'}).html('').addClass('ipsLoading');ips.getAjax()(url).done(function(response){self._infoPaneWrapper.find('[data-action="closeInfo"]').show();self._infoPane.removeClass('ipsLoading').css({height:'auto'}).html(response);$(document).trigger('contentChange',[self._infoPane]);});},addToCart:function(e,data){e.stopPropagation();var self=this;ips.getAjax()(data.url,{data:data.formData+'&registerCheckout=1',type:'post'}).done(function(response){self._infoPane.html(response.dialog);$(document).trigger('contentChange',[self._infoPane]);}).fail(function(response){var loadingElem=self.scope.find('form').next('.ipsLoading');loadingElem.remove();if(response.responseJSON){ips.ui.alert.show({type:'alert',message:response.responseJSON,icon:'warn'});}else{var form=$(e.target).find('form');try{var newForm=$(response.responseText);}catch(err){form.attr('data-noajax','true');form.submit();}
form.replaceWith(newForm);$(document).trigger('contentChange');}});},});}(jQuery,_));;