Skip to content
Snippets Groups Projects
Commit bb55f808 authored by PavelBegunkov's avatar PavelBegunkov
Browse files

errors: The ancient Evil

parent d57545db
Branches
Tags
No related merge requests found
......@@ -20,7 +20,7 @@ $(document).ready(function() {
{
$.getJSON(URLdir + "handler/ErrMessages/getRequests", {}, function(data){
if(typeof(data[0]) == "undefined")
alert("Вы еще ничего не написали");
EventInspector_ShowMsg('Вы еще ничего не написали', 'error');
else
{
var valHeight = 0;
......@@ -52,16 +52,17 @@ $(document).ready(function() {
$('.dialogMyMessagesBtn').click(dialogMyMessagesBtn);
$('#dialogSendButton').click(function dialogSendButton()
{
var thisObj = $(this);
$(this).attr("disabled", true);
var mesTitle = $('#messageTitle').val();
var mesText = $('#message').val();
if(mesTitle == '')
alert("Вы не ввели сообщение");
else if(mesText == '')
alert("Вы не ввели тему сообщения");
if(mesTitle.length == 0)
EventInspector_ShowMsg('Вы не ввели тему сообщения', 'error');
else if(mesText.length == 0)
EventInspector_ShowMsg('Вы не ввели сообщение', 'error');
else
{
var thisObj = $(this);
$(this).attr("disabled", true);
$.ajax({
type: "POST",
url: URLdir + "handler/ErrMessages/createRequest",
......@@ -79,7 +80,8 @@ $(document).ready(function() {
EventInspector_ShowMsg('Сообщение не отправлено', 'error');
thisObj.removeAttr('disabled');
}
});
});
}
});
});
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment