NexusLeads Webshell
NexusLeads


Server : LiteSpeed
System : Linux server 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64
User : alsaif ( 1057)
PHP Version : 7.4.33
Disable Function : show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Directory :  /home/alsaif/public_html/administrator/templates/hathor/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/alsaif/public_html/administrator/templates/hathor/js/template.js
/**
 * @package		Hathor
 * @copyright	(C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

/**
 * Functions
 */

/**
 * Change the skip nav target to work with webkit browsers (Safari/Chrome) and
 * Opera
 */
function setSkip() {
	var $ = jQuery.noConflict();
	var browser = $.browser;
	if (browser.chrome || browser.safari || browser.opera) {
		var $target = $('#skiptarget');
		$target.attr('href',"#skiptarget");
		$target.text("Start of main content");
		$target.attr("tabindex", "0");
		$('#skiplink').on("click", function(){
			$('#skiptarget').focus();
		});
	}
}

/**
 * Set the Aria Role based on the id
 *
 * @param id
 * @param rolevalue
 * @return
 */
function setRoleAttribute(id, rolevalue) {
	if (jQuery('#' + id).length) {
		jQuery('#'+ id).attr("role", rolevalue);
	}
}

/**
 * Set the WAI-ARIA Roles Specify the html id then aria role
 *
 * @return
 */
function setAriaRoleElementsById() {
	setRoleAttribute("header", "banner");
	setRoleAttribute("element-box", "main");
	setRoleAttribute("footer", "contentinfo");
	setRoleAttribute("nav", "navigation");
	setRoleAttribute("submenu", "navigation");
	setRoleAttribute("system-message", "alert");
}

/**
 * This sets the given Aria Property state to true for the given element
 *
 * @param el
 *            The element (tag.class)
 * @param prop
 *            The property to set to true
 * @return
 */
function setPropertyAttribute(el, prop) {
	if (jQuery(el).length) {
		jQuery(el).attr(prop, "true");
	}
}

/**
 * Set the WAI-ARIA Properties Specify the tag.class then the aria property to
 * set to true If classes are changed on the fly (i.e. aria-invalid) they need
 * to be changed there instead of here.
 *
 * @return
 */
function setAriaProperties() {
	setPropertyAttribute("input.required", "aria-required");
	setPropertyAttribute("textarea.required", "aria-required");
	setPropertyAttribute("input.readonly", "aria-readonly");
	setPropertyAttribute("input.invalid", "aria-invalid");
	setPropertyAttribute("textarea.invalid", "aria-invalid");
}


/**
 * Process file
 */

/** from accessible suckerfish menu by Matt Carroll,
 * mootooled by Bill Tomczak
 */

jQuery(function($){
	var $menu = $('#menu');
	if ($menu.length && !$menu.hasClass('disabled')) {
		$menu.find('li').each(function(){
			$(this).on('mouseenter', function(){
				$(this).addClass('sfhover');
			});
			$(this).on('mouseleave', function() {
				$(this).removeClass('sfhover');
			});
		});

		$menu.find('a').each(function() {
			$(this).on('focus', function() {
				$(this).addClass('sffocus');
				$(this).closest('li').addClass('sfhover');
			});
			$(this).on('blur', function() {
				$(this).removeClass('sffocus');
				$(this).closest('li').removeClass('sfhover');
			});
		});
	}
});

jQuery(function() {
	setSkip();
	setAriaRoleElementsById();
	setAriaProperties();
});

NexusLeads