Skip to content

Instantly share code, notes, and snippets.

if (document.addEventListener) {
document.addEventListener("DOMContentLoaded", cascadeFields, false);
}
document.getElementsByClassName = function(cl) {
var retnode = [];
var myclass = new RegExp('\\b'+cl+'\\b');
var elem = this.getElementsByTagName('*');
for (var i = 0; i < elem.length; i++) {
var classes = elem[i].className;
YUI().use('event', 'node', function(Y) {
Y.on('domready', cascadeFields);
function unhide(cl) {
var nodes = Y.all('#mortgage_picker_form select.' + cl);
for (var i = 0; i < nodes._nodes.length; i++) {
nodes._nodes[i].style.display = "block";
}
}
YUI().use('event', 'node', function(Y) {
Y.on('domready', cascadeFields);
function unhide(cl) {
Y.all('#mortgage_picker_form select.' + cl).setStyle('display', 'block');
}
function hide(cl) {
Y.all('#mortgage_picker_form select.' + cl).setStyle('display', 'none');
}
<?php
$path = 'phploader/phploader/loader.php';
if (file_exists($path)) {
require_once $path;
$loader = new YAHOO_util_Loader("3.0.0");
$loader->base = "templates/".$this->template."/js/yui_3.0.0/";
//Specify YUI components to load
$loader->load("yui", "dom", "event", "event-resize");
//Output the tags (this call would most likely be placed in the document head
$css = $loader->css();
(function() {
var personFields = [
{name: 'id_person', type: 'string', mapping: 'id_person'},
{name: 'id_person_ref', type: 'string', mapping: 'id_person'},
{name: 'first_name', type: 'string', mapping: 'first_name'},
{name: 'initials', type: 'string', mapping: 'initials'},
{name: 'last_name', type: 'string', mapping: 'last_name'},
{name: 'id_title', type: 'string', mapping: 'id_title'},
{name: 'title', type: 'string', mapping: 'title'},
<?php
/**
* @copyright Copyright (C) 2009 - 2012 SiteWeavers. All rights reserved.
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
( function() {
// byEvent
// -------------------------------------------------------------------------------------------------------------
// Create an array variable called eventFields holding the variable mapping used by eventStore
// -------------------------------------------------------------------------------------------------------------
var eventFields = [
{name: 'id_booking', type: 'string', mapping: 'id_booking'},
{name: 'id_booking_ref', type: 'string', mapping: 'id_booking'},
{name: 'id_event', type: 'string', mapping: 'id_event'},
{name: 'id_event_ref', type: 'string', mapping: 'id_event'},
(
function buildEmployeePanel() {
Ext.namespace('NS1');
NS1.currentlySelectedEmployeeID = '';
NS1.currentlySelectedPersonID = '';
// editConfig
// -------------------------------------------------------------------------------------------------------------
// Create an array variable called employeeSelectorFields holding the variable mapping used by
// employeeSelectorStore
// -------------------------------------------------------------------------------------------------------------
YUI({
// we must tell the autoloader to get code from our server as we are using https
base: 'templates/dealdirect/js/yui_3.0.0/yui/build/', timeout: 10000
}).use('event', 'node', 'io-base', 'node-event-simulate', function(Y) {
Y.on('domready', clickListener);
function clickListener() {
@nickweavers
nickweavers / tabbed menu page
Created June 24, 2011 19:37
tabbed menu page using YUI3
/**
* This javascript program is used on the Seller Form to create a tabbed menu above a content div.
* The menu consists of a div for each tab with a link inside to capture the click. The click is used
* to send an http request for page content that corresponds to the tab.
*/
YUI({
// we must tell the autoloader to get code from our server as we are using https
base: 'libraries/js/yui_3.3.0/build/', timeout: 10000