Skip to content

Instantly share code, notes, and snippets.

View ericf's full-sized avatar

Eric Ferraiuolo ericf

View GitHub Profile
/**
* InviteWindow
*/
YUI().use('node', 'value-change', 'substitute', 'form-overlabels', 'resource', function(Y){
Y.on('domready', function(){
var inviteForm = Y.one('#invite').plug(Y.Plugin.FormOverlabels),
inviteFormInput = inviteForm.one('input'),
/**
* URLInfo Tests
*/
YUI.add('urlinfo-test', function(Y){
var suite = new Y.Test.Suite('URLInfo - Santize'),
re = /^(?:(https?:)\/\/)?(?:([^:@\s]+:?[^:@\s]+?)@)?([^:\/\s]+(?:\.[^:\/\s]{2,}){1,})(.*)/i;
function buildTestCase (name, allows, rejects) {
/**
* Sanitize URL — Validate it looks like a URL, then make it less dirty.
*
* Oddnut Software
* Copyright (c) 2010 Eric Ferraiuolo - http://eric.ferraiuolo.name
* MIT License - http://www.opensource.org/licenses/mit-license.php
*
* Examples:
*
* 'Http://WWW.example.com/' » 'http://www.example.com/'
/**
* Link Tests
*/
YUI.add('ttw-link-test', function(Y){
var matchSuite = new Y.Test.Suite('Link - Matching'),
sanitizeSuite = new Y.Test.Suite('Link - Sanitize');
function buildMatchTestCase (name, allows, rejects) {
<!DOCTYPE html>
<html>
<head>
<title>ValueChange Multiple Subscriptions</title>
</head>
<body>
@ericf
ericf / gist:564486
Created September 3, 2010 20:12 — forked from lsmith/gist:564394
<!doctype html>
<html>
<head>
<title>Test Page</title>
</head><body>
<input type="hidden" id="task1" value="Node loaded from YQL">
<ul id="tasks"></ul>
Y.TabSliderParent = Y.Base.create('tabsliderparent', Y.Widget, [Y.WidgetParent], {
_tabNums : null,
initializer : function() {
//code
this._tabNums = [idnum];
//code
});
SV.push({id :
new Y.ScrollView({
srcNode: '#' + id,
height: 370
})}
);
<!DOCTYPE html>
<html>
<head>
<title>TipTheWeb Button Test</title>
</head>
<body>
protected void renderYUI3Seed(HtmlContentWriter container) throws IOException {
this.renderYUI3Seed(container, true);
}
protected void renderYUI3Seed(HtmlContentWriter container, boolean includeModuleMetadata) throws IOException {
if (includeModuleMetadata)
this.renderYUI3Seed(container, includeModuleMetadata, isDebug ? YUI3_DEBUG_SEED_WITH_METADATA : YUI3_SEED_WITH_METADATA);
else