%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
| Server IP : 14.207.165.8 / Your IP : 216.73.216.126 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/thread-self/root/var/www/html/old/media/system/js/ |
Upload File : |
/**
* @copyright Copyright (C) 2005 - 2014 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');
}
});