Browse files

Merge branch 'master' of github.com:pkumar/codecollab

  • Loading branch information...
2 parents 9a56591 + 8fef614 commit 5448f5a942047415173d652cc9adc37ef0d9c81f @gsiddardha gsiddardha committed Sep 18, 2011
View
8 public/javascripts/collab.js
@@ -2,28 +2,28 @@ var socket = io.connect(window.location.origin);
var members = [];
updateMembers = function() {
- var e = document.getElementsByClassName('members')[0];
+ var e = $('.members')[0];
var r = members[0];
for(i=1;i<members.length;i++)
r += "\n"+members[i];
e.innerHTML = r;
}
putChat = function(msg) {
- var e = document.getElementsByClassName('chatbox')[0];
+ var e = $('.chatbox')[0];
e.innerHTML = e.innerHTML+msg+"\n";
}
sendChat = function() {
- var e = document.getElementsByClassName('chat')[0];
+ var e = $('.chat')[0];
socket.emit('chat', e.value);
e.value = '';
}
key_handler = function (key) {
console.log('{'+cpos+','+ver+','+substr+','+e+'}');
socket.emit('text edit', {cursor:cpos, version:ver, substring:substr, edit:e});
-});
+}
socket.on('text edit', function (data){
console.log('text-edit: '+data);
View
0 public/javascripts/jquery.min.js → public/javascripts/jquery.js
File renamed without changes.
View
2 views/layout.jade
@@ -3,7 +3,7 @@ html
head
title= title
link(rel='stylesheet', href='/stylesheets/style.css')
- link(rel='javascript', href='/javascripts/jquery.min.js')
+ script(type='text/javascript', src='/javascripts/jquery.js')
body
.topbar
.fill

0 comments on commit 5448f5a

Please sign in to comment.