? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/public_html/old/happy2/media/system/js/
File Upload :
Current File : /home/admin/public_html/old/happy2/media/system/js/switcher-uncompressed.js

/**
 * @copyright	Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

/**
 * Switcher behavior
 *
 * @package		Joomla
 * @since		1.5
 */
var JSwitcher = new Class({
	Implements: [Options, Events],

	togglers: null,
	elements: null,
	current: null,

	options : {
		onShow: function(){},
		onHide: function(){},
		cookieName: 'switcher',
		togglerSelector: 'a',
		elementSelector: 'div.tab',
		elementPrefix: 'page-'
	},

	initialize: function(toggler, element, options) {
		this.setOptions(options);
		this.togglers = document.id(toggler).getElements(this.options.togglerSelector);
		this.elements = document.id(element).getElements(this.options.elementSelector);

		if ((this.togglers.length == 0) || (this.togglers.length != this.elements.length)) {
			return;
		}

		this.hideAll();

		this.togglers.each(function(el) {
			el.addEvent('click', this.display.bind(this, el.id));
		}.bind(this));

		var first = [Cookie.read(this.options.cookieName), this.togglers[0].id].pick();
		this.display(first);
	},

	display: function(togglerID) {
		var toggler = document.id(togglerID);
		var element = document.id(this.options.elementPrefix+togglerID);

		if (toggler == null || element == null || toggler == this.current) {
			return this;
		}

		if (this.current != null) {
			this.hide(document.id(this.options.elementPrefix+this.current));
			document.id(this.current).removeClass('active');
		}

		this.show(element);
		toggler.addClass('active');

		this.current = toggler.id;
		Cookie.write(this.options.cookieName, this.current);
	},

	hide: function(element) {
		this.fireEvent('hide', element);
		element.setStyle('display', 'none');
	},

	hideAll: function() {
		this.elements.setStyle('display', 'none');
		this.togglers.removeClass('active');
	},

	show: function (element) {
		this.fireEvent('show', element);
		element.setStyle('display', 'block');
	}
});

T1KUS90T
  root-grov@210.1.60.28:~$