Merge branch 'master' of github.com:ZeusWPI/zeus.ugent.be

This commit is contained in:
Rien Maertens 2018-05-03 17:42:14 +02:00
commit 33263ac2dd
No known key found for this signature in database
GPG key ID: 943CAB70C511D23C
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,11 @@
$ '.send'
.click ->
$context = $ this
$.ajax
# url: "http://localhost:8080/"
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!')

View file

@ -4,6 +4,7 @@ title: Cammie
---
<% content_for :scripts do %>
<%= asset :js, :cammie %>
<%= asset :js, :message %>
<% end %>
<section id="cammie-section">
@ -66,4 +67,15 @@ title: Cammie
</button>
</div>
</nav>
<div class="columns">
<p id="chat-response"></p>
<div class="field has-addons ">
<div class="field control">
<input class="input chatbox" type="text" placeholder="Zeus is de max!">
</div>
<a class="button send control">
Send to kelder
</a>
</div>
<div>
</section>