summaryrefslogtreecommitdiff
path: root/static/js/pichat.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/js/pichat.js')
-rwxr-xr-xstatic/js/pichat.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/static/js/pichat.js b/static/js/pichat.js
index 0a99f6c..01ae492 100755
--- a/static/js/pichat.js
+++ b/static/js/pichat.js
@@ -129,7 +129,7 @@ function addNewMessages(msgs) {
var wasScrolledToBottom = isScrolledToBottom($('#messageList')[0]);
var msgStr = $.map(msgs, buildMessageDiv).join('');
$('#messageList').append(msgStr);
-
+
if (wasScrolledToBottom) { delayedScrollToBottom(500); }
}
@@ -243,15 +243,17 @@ function initProfile() {
return escapeHtml(newVal);
};
- var opt = { 'default_text': 'Enter here!',
- 'callback': onSubmit,
- 'field_type': 'text',
- 'callbackShowErrors': false };
- $('#avatar.editable').editInPlace(opt);
-
+ var avatarOpts = { 'default_text': 'Enter here!',
+ 'callback': onSubmit,
+ 'field_type': 'text',
+ 'callbackShowErrors': false };
+ $('#avatar.editable').editInPlace(avatarOpts);
- opt['field_type'] = 'textarea';
- $('#contact.editable, #bio.editable').editInPlace(opt);
+ var textareaOpts = { 'default_text': 'Enter here!',
+ 'callback': onSubmit,
+ 'field_type': 'textarea',
+ 'callbackShowErrors': false };
+ $('#contact.editable, #bio.editable').editInPlace(textareaOpts);
};