replaced message.coffee with message.js
This commit is contained in:
parent
7027c4ea12
commit
b7cb6f2591
2 changed files with 16 additions and 10 deletions
|
@ -1,10 +0,0 @@
|
||||||
$ '.send'
|
|
||||||
.click ->
|
|
||||||
$context = $ this
|
|
||||||
$.ajax
|
|
||||||
url: "https://kelder.zeus.ugent.be/messages/",
|
|
||||||
contentType: "text/plain",
|
|
||||||
type: "POST"
|
|
||||||
data: $('.chatbox').val()
|
|
||||||
success: -> $('#chat-response').text('Success! :)')
|
|
||||||
error: -> $('#chat-response').text('Error !1!')
|
|
16
content/assets/scripts/message.js
Normal file
16
content/assets/scripts/message.js
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
$('.send').click(function() {
|
||||||
|
var $context;
|
||||||
|
$context = $(this);
|
||||||
|
return $.ajax({
|
||||||
|
url: "https://kelder.zeus.ugent.be/messages/",
|
||||||
|
contentType: "text/plain",
|
||||||
|
type: "POST",
|
||||||
|
data: $('.chatbox').val(),
|
||||||
|
success: function() {
|
||||||
|
return $('#chat-response').text('Success! :)');
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
return $('#chat-response').text('Error !1!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in a new issue