HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wpprm/wp-content/themes/ronneby/assets/js/tabsModelextended.js
(function($){

	window.InlineShortcodeView_dfd_tta_tabs = window.InlineShortcodeView_vc_tta_tabs.extend({
	});
	window.InlineShortcodeView_dfd_tta_tour = window.InlineShortcodeView_vc_tta_tour.extend({
	});
	function TTaMapChildEvents(model){

		var childTag = 'vc_tta_section';
		vc.events.on(
				'shortcodes:' + childTag + ':add:parent:' + model.get('id'),
				function(model){
					var activeTabIndex, models, parentModel;
					parentModel = vc.shortcodes.get(model.get('parent_id'));
					activeTabIndex = parseInt(parentModel.getParam('active_section'));
					if('undefined' === typeof (activeTabIndex)){
						activeTabIndex = 1;
					}
					models = _.pluck(_.sortBy(vc.shortcodes.where({parent_id: parentModel.get('id')}),
							function(model){
								return model.get('order');
							}), 'id');
					if(models.indexOf(model.get('id')) === activeTabIndex - 1){
						model.set('isActiveSection', true);
					}
					return model;
				});
		vc.events.on(
				'shortcodes:' + childTag + ':clone:parent:' + model.get('id'),
				function(model){
					vc.ttaSectionActivateOnClone && model.set('isActiveSection', true);
					vc.ttaSectionActivateOnClone = false;
				});
	}
	vc.events.on('shortcodes:dfd_tta_tabs:add', TTaMapChildEvents);
	vc.events.on('shortcodes:dfd_tta_tour:add', TTaMapChildEvents);

})(window.jQuery);