Version 5.0.6

This commit is contained in:
Neo committed 2025-12-19 18:55:49 -08:00
1 parent a3a4a9ccbd
commit b89858b2ff
1214 files changed
+92828 -14859

No files matched your search

+2 -1
View File
@@ -7,7 +7,8 @@ this._setLoading(true);try{const response=await ips.fetch(url)
$('[data-role="packageListContainer"]').html(response.contents);$('[data-role="categorySidebar"]').html(response.sidebar);$(document).trigger('contentChange',[$('[data-role="packageListContainer"]'),$('[data-role="categorySidebar"]')]);}catch(e){Debug.log(`Failed to fetch data for a nexus store category after a filter/sort/view update from ${url}`)
Debug.warn(e)}
this._setLoading(false)},_setLoading:function(state){if(state){$('[data-role="packageList"]').css('height',$('[data-role="packageList"]').height()).html('').addClass('ipsLoading');}else{$('[data-role="packageList"]').css('height','auto').removeClass('ipsLoading');}}});}(jQuery,_));;
;(function($,_,undefined){"use strict";ips.controller.register('nexus.front.store.currencySelect',{initialize:function(){this.on('click','a',this.currencyChangeWarning);},currencyChangeWarning:function(e){e.preventDefault();var url=$(e.currentTarget).attr('href');ips.ui.alert.show({type:'confirm',message:ips.getString('store_currency_change_warning'),icon:'warn',callbacks:{ok:function(){window.location=url;}}});}});}(jQuery,_));;
;(function($,_,undefined){"use strict";ips.controller.register('nexus.front.store.currencySelect',{currencyChangeWarningConfirmed:false,initialize:function(){this.on('submit','form',this.currencyChangeWarning);},currencyChangeWarning:function(e){if(this.currencyChangeWarningConfirmed){return;}
e.preventDefault();ips.ui.alert.show({type:'confirm',message:ips.getString('store_currency_change_warning'),icon:'warn',callbacks:{ok:()=>{this.currencyChangeWarningConfirmed=true;let submitButton=(e instanceof SubmitEvent||e.originalEvent.submitter instanceof Element)?e.originalEvent.submitter:e.target.querySelector('button[type="submit"], button:not([type]), input[type="submit"]');submitButton.click();}}});}});}(jQuery,_));;
;(function($,_,undefined){"use strict";ips.controller.register('nexus.front.store.giftCard',{initialize:function(){this.on('click','[data-color]',this.toggleColor);this.on('change','[name="gift_voucher_amount"], [name="x_gift_voucher_amount"]',this.changeAmount);this.setup();},setup:function(){this.changeAmount();if($('input[name="gift_voucher_color"]').val()){this.setColor($('input[name="gift_voucher_color"]').val());}},changeAmount:function(){var amountVal=this.scope.find('[name="gift_voucher_amount"]:checked').val();var customVal=this.scope.find('[name="x_gift_voucher_amount"]').val();var amount=0;if(amountVal=='x'){if(!_.isUndefined(customVal)&&customVal!=''&&customVal!='x'){amount=customVal;}
var scope=this.scope;ips.getAjax()(this.scope.attr('data-formatCurrencyUrl')+'&amount='+amount).done(function(response){scope.find('[data-role="value"]').text(response);});}else{amount=amountVal;this.scope.find('[data-role="value"]').text(this.scope.find('label[for="'+this.scope.find('[name="gift_voucher_amount"]:checked').attr('id')+'"]').text());}},toggleColor:function(e){e.preventDefault();var swatch=$(e.currentTarget);var color=swatch.attr('data-color');this.setColor(color);},setColor:function(color){this.scope.find('[data-role="giftCard"]').css({backgroundColor:'#'+color}).end().find('input[type="hidden"][name="gift_voucher_color"]').val('#'+color).end().find('[data-color]').closest('li').removeAttr('data-selected');$(this.scope).find('[data-color="'+color+'"]').closest('li').attr('data-selected',true);}});}(jQuery,_));;
;(function($,_,undefined){"use strict";ips.controller.register('nexus.front.store.packagePage',{_productURL:'',initialize:function(){this.on('change','select, input[type="radio"], [name="quantity"], [name="renewal_term"]',this.updatePriceAndStock);this.on('submit','form',this.submitForm);this.on('click','[data-action="toggleImage"]',this.toggleScreenshot);this.on(document,'addToCart.nexus',this.addToCart);this.setup();},setup:function(){this.scope.find('.cNexusProduct_images [data-action="toggleImage"]').first().addClass('cNexusProduct_imageSelected');if(this.scope.find('select,input[type="radio"]').length){this.updatePriceAndStock();}},toggleScreenshot:function(e){e.preventDefault();var clickedImage=$(e.currentTarget);var thumbImage=clickedImage.find('img').attr('src');var fullImage=clickedImage.attr('href');var html=ips.templates.render('nexus.store.productImage',{fullURL:fullImage,thumbURL:thumbImage});this.scope.find('.cNexusProduct_primaryImage').replaceWith(html).end().find('[data-action="toggleImage"]').removeClass('cNexusProduct_imageSelected');clickedImage.addClass('cNexusProduct_imageSelected');$(document).trigger('contentChange',[this.scope.find('.cNexusProduct_primaryImage').parent()]);},submitForm:function(e){var self=this;var form=this.scope.find('form');if(form.attr('data-noajax')){return true;}