403Webshell
Server IP : 104.21.93.192  /  Your IP : 216.73.216.84
Web Server : LiteSpeed
System : Linux premium900.web-hosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : redwjova ( 1790)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : OFF |  Pkexec : OFF
Directory :  /home/redwjova/clevorio.com/wp-content/plugins/smartmag-core/js/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/redwjova/clevorio.com/wp-content/plugins/smartmag-core/js/widget-tabs.js
jQuery(function($) {
	
	$('.widget-liquid-right').on('change', '[name*="[cats]["]', function() {
		if ($(this).val() == 'tag') {
			$(this).parent().find('.tax_tag').show();
		}
		else {
			$(this).parent().find('.tax_tag').hide();
		}
	});
	
	$('.widget-liquid-right').on('click', '.remove-recent-tab', function() {
		$(this).parent().parent().prev('.title').remove();
		$(this).parent().parent().remove();
	});
	
	$('.widget-liquid-right').on('click', '#add-more-tabs', function(e, data) {

		// current tabs count
		var tabs_count = $(this).parent().data('bunyad_tabs') || 0,
			 max_id =  $(this).parent().data('max_id') || 0;
		
		if (tabs_count === 0) {
			tabs_count = $(this).parent().parent().find('.title').length;
		}

		if (tabs_count >= 6) { 
			alert('Woah, slow down. Do you really wish to be adding that many tabs?');
		}
		
		tabs_count++;
		max_id++;

		// get our template and modify it
		var html = $(this).parent().parent().find('.template-tab-options').html();
		
		
		/**
		 * Editing? - load template values
		 */
		
		// defaults
		var selected;
		if (data !== Object(data)) {
			data = {title: '', selected: 'recent', tax_tag: '', n: max_id, posts: 4};
		}

		// template replace
		for (i in data) {
			html = html.replace(new RegExp('%' + i + '%', 'g'), data[i]);
		}
		
		// set max id if editing 
		if (parseInt(data['n']) > max_id) {
			max_id = parseInt(data['n']);
		}
			
		selected = data.selected;

		html = $(html);
		html.find('label span').html(tabs_count);
		
		// select the pre-provided option
		if (selected) {
			html.find('select').val(selected);
		}
		
		$(this).parent().before(html);
		$(this).parent().parent().find('select').trigger('change');

		// update counter
		$(this).parent().data({'bunyad_tabs': tabs_count, 'max_id': max_id});
		
		e.stopPropagation();
		return false;
	});
});

Youez - 2016 - github.com/yon3zu
LinuXploit