From c78bb37f92c30c8f020747a82269a2869c53b278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 20 Oct 2012 16:15:32 +0200 Subject: [PATCH] Adding more ACL-options and userGroupOptions, add language item --- acloptions.xml | 8 ++++++++ file/js/be.bastelstu.WCF.Chat.coffee | 8 +++++--- language/de.xml | 1 + template/chat.tpl | 2 +- userGroupOption.xml | 24 ++++++++++++++++++++++++ 5 files changed, 39 insertions(+), 4 deletions(-) diff --git a/acloptions.xml b/acloptions.xml index 61aea2b..f4d7277 100644 --- a/acloptions.xml +++ b/acloptions.xml @@ -29,6 +29,14 @@ be.bastelstu.wcf.chat.room mod + + \ No newline at end of file diff --git a/file/js/be.bastelstu.WCF.Chat.coffee b/file/js/be.bastelstu.WCF.Chat.coffee index 4a40a5f..d0d4d89 100644 --- a/file/js/be.bastelstu.WCF.Chat.coffee +++ b/file/js/be.bastelstu.WCF.Chat.coffee @@ -480,14 +480,16 @@ window.console ?= # Desktop Notifications if typeof window.webkitNotifications isnt 'undefined' if window.webkitNotifications.checkPermission() is 0 - title = WCF.Language.get 'wcf.chat.newMessages' + title = WCF.Language.get 'wcf.chat.notify.title' icon = WCF.Icon.get 'be.bastelstu.wcf.chat.chat' content = message.username + message.separator + (if message.separator is ' ' then '' else ' ') + message.message notification = window.webkitNotifications.createNotification icon, title, content notification.show() - setTimeout(() -> + + # Hide notification after 10 seconds + setTimeout () -> notification.cancel() - , 5e3) + , 10e3 ### # Refreshes the room-list. ### diff --git a/language/de.xml b/language/de.xml index 86083eb..e6013b3 100644 --- a/language/de.xml +++ b/language/de.xml @@ -76,6 +76,7 @@ Hinweis: Setzen Sie diese Einstellung nur, wenn Sie wissen, was sie bewirkt. Die + diff --git a/template/chat.tpl b/template/chat.tpl index 54e3e7c..2bbbaaf 100644 --- a/template/chat.tpl +++ b/template/chat.tpl @@ -144,7 +144,7 @@ 'wcf.chat.kick': '{lang}wcf.chat.kick{/lang}', 'wcf.chat.ban': '{lang}wcf.chat.ban{/lang}', 'wcf.chat.profile': '{lang}wcf.chat.profile{/lang}', - 'wcf.chat.newMessages': '{lang}wcf.chat.newMessages{/lang}' + 'wcf.chat.notify.title': '{lang}wcf.chat.notify.title{/lang}' }); WCF.Icon.addObject({ 'be.bastelstu.wcf.chat.chat': '{icon size='L'}chat{/icon}' diff --git a/userGroupOption.xml b/userGroupOption.xml index b0dc50c..ef4592d 100644 --- a/userGroupOption.xml +++ b/userGroupOption.xml @@ -50,6 +50,30 @@ 0 1 + + + +