Import legacy nurinda.co.id website

This commit is contained in:
dirga committed 2026-10-01 14:27:19 +07:00
1 parent 3f59bb9038
commit 6e21646ac4
13389 files changed
+3246690

No files matched your search

@@ -0,0 +1,31 @@
jQuery( function( $ ) {
"use strict";
/* Ultimate Addons for WPBakery Page Builder integration */
jQuery( '.upb_bg_img, .upb_color, .upb_grad, .upb_content_iframe, .upb_content_video, .upb_no_bg' ).each( function() {
var $bg = jQuery( this ),
$prev = $bg.prev();
if ( $prev.length == 0 ) {
var $parent = $bg.parent(),
$parentParent = $parent.parent(),
$prevParentParent = $parentParent.prev();
if ( $prevParentParent.length ) {
$bg.insertAfter( $prevParentParent );
if ( $parent.children().length == 0 ) {
$parentParent.remove();
}
}
}
} );
$( '.g-cols > .ult-item-wrap' ).each( function( index, elm ) {
var $elm = jQuery( elm );
$elm.replaceWith( $elm.children() );
} );
jQuery( '.overlay-show' ).click( function() {
window.setTimeout( function() {
$us.$canvas.trigger( 'contentChange' );
}, 1000 );
} );
} );
@@ -0,0 +1 @@
jQuery(function($){"use strict";jQuery('.upb_bg_img, .upb_color, .upb_grad, .upb_content_iframe, .upb_content_video, .upb_no_bg').each(function(){var $bg=jQuery(this),$prev=$bg.prev();if($prev.length==0){var $parent=$bg.parent(),$parentParent=$parent.parent(),$prevParentParent=$parentParent.prev();if($prevParentParent.length){$bg.insertAfter($prevParentParent);if($parent.children().length==0){$parentParent.remove()}}}});$('.g-cols > .ult-item-wrap').each(function(index,elm){var $elm=jQuery(elm);$elm.replaceWith($elm.children())});jQuery('.overlay-show').click(function(){window.setTimeout(function(){$us.$canvas.trigger('contentChange')},1000)})})
@@ -0,0 +1,136 @@
/**
* UpSolution Element: w-cart
*
* @requires $us.canvas
* @requires $us.nav
*/
jQuery( function( $ ) {
var $cart = $( '.w-cart' );
if ( $cart.length == 0 ) {
return;
}
var $quantity = $cart.find( '.w-cart-quantity' );
var us_accessibility = function() {
$cart.find( 'a' ).on( 'focus.upsolution', function() {
$( this ).closest( '.w-cart' ).addClass( 'opened' );
} );
$cart.find( 'a' ).on( 'blur.upsolution', function() {
$( this ).closest( '.w-cart' ).removeClass( 'opened' );
} );
};
us_accessibility();
var updateCart = function() {
if ( $cart.hasClass( 'opened' ) ) {
$cart.removeClass( 'opened' );
}
var $mini_cart_amount = $cart.find( '.us_mini_cart_amount' ).first(),
mini_cart_amount = $mini_cart_amount.text();
if ( mini_cart_amount !== undefined ) {
mini_cart_amount = mini_cart_amount + '';
mini_cart_amount = mini_cart_amount.match( /\d+/g );
if ( mini_cart_amount > 0 ) {
$quantity.html( mini_cart_amount );
$cart.removeClass( 'empty' );
} else {
$quantity.html( '0' );
$cart.addClass( 'empty' );
}
} else {
// fallback in case our action wasn't fired somehow
var $quantities = $cart.find( '.quantity' ),
total = 0;
$quantities.each( function() {
var quantity,
text = $( this ).text() + '',
matches = text.match( /\d+/g );
if ( matches ) {
quantity = parseInt( matches[ 0 ], 10 );
total += quantity;
}
} );
if ( total > 0 ) {
$quantity.html( total );
$cart.removeClass( 'empty' );
} else {
$quantity.html( '0' );
$cart.addClass( 'empty' );
}
}
};
updateCart();
$( document.body ).bind( 'wc_fragments_loaded', function() {
updateCart();
us_accessibility();
} );
$( document.body ).bind( 'wc_fragments_refreshed', function() {
updateCart();
us_accessibility();
} );
var $notification = $cart.find( '.w-cart-notification' ),
$productName = $notification.find( '.product-name' ),
$cartLink = $cart.find( '.w-cart-link' ),
$dropdown = $cart.find( '.w-cart-dropdown' ),
$quantity = $cart.find( '.w-cart-quantity' ),
productName = $productName.text(),
showFn = 'fadeInCSS',
hideFn = 'fadeOutCSS',
opened = false;
$notification.on( 'click', function() {
$notification[ hideFn ]();
} );
jQuery( 'body' ).bind( 'added_to_cart', function( event, fragments, cart_hash, $button ) {
if ( event === undefined ) {
return;
}
updateCart();
productName = $button.closest( '.product' ).find( '.woocommerce-loop-product__title' ).text();
$productName.html( productName );
$notification.addClass( 'shown' );
$notification.on( 'mouseenter', function() {
$notification.removeClass( 'shown' );
} );
var newTimerId = setTimeout( function() {
$notification.removeClass( 'shown' );
$notification.off( 'mouseenter' );
}, 3000 );
} );
if ( $.isMobile ) {
var outsideClickEvent = function( e ) {
if ( jQuery.contains( $cart[ 0 ], e.target ) ) {
return;
}
$cart.removeClass( 'opened' );
$us.$body.off( 'touchstart', outsideClickEvent );
opened = false;
};
$cartLink.on( 'click', function( e ) {
if ( ! opened ) {
e.preventDefault();
$cart.addClass( 'opened' );
$us.$body.on( 'touchstart', outsideClickEvent );
} else {
$cart.removeClass( 'opened' );
$us.$body.off( 'touchstart', outsideClickEvent );
}
opened = ! opened;
} );
}
} );
@@ -0,0 +1,6 @@
jQuery(function($){var $cart=$('.w-cart');if($cart.length==0){return}
var $quantity=$cart.find('.w-cart-quantity');var us_accessibility=function(){$cart.find('a').on('focus.upsolution',function(){$(this).closest('.w-cart').addClass('opened')});$cart.find('a').on('blur.upsolution',function(){$(this).closest('.w-cart').removeClass('opened')})};us_accessibility();var updateCart=function(){if($cart.hasClass('opened')){$cart.removeClass('opened')}
var $mini_cart_amount=$cart.find('.us_mini_cart_amount').first(),mini_cart_amount=$mini_cart_amount.text();if(mini_cart_amount!==undefined){mini_cart_amount=mini_cart_amount+'';mini_cart_amount=mini_cart_amount.match(/\d+/g);if(mini_cart_amount>0){$quantity.html(mini_cart_amount);$cart.removeClass('empty')}else{$quantity.html('0');$cart.addClass('empty')}}else{var $quantities=$cart.find('.quantity'),total=0;$quantities.each(function(){var quantity,text=$(this).text()+'',matches=text.match(/\d+/g);if(matches){quantity=parseInt(matches[0],10);total+=quantity}});if(total>0){$quantity.html(total);$cart.removeClass('empty')}else{$quantity.html('0');$cart.addClass('empty')}}};updateCart();$(document.body).bind('wc_fragments_loaded',function(){updateCart();us_accessibility()});$(document.body).bind('wc_fragments_refreshed',function(){updateCart();us_accessibility()});var $notification=$cart.find('.w-cart-notification'),$productName=$notification.find('.product-name'),$cartLink=$cart.find('.w-cart-link'),$dropdown=$cart.find('.w-cart-dropdown'),$quantity=$cart.find('.w-cart-quantity'),productName=$productName.text(),showFn='fadeInCSS',hideFn='fadeOutCSS',opened=!1;$notification.on('click',function(){$notification[hideFn]()});jQuery('body').bind('added_to_cart',function(event,fragments,cart_hash,$button){if(event===undefined){return}
updateCart();productName=$button.closest('.product').find('.woocommerce-loop-product__title').text();$productName.html(productName);$notification.addClass('shown');$notification.on('mouseenter',function(){$notification.removeClass('shown')});var newTimerId=setTimeout(function(){$notification.removeClass('shown');$notification.off('mouseenter')},3000)});if($.isMobile){var outsideClickEvent=function(e){if(jQuery.contains($cart[0],e.target)){return}
$cart.removeClass('opened');$us.$body.off('touchstart',outsideClickEvent);opened=!1};$cartLink.on('click',function(e){if(!opened){e.preventDefault();$cart.addClass('opened');$us.$body.on('touchstart',outsideClickEvent)}else{$cart.removeClass('opened');$us.$body.off('touchstart',outsideClickEvent)}
opened=!opened})}})