diff --git a/examples/unfinished/shark/client/shark.html b/examples/unfinished/shark/client/shark.html
index 4e847e8296..9e9abcbd4e 100644
--- a/examples/unfinished/shark/client/shark.html
+++ b/examples/unfinished/shark/client/shark.html
@@ -3,22 +3,13 @@
-hello")[0].parentNode;
-// console.log(frag.firstChild.nodeName);
-// $(table).append(frag);
-//
-// console.log(TABLE.rows.length);
-//});
-
-Span = UI.Component.extend({
- typeName: 'Span',
- render: function (buf) {
- buf(" Hello");
- }
-});
-
-Div = UI.Component.extend({
- typeName: 'Div',
- render: function (buf) {
- buf("World",
- "",
- " ");
- }
-});
-
-Either = UI.Component.extend({
- typeName: 'Either',
- render: function (buf) {
- buf(Div.create(),
- {
- type: function () { return window[Session.get('which')]; },
- args: {
- built: function () {
- var self = this;
- self.$("*").on('click', function (evt) {
- Session.set(
- 'which',
- Session.get('which') === 'Div' ? 'Span' : 'Div');
- });
- }
- }
- },
- new UI.If({
- data: function () { return Session.get('which') === 'Div'; },
- content: Div,
- elseContent: Span
- }),
- { type: Span });
- buf(new UI.Each({
- data: function () {
- var sess = Session.get('items');
- return sess != null ? sess :
- Items.find({}, { sort: { text: 1 }});
- },
- content: UI.Component.extend({
- render: function (buf) {
- var self = this;
- buf("Each ",
- UI.Text(function () { return self.data().text; }),
- " ", String(Math.random()),
- " ");
- }
- })
- }));
- }
-});
-
-Meteor.startup(function () {
- Session.set('which', 'Span');
-
- // leak `x` for fooling around in the console
- x = Either.create({isRoot: true});
- x.attach(document.body);
-
- // leak `c`
- (c = UI.Counter.create({isRoot:true})).attach(document.body);
-});
-
-Meteor.startup(function () {
- var c = UI.Component.extend({
- render: function(buf) {
- buf(String(this.data()));
- }
- });
-
- L = UI.List({elseContent: function () {
- return c(function () { return 'else'; });
- }});
-
- L.addItemBefore('a', c, 1);
- L.addItemBefore('b', c, 2);
- L.addItemBefore('c', c, 3);
- L.makeRoot();
- L.attach(document.body);
- L.addItemBefore('d', c, 4);
- L.addItemBefore('e', c, 5, 'b');
- L.moveItemBefore('d', 'c');
- L.moveItemBefore('a');
- L.removeItem('b');
- L.removeItem('a');
- L.removeItem('c');
- L.removeItem('d');
- L.removeItem('e');
- L.addItemBefore('a', c, 1);
- L.addItemBefore('b', c, 2, 'a');
- L.addItemBefore('c', c, 3);
- L.moveItemBefore('c', 'a');
-});
\ No newline at end of file
+UI.body.items = Items.find({}, { sort: { text: 1 }});
|