Skip to content

Instantly share code, notes, and snippets.

View ericf's full-sized avatar

Eric Ferraiuolo ericf

View GitHub Profile
@ericf
ericf / gist:255872
Created December 14, 2009 07:24 — forked from lsmith/gist:255870
document.addEventListener('focus', prepareHandler, true); // capture phase
input.addEventListener('focus', inputHandler, false);
function prepareHandler(e) {
var id = e.target.id;
process[id] = true;
setTimeout(function () {
if (process[id]) {
// do stuff (e is available, but its methods are useless)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script src="http://yui.yahooapis.com/3.1.0/build/yui/yui-min.js"></script>
<script>
YUI().use('io',function(Y){
var ioConfig = {
Button = Y.Base.create('toolbar-button',Y.Widget,[Y.WidgetChild],{
BOUNDING_TEMPLATE : '<li/>',
CONTENT_TEMPLATE : '<button/>',
_clickHandle : null,
className : '',
initializer : function(config) {
this.className = this.getClassName();
},
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
#testDialogContainer{
background-color:#efefef
}
</style>
</head>
YUI.add('gallery-file-manager',function(Y){
Y.namespace('FileManager').Base = Y.Base.create('file-manager', Y.Widget, [Y.WidgetParent], {
renderUI : function() {
var i,l,layout = this.get('layout');
for(i=0, l=layout.length; i<l; i++) {
switch(layout[i]) {
case 'toolbar': break;
case 'explorer': break;
var a = "hello" +
"how" +
"are" +
"you";
this.useComponent('PageContentInfo', function(PageContentInfo){
// need a variable here...
PageContentInfo.loadPage('info');
});
loadPageContent: function(foo) {
this.useComponent('PageContentInfo', function(PageContentInfo){
// need a variable here...
// how does "foo" get in here?
PageContentInfo.loadPage('info');
});
@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>