Merge branch 'master' of github.com:ZeusWPI/zeus.ugent.be
This commit is contained in:
commit
33263ac2dd
2 changed files with 23 additions and 0 deletions
11
content/assets/scripts/message.coffee
Normal file
11
content/assets/scripts/message.coffee
Normal 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!')
|
|
@ -4,6 +4,7 @@ title: Cammie
|
||||||
---
|
---
|
||||||
<% content_for :scripts do %>
|
<% content_for :scripts do %>
|
||||||
<%= asset :js, :cammie %>
|
<%= asset :js, :cammie %>
|
||||||
|
<%= asset :js, :message %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<section id="cammie-section">
|
<section id="cammie-section">
|
||||||
|
@ -66,4 +67,15 @@ title: Cammie
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</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>
|
</section>
|
||||||
|
|
Loading…
Reference in a new issue