Skip to content

Instantly share code, notes, and snippets.

@lsmith
lsmith / gist:1097943
Created July 21, 2011 19:07
Make Y.DataTable instantiable, and an extension point for feature extension classes
// Right now, Y.DataTable is only a namespace. But I want to be able to say new Y.DataTable({...});
// We can do it. We have the technology.
// Step 1. Capture all the properties of the Y.DataTable namespace
// Y.merge creates a shallow copy of an object, and since Y.DataTable is just a namespace object,
// this works like a champ. You could now say new Stuff.Base({...}) to create a DataTable.Base
// instance.
var Stuff = Y.merge(Y.DataTable);
// Step 2. Replace the Y.DataTable namespace with a working DataTable.Base subclass
@lsmith
lsmith / gist:1091534
Created July 19, 2011 07:07
A POC inline cell editor class extension/view for YUI 3 DataTable
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Test Page</title>
<style>
.yui3-skin-sam .yui3-datatable .yui3-datatable-data .yui3-datatable-editing {
position: relative;
padding: 0;
}
@lsmith
lsmith / a.js
Created May 22, 2011 13:57
Using YUI 3's groups config to support fetching non-YUI module js files ala requireJS pathing or explicit url
We couldn’t find that file to show.