Skip to content

Instantly share code, notes, and snippets.

@stlsmiths
Created April 24, 2012 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stlsmiths/2480907 to your computer and use it in GitHub Desktop.
Save stlsmiths/2480907 to your computer and use it in GitHub Desktop.
// Class extension to DataTable ...
Y.DataTableAdded = Y.Base.create( 'datatable-added', Y.DataTable, [], {
initializer : function() {
this.delegate( "click", _defTRClickHandler, "tr" );
this.delegate( "click", _defTDClickHandler, "td" ); // need selector work here ...
this.delegate( "click", _defTHClickHandler, "th" );
},
_defTRClickHandler : function(e) {
}
},{
ATTRS : {
selectedRow : { // either Node or NodeList
},
selectedCol : { // either Node or NodeList
},
selectedCell : { // either Node or NodeList
},
}
});
var newDT = new Y.DataTableAdded({
});
newDT.on("selectedCellChange", function(e){
// do something ...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment