Commit 9c7b7904 authored by Markus Bergt's avatar Markus Bergt

added focus for message typechange

parent 2c095033
...@@ -64,6 +64,7 @@ $(document).ready(function() { ...@@ -64,6 +64,7 @@ $(document).ready(function() {
obj.addClass('btn-default'); obj.addClass('btn-default');
$('#messageType').attr('name', 'chatok'); $('#messageType').attr('name', 'chatok');
$('#messageBox').focus();
}); });
$('#changeToMod').click(function(event){ $('#changeToMod').click(function(event){
...@@ -79,6 +80,7 @@ $(document).ready(function() { ...@@ -79,6 +80,7 @@ $(document).ready(function() {
} }
obj.addClass('btn-warning'); obj.addClass('btn-warning');
$('#messageType').attr('name', 'modok'); $('#messageType').attr('name', 'modok');
$('#messageBox').focus();
}); });
$('#changeToAdmin').click(function(event){ $('#changeToAdmin').click(function(event){
...@@ -94,6 +96,7 @@ $(document).ready(function() { ...@@ -94,6 +96,7 @@ $(document).ready(function() {
} }
obj.addClass('btn-danger'); obj.addClass('btn-danger');
$('#messageType').attr('name', 'adminok'); $('#messageType').attr('name', 'adminok');
$('#messageBox').focus();
}); });
$('#showRegBtn').click(function(){ $('#showRegBtn').click(function(){
......
...@@ -99,7 +99,7 @@ if(isset($_GET['logoff'])){ ...@@ -99,7 +99,7 @@ if(isset($_GET['logoff'])){
<form class="" role="form" id="chatbar"> <form class="" role="form" id="chatbar">
<div class="input-group"> <div class="input-group">
<span class="input-group-addon hidden-xs"><?php echo $users['name']; ?>:</span> <span class="input-group-addon hidden-xs"><?php echo $users['name']; ?>:</span>
<input type="text" name="text" class="form-control" placeholder="Deine Nachricht..." autofocus> <input id="messageBox" type="text" name="text" class="form-control" placeholder="Deine Nachricht..." autofocus>
<span class="input-group-btn dropup"> <span class="input-group-btn dropup">
<input type="hidden" id="messageType" name=chatok value="btn" /> <input type="hidden" id="messageType" name=chatok value="btn" />
<button class="btn btn-default" id="sendMessage" type="submit"><span class="glyphicon glyphicon-send" /> <span class="hidden-xs">Senden</span></button> <button class="btn btn-default" id="sendMessage" type="submit"><span class="glyphicon glyphicon-send" /> <span class="hidden-xs">Senden</span></button>
......
Markdown is supported
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