smoke.html revision eb6c1c09177446c3a7fa974e4658cbd555c5be18
<!doctype html>
<head>
<meta charset="utf-8">
<title>Test Page</title>
body {
xbackground: #000;
font-family: arial, sans-serif;
font-size: 13px;
}
#log {
background: #fff;
position: absolute;
top: 10px;
right: 10px;
width: 300px;
border: 2px ridge;
padding: 10px;
}
#log p {
margin: 1em 0;
}
</style>
</head>
<body>
<button id="add">Add a row</button>
<button id="remove">Remove a row</button>
<button id="modify">Modify a row</button>
<button id="addcol">Add a column</button>
<button id="removecol">Remove a column</button>
<button id="modifycol">Modify a column</button>
<button id="modifywidth">Modify width</button>
<button id="sort">Sort</button>
<button id="showmessage">Show Message</button>
<button id="hidemessage">Hide Message</button>
<!--div id="log"></div-->
<div class="wrapper yui3-skin-sam">
<div id="x"></div>
</div>
<p>
This is some content below the table.
</p>
<!--script src="http://yui.yahooapis.com/3.4.1/build/yui/yui.js"></script-->
<script>
YUI({
filter: 'raw'
}).use(
'datatable-base-deprecated',
'datatable-scroll-deprecated', 'datatable-sort-deprecated',
//'datatable-mutable', 'datatable-message',
'datasource-io', 'datatable-datasource-deprecated', 'datasource-jsonschema',
function (Y) {
var data = [], i;
for (i = 0; i < 10; ++i) {
});
}
var start = new Date();
//debugger;
recordset: data,
caption: 'Can you hear the caption?',
columnset: [
{
key: 'apples',
label: 'Apples',
sortable: true,
sortFn: function (a, b) {
return (a > b) ? 1 : (a < b) ? -1 : 0;
}
},
//{ label: "Parent of B and C", children: [
{ key: 'bananas', sortable: true },
{ key: 'carrots', sortable: true },
//]},
//{ label: "Parent of D through G", children: [
//{ label: 'Parent of D and E', children: [
{ key: 'daikon', sortable: true },
{ key: 'eggs', xwidth: '200px' },
//]},
//{ label: 'Parent of F and G', children: [
'fennel', 'guacamole'
//]}
//]}
]
});
var milestone = new Date();
/*
}).plug(Y.Plugin.DataSourceJSONSchema, {
schema: {
resultListLocator: 'records',
resultFields: 'apples bananas carrots daikon eggs fennel guacamole'.split(' ')
}
})
});
*/
//height: '200px',
width: '500px'
});
/*
});
*/
table.render('#x');
apples: 'Jan Comstock',
bananas: '1234',
carrots: 'The Diaries of Phil Collins',
daikon: 'What?',
eggs: 'scrambled',
fennel: 'raw, 2tbsp',
guacamole: 'For the chips!'
});
});
table.removeRow(0);
});
});
key: 'apples',
formatter: function (o) {
}
});
});
});
}});
});
unit = (''+width).replace(/[0-9]/g, '');
});
});
table.showMessage('loadingMessage');
});
});
});
</script>
</body>
</html>