Skip to content

Instantly share code, notes, and snippets.

View stlsmiths's full-sized avatar
🎯
Focusing

Todd Smith stlsmiths

🎯
Focusing
View GitHub Profile
@stlsmiths
stlsmiths / gist:970023
Created May 13, 2011 05:32
YUI 2 Dialog Roll-up
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Dialog Quickstart Example - Roll-up Toggle</title>
<style type="text/css">
/*margin and padding on body element
can introduce errors in determining
@stlsmiths
stlsmiths / gist:974931
Created May 16, 2011 17:38
A Form PickList
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>YUI PickList Example</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script src="../yui/build/yuiloader/yuiloader-min.js"></script>
<style type="text/css">
body {
@stlsmiths
stlsmiths / sdatatable_foot.js
Created June 8, 2011 22:31
YUI2 Scrolling DataTable with Footer
/**********
*
* ScrollingDataTable with Footer for YUI 2
* Author: Todd Smith (todd@stlsmiths.com)
* <br/>
* @module DataTableSF
* @requires yahoo, dom, event, element, datasource, datatable
* @title DataTableSF Widget
*
* To implement, add the following to the DataTable configs object,
@stlsmiths
stlsmiths / dt_grid_ss.html
Created June 10, 2011 20:05
YUI 2 Spreadsheet Demo via DataTable
<html>
<head>
<title>YUI DataTable Example : DataGrid SpreadSheet</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script src="http://yui.yahooapis.com/2.9.0/build/yuiloader/yuiloader-min.js"></script>
<style type="text/css">
.label_info {
background-color: #ccccff;
@stlsmiths
stlsmiths / datatable_nav.js
Created June 10, 2011 20:07
YUI 2 DataTable keyboard navigation prototypes
//--------------------------------------------------------------------------------------
// TODD'S Table Nav Stuff ...... BEGIN
//
// Functions allow cell navigation within a DataTable, first developed in pmgr/trans_grid.html
//
//
//
YAHOO.widget.DataTable.prototype.getFirstVisTdEl = function(cell) {
if ( !cell ) return null;
@stlsmiths
stlsmiths / parser.js
Created June 10, 2011 20:09
A great JS formula parser - this is a fork
/*
Based on ndef.parser, by Raphael Graf(r@undefined.ch)
http://www.undefined.ch/mparser/index.html
Website http://silentmatt.com/javascript-expression-evaluator/
*/
// Added by TES 6/13/2011
// re-define indexOf, because IE doesn't know it ...
// from http://stellapower.net/content/javascript-support-and-arrayindexof-ie
@stlsmiths
stlsmiths / dt_color_fmtRow.html
Created June 14, 2011 04:05
YUI 2 DataTable Row Coloring
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>YUI DataTable Example</title>
<script src="http://yui.yahooapis.com/2.9.0/build/yuiloader/yuiloader-min.js"></script>
<style type="text/css">
/* Define TR styles for each possible color combo */
@stlsmiths
stlsmiths / dt_json_local_parse.html
Created June 15, 2011 16:02
YUI2 local JSON complex parse with DataTable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>YUI DataTable Example</title>
<script src="http://yui.yahooapis.com/2.9.0/build/yuiloader/yuiloader-min.js"></script>
<script type="text/javascript">
@stlsmiths
stlsmiths / gist:1057797
Created July 1, 2011 03:08
YUI2 DataTable populated via Ajax call storing as local JSARRAY
<html>
<head>
<title>YUI DataTable Exercises</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script src="http://yui.yahooapis.com/2.9.0/build/yuiloader/yuiloader-min.js"></script>
<style type="text/css">
div.info {
background:#ffc;
@stlsmiths
stlsmiths / dt_ex_frames.html
Created July 21, 2011 21:43
YUI2 DT example with conditional dropdowns
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>YUI DataTable Example</title>
<script src="http://yui.yahooapis.com/2.9.0/build/yuiloader/yuiloader-min.js"></script>
<script type="text/javascript">