ChatServer/pages/js/utils.js
NorbiPeti 4b90fdf8b9 Fixes and improvements
- Fixed message receiving
- Fixed message chunk loading
- Added unread indicator
- Other fixes
2016-08-16 12:51:06 +02:00

20 lines
535 B
JavaScript

/**
* Created by Norbi on 2016-07-27.
*/
function getFormData($form) {
var unindexed_array = $form.serializeArray();
var indexed_array = {};
$.map(unindexed_array, function (n, i) {
indexed_array[n['name']] = n['value'];
});
return indexed_array;
}
function showError(message) {
var errormsg = document.getElementById("errormsg");
errormsg.innerHTML = message;
errormsg.style = "display: block";
setTimeout(function () { errormsg.style.display = "none"; }, 2000);
}