Skip to content

Instantly share code, notes, and snippets.

interface IAuthorization
{
String Item1 { get; set; }
String Item2 { get; set; }
String Item3 { get; set; }
}
public class App1Authorization
{
String Item1 { get; set; }
interface IAuthorization
{
String Item1 { get; set; }
String Item2 { get; set; }
String Item3 { get; set; }
}
public class App1Authorization
{
String Item1 { get; set; }
YUI().use('node', function(Y) {
buildSelectedList = function(selectBox) {
var list = "",
optList = Y.NodeList.getDOMNodes(selectBox.get('options'));
for (var i = 0 ; i < optList.length ; i += 1) {
if (optList[i].selected) {
if (list !== "") { list += ","; }
list += optList[i].value;
}
}
YUI().use('node','collection', function(Y) {
buildSelectList_MR = function(selectBox) {
return Y.Array.reduce(
Y.NodeList.getDOMNodes(selectBox.get('options')),
"",
function(list, value) {
if (value.selected) {
if (list !== "") { list += ","; }
list += value.value;
}
<html>
<head>
<title>Prepend Test</title>
</head>
<body>
<fieldset id="test_element">
Test Standards Compliance
<legend>Title of the Fieldset</legend>
<p>This is content.</p>
</fieldset>
<html>
<head><title>Event Delegation Test</title></head>
<body>
<form id="frm">
<select name="sel1" type="select">
<option>Value 1</option>
<option>Value 2</option>
<option>Value 3</option>
<option>Value 4</option>
</select>
<html>
<head>
<title>Prepend Test</title>
</head>
<body>
<fieldset id="test_element">
<p>Text before legend</p>
<legend>Title of the Fieldset</legend>
<p>Text after legend.</p>
</fieldset>
// Step 1. Create a module config object to pass to the YUI constructor
var myModules = {
bacon: {
path: '/path/to/rollup/file.js',
supersedes: ['list','of','the','concated','modules'],
rollup: 3
}
};
// Step2 . Instantiate your YUI with your module config and use()
YUI.namespace('myNamepsace');
YUI().use("node", "event", function(Y) {
YUI.myNamespace.someFunction = function() {
...
};
});
YUI.myNamespace.someFunction();
<div id="slideshow">
<div class='hd'><span class='yui-slideshow-title'>{Title}</span></div>
<div class='bd' style="width: {image_width}; height: {image_height};">
<div class='yui-slideshow-image'><img src="first_image.jpg" /></div>
</div>
<div class='ft'></div>
</div>