diff --git a/labs/html5-embed/public/index.html b/labs/html5-embed/public/index.html index c757cf51487b043a3a8c60db90401c24d391cf84..8b244bcc53930cc61cf9ab8253db1049976d8941 100755 --- a/labs/html5-embed/public/index.html +++ b/labs/html5-embed/public/index.html @@ -49,7 +49,7 @@ <button type="button" onclick="sendPublicChat()">Send Public Chat</button> <button type="button" onclick="sendPrivateChat()">Send Private Chat</button> </div> - <div id="layout" class="users-enabled"> + <div id="layout"> <div id="content" style="display: block"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%" id="BigBlueButton" name="BigBlueButton" align="middle"> <param name="movie" value="http://192.168.0.249/client/BigBlueButton.swf?v=VERSION" /> diff --git a/labs/html5-embed/public/js/views/users/users.js b/labs/html5-embed/public/js/views/users/users.js index 0414ddd911405fe2e0612e5a1e936e2f08222f99..3d61d1216ecaa982185bb51abb1daa138dd58be8 100755 --- a/labs/html5-embed/public/js/views/users/users.js +++ b/labs/html5-embed/public/js/views/users/users.js @@ -10,8 +10,7 @@ define([ var UsersView = Backbone.View.extend({ el: 'ul', - initialize: function(){ - // UserCollection.on('add', this.addUser, this); + initialize: function(){ var self = this; UserCollection.bind("reset", this.render, this); UserCollection.bind("add", function (user) { @@ -19,27 +18,15 @@ define([ }); }, render: function(){ - console.log("*** Rendering Users View [" + UserCollection.length + "]"); $(this.el).empty(); _.each(UserCollection.models, function (user) { $(this.el).append(new UserView({model:user}).render().el); }, this); return this; - }, - addUser: function(user) { - var compiledTemplate = _.template( usersTemplate); -// this.$el.html( compiledTemplate ); - console.log("Adding user [" + user.get("username") + "]"); - var view = new UserView({model: user}); - - this.$el.append(view.render().el); - console.log("Rendering [" + this.$el.html() + "]"); - } + } }); var usersView = new UsersView(); - UserCollection.on("add", usersView.render); - return usersView; }); diff --git a/labs/html5-embed/public/templates/users/user.html b/labs/html5-embed/public/templates/users/user.html index e88dee095a7f3e346594779af6aacb596d3c8552..a32d0caa51c8143c68d118394181a150cbf6290e 100755 --- a/labs/html5-embed/public/templates/users/user.html +++ b/labs/html5-embed/public/templates/users/user.html @@ -1 +1 @@ -<%= userid %> - <%= username %> +<%= username %>