changed most of the ajax calls to use sockets

This commit is contained in:
Baris Usakli
2013-07-10 11:20:31 -04:00
parent 79074fd597
commit 93653e88df
7 changed files with 81 additions and 74 deletions

View File

@@ -82,17 +82,10 @@ $(document).ready(function() {
function changeUserPicture(type) {
var userData = {
uid: $('#inputUID').val(),
type: type,
_csrf:$('#csrf_token').val()
type: type
};
$.post('/users/changepicture',
userData,
function(data) {
socket.emit('api:updateHeader', { fields: ['username', 'picture', 'userslug'] });
}
);
socket.emit('api:user.changePicture', userData);
}
var selectedImageType = '';