![]() Server : Apache/2.4.52 (Ubuntu) System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64 User : www-data ( 33) PHP Version : 8.1.2-1ubuntu2.21 Disable Function : NONE Directory : /var/www/theprintave/wp-content/plugins/haru-pricom/assets/js/ |
/** * @package HaruTheme * @version 1.0.0 * @author Administrator <admin@harutheme.com> * @copyright Copyright 2022, HaruTheme * @license http://opensource.org/licenses/gpl-2.0.php GPL v2 or later * @link http://harutheme.com */ var HARUPRICOM = HARUPRICOM || {}; (function ($) { // Base functions HARUPRICOM.base = { init: function() { HARUPRICOM.base.widget_select2_process_new(); HARUPRICOM.base.elementorAccordion(); // @TODO }, elementorAccordion: function() { var delay = 10; setTimeout( function() { $('.elementor-tab-title').removeClass( 'elementor-active' ); $('.elementor-tab-content').css( 'display', 'none' ); }, delay ); }, widget_select2_new: function(event, widget) { var $select = $('.widget-content .widget-select2'); if ($select.length > 0) { var select2Defaults = { width : '100%', allowClear : true, tags : true, placeholder: 'Select' }; $select.each(function() { var $select2 = $(this); if ($select2.hasClass('.widget-select2-inited')) { return; } if ($select2.attr('multiple')) { $select2.on('select2:select', function(e) { var $elm = $(e.params.data.element); $select2.append($elm); $select2.trigger('change.select2'); }); $select2.parent().find('.widget-select2-all').on('click', function(e) { e.preventDefault(); $select2.select2('destroy').find('option').prop('selected', 'selected').end().select2(select2Defaults); }); $select2.parent().find('.widget-select2-unselect-all').on('click', function(e) { e.preventDefault(); $select2.select2('destroy').find('option').prop('selected', false).end().select2(select2Defaults); }); } if ($select2.parents('#widget-list').length > 0) { return; } $select2.select2(select2Defaults); $select2.addClass('.widget-select2-inited'); }); } }, widget_select2_process_new: function() { $(document).on('widget-added', HARUPRICOM.base.widget_select2_new); $(document).on('widget-updated', HARUPRICOM.base.widget_select2_new); HARUPRICOM.base.widget_select2_new(); }, } // Document ready HARUPRICOM.onReady = { init: function () { HARUPRICOM.base.init(); } }; $(document).ready( HARUPRICOM.onReady.init ); })(jQuery);