aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/chat.tpl
diff options
context:
space:
mode:
authormarijus <mario@localhost.localdomain>2014-02-02 17:31:25 +0100
committermarijus <mario@localhost.localdomain>2014-02-02 17:31:25 +0100
commit9fcc2a18dfb042eca619d338ed6615bff3784be5 (patch)
treed02cdea385de99975d27c43ca555e57942ba2ee5 /view/tpl/chat.tpl
parentb3f819d52aa2b68529dadb3b409fe3c6f8ba7c0d (diff)
parente83419b53e27078867f8449f476d87b064b9d502 (diff)
downloadvolse-hubzilla-9fcc2a18dfb042eca619d338ed6615bff3784be5.tar.gz
volse-hubzilla-9fcc2a18dfb042eca619d338ed6615bff3784be5.tar.bz2
volse-hubzilla-9fcc2a18dfb042eca619d338ed6615bff3784be5.zip
Merge branch 'master' of https://github.com/friendica/red
Diffstat (limited to 'view/tpl/chat.tpl')
-rw-r--r--view/tpl/chat.tpl19
1 files changed, 19 insertions, 0 deletions
diff --git a/view/tpl/chat.tpl b/view/tpl/chat.tpl
index 0ebe879a1..dba6a777f 100644
--- a/view/tpl/chat.tpl
+++ b/view/tpl/chat.tpl
@@ -17,6 +17,8 @@
<input type="submit" name="submit" value="{{$submit}}" />
</form>
+ <a href="{{$baseurl}}/chat/{{$nickname}}/{{$room_id}}/leave">{{$leave}}</a> | <a href="{{$baseurl}}/chatsvc?f=&room_id={{$room_id}}&status=away">{{$away}}</a> | <a href="{{$baseurl}}/chatsvc?f=&room_id={{$room_id}}&status=online">{{$online}}</a>
+
</div>
</div>
@@ -89,3 +91,20 @@ function update_chats(chats) {
}
</script>
+<script>
+function isMobile() {
+ try{ document.createEvent("TouchEvent"); return true; }
+ catch(e){ return false; }
+}
+$(function(){
+
+ $('#chatText').keypress(function(e){
+ if (e.keyCode == 13 && e.shiftKey||isMobile()) {
+ }
+ else if (e.keyCode == 13) {
+ e.preventDefault();
+ $(this).parent('form').trigger('submit');
+ }
+ });
+});
+</script>