diff --git a/examples/unfinished/azrael/client/azrael.js b/examples/unfinished/azrael/client/azrael.js index b149e81d01..578c9943bb 100644 --- a/examples/unfinished/azrael/client/azrael.js +++ b/examples/unfinished/azrael/client/azrael.js @@ -16,7 +16,7 @@ var selectRoom = function (room_id) { Session.set('current_room', room_id); }; -$(document).ready(function () { +Sky.startup(function () { $('body').layout({applyDefaultStyles: true}) }); @@ -48,8 +48,11 @@ Template.add_room.events = { // another is to suppress blur on rerender. probably the only // principled way to do this is to narrow the scope of the // rerender to not include the . + // + // [No idea if the comment above is still current] Session.set('editing_room_name', true); - Sky.ui.focus('#room_name_input'); + Sky.flush(); + $('#room_name_input').focus(); } }; @@ -61,7 +64,8 @@ Template.room.events = { Session.set('editing_room_name', true); // XXX XXX doesn't generalize.. the element might very reasonably // not have a unique id. may need a different strategy.. - Sky.ui.focus('#room_name_input'); + Sky.flush(); + $('#room_name_input').focus(); }, 'blur input': function (evt) { Session.set('editing_room_name', false); diff --git a/examples/unfinished/azrael/model.js b/examples/unfinished/azrael/model.js index bd204551cb..ec4fa3ca4d 100644 --- a/examples/unfinished/azrael/model.js +++ b/examples/unfinished/azrael/model.js @@ -1,11 +1,13 @@ // XXX it is actually very dangerous to store times as Number. use // Date type once it's implemented in minimongo Rooms = Sky.Collection("rooms"); -Rooms.schema({name: String, created: Number}); +//Rooms.schema({name: String, created: Number}); Chat = Sky.Collection("chat"); +/* Chat.schema({room: String, message: String, username: String, created: Number}); +*/ Sky.publish('rooms');