:
@@ -89,6 +106,13 @@ $("#addMessageLink").click(function (event) {
event.preventDefault();
});
+$("#collabEmails").keyup(function(event) {
+ var keyCode = event.keyCode;
+ if (keyCode == 13) {
+ $('#addBtn').trigger('click');
+ }
+});
+
var messages = {
owner:'
',
editor:'
',
@@ -106,10 +130,11 @@ function addCollaboration(email, role, changeType) {
var rowStr;
var tableElem = $("#collabsTable");
if (role != "owner") {
+ tableElem = $("#collabsTable tbody");
// Add row to the table ...
var rowTemplate = '\
\
- {email}{typeIcon} | \
+ {email}{typeIcon} | \
\
\
\
@@ -119,7 +144,7 @@ function addCollaboration(email, role, changeType) {
\
\
| \
- x | \
+ x | \
';
rowStr = rowTemplate.replace(/{email}/g, email);
@@ -146,8 +171,8 @@ function addCollaboration(email, role, changeType) {
});
} else {
rowStr = '
\
- ' + email + ' () | \
- | \
+ ' + email + ' () | \
+ | \
| \
';
tableElem.append(rowStr);