%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/shaban/laviva/wp-content/themes/levelup/inc/admin/assets/
Upload File :
Create Path :
Current File : /var/www/html/shaban/laviva/wp-content/themes/levelup/inc/admin/assets/admin_mbox_magick.js

// JavaScript Document

jQuery(document).ready(function($){

	function rdy_show($_box, init){
		if (init == true){
			$_box.show();
		} else {
			$_box.animate({ opacity: '1' }, { queue: false, duration: 500 }).slideDown(500);
		}
	}

	function rdy_hide($_box){
		$_box.animate({ opacity: '0' }, { queue: false, duration: 500 }).slideUp(500);
	}

	function rdy_switcher($_this, init){
		var $_box = $("."+$_this.attr("data-name"));
		if ( $_this.attr("value")=="show" && $_this.is(":checked") || $_this.attr("value")=="show" && $_this.is(":hidden") ){
			rdy_show($_box, init);
		} else if ($_this.attr("value")=="hide" && $_this.is(":checked") || $_this.attr("value")=="hide" && $_this.is(":hidden") ) {
			rdy_hide($_box);
		}

		if( $_this.is('input[type="checkbox"]') ) {
			if( $_this.is(":checked") ) rdy_show($_box, init);
			else rdy_hide($_box);
		}
	}

	$(".rdy_radio-img label input:checked").parent("label").addClass("act").siblings('label').removeClass("act");

	$(".rdy_radio-img label").on("click", function(){
		$(this).siblings('label').removeClass("act").find('input').removeAttr("checked");
		$("> input", this).attr("checked","checked").trigger('change');
		$(this).addClass("act");
	});


	$(".rdy_switcher input:checked").each(function(){
		rdy_switcher($(this), true);
	});

	$(".rdy_switcher").on("change", function(e){
		rdy_switcher($(" > input", e.currentTarget));
	});



	$(".rdy_advanced input[value=show]").each(function(){
		$(this).parent().addClass("act");
		rdy_switcher($(this), true);
	});

	$(".rdy_advanced").on("click", function(e){
		e.preventDefault();

		var	$_this = $(e.currentTarget),
			$_check = $("> input:hidden", $_this);

		if ($_check.attr("value")=="show") {
			$_this.removeClass("act");
			$_check.attr("value", "hide");
		} else if ($_check.attr("value")=="hide") {
			$_this.addClass("act");
			$_check.attr("value", "show");
		}

		rdy_switcher($_check);
	});


	function rdy_tabs(label){
		var	$_this = $(label),
			$_check = $("> input", $_this);

		$_this.siblings("label").removeClass("act").find("input").removeAttr("checked");
		$_check.attr("checked","checked");
		$_this.addClass("act");

		var $_tabs = $_this.parents(".rdy_tabs"),
			$_tabs_content = $_tabs.next(".rdy_tabs-content");

		if ($_check.attr("value")=="all") {
			$("> div", $_tabs_content).hide();
			$("> .rdy_tab-all", $_tabs_content).show();
			$("> .rdy_arrange-by", $_tabs).not('.hide-if-js').hide();
			$_tabs_content.removeClass("except only");
		} else if ($_check.attr("value")=="only") {
			$("> div", $_tabs_content).hide();
			$("> .rdy_tab-select", $_tabs_content).show();
			$("> .rdy_arrange-by", $_tabs).not('.hide-if-js').show();
			$_tabs_content.removeClass("except").addClass("only");
		} else if ($_check.attr("value")=="except") {
			$("> div", $_tabs_content).hide();
			$("> .rdy_tab-select", $_tabs_content).show();
			$("> .rdy_arrange-by", $_tabs).not('.hide-if-js').show();
			$_tabs_content.removeClass("only").addClass("except");
		}

		if ($_check.attr("value")=="albums") {
			$("> .rdy_tab-select > div", $_tabs_content).hide();
			$("> .rdy_tab-select > .rdy_tab-items", $_tabs_content).show();
		} else if ($_check.attr("value")=="category") {
			$("> .rdy_tab-select > div", $_tabs_content).hide();
			$("> .rdy_tab-select > .rdy_tab-categories", $_tabs_content).show();
		}
	}


	$("label.rdy_tab input:checked, label.rdy_arrange input:checked").parent("label").addClass("act").siblings('label').removeClass("act");

	$(".rdy_tabs input:checked").each(function() {
		rdy_tabs($(this).parent("label"));
	});


	$(".rdy_tabs label").on("click", function(e){
		e.preventDefault();
		rdy_tabs($(e.currentTarget));
	});


	function rdy_toggle_checkbox(checkbox){
		var	$_this = $(checkbox),
			$_check = $("> input", $_this);

		if ($_check.attr("checked")=="checked") {
			$_check.removeAttr("checked");
			$_this.removeClass("act");
		} else {
			$_check.attr("checked", "checked");
			$_this.addClass("act");
		}
	}

	$(".rdy_checkbox").each(function(){
		var	$_this = $(this),
			$_check = $("> input", $_this);

		if ($_check.attr("checked")=="checked") {
			$_this.addClass("act");
		} else {
			$_this.removeClass("act");
		}
	});

	$(".rdy_checkbox").on("click", function(e){
		e.preventDefault();
		rdy_toggle_checkbox($(e.currentTarget));
	});

	$(".rdy_item-cover, .rdy_tab-categories > .rdy_list-item > span").on("click", function(e){
		rdy_toggle_checkbox($(e.currentTarget).parent().find(".rdy_checkbox"));
	});

	$(".rdy_item-cover, .rdy_tab-categories > .rdy_list-item > span").on("mouseenter", function(){
		$(this).parent().find(".rdy_checkbox").addClass("rdy_hover");
	}).on("mouseleave",function(){
		$(this).parent().find(".rdy_checkbox").removeClass("rdy_hover");
	});


	$(window).resize(function(){
		$(".rdy_tabs-content").css({"max-height" : $(window).height() - 150})
	});

	$(window).trigger("resize");

});

Zerion Mini Shell 1.0