client/js/main.js
changeset 383 ba1f278841a2
parent 377 1d87c4342e5d
child 390 43833e4cb813
equal deleted inserted replaced
382:cc5aff8ae27c 383:ba1f278841a2
   107 
   107 
   108     this.read_only = this.options.read_only || !this.options.editor_mode;
   108     this.read_only = this.options.read_only || !this.options.editor_mode;
   109 
   109 
   110     this.project = new Rkns.Models.Project();
   110     this.project = new Rkns.Models.Project();
   111 
   111 
       
   112     this.setCurrentUser = function (user_id, user_name) {
       
   113     	this.project.addUser({
       
   114     		_id:user_id,
       
   115     		title: user_name
       
   116     	});
       
   117     	this.current_user = user_id;
       
   118     	this.renderer.redrawUsers();
       
   119     };
       
   120     
   112     if (typeof this.options.user_id !== "undefined") {
   121     if (typeof this.options.user_id !== "undefined") {
   113         this.current_user = this.options.user_id;
   122         this.current_user = this.options.user_id;
   114     }
   123     }
   115     this.$ = Rkns.$("#" + this.options.container);
   124     this.$ = Rkns.$("#" + this.options.container);
   116     this.$
   125     this.$