mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
clean up azrael example
This commit is contained in:
committed by
Nick Martin
parent
f0df8212ee
commit
d052ca4b20
@@ -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 <input>.
|
||||
//
|
||||
// [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);
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user