shortcut with command for opera/mac

git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@485 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
Evgeny Gryaznov 2009-04-24 15:52:17 +00:00
parent ed75f8df9f
commit dbebdbee42

View File

@ -250,6 +250,11 @@ function is_agent_opera95() {
return false;
}
function is_mac_opera() {
$useragent = strtolower($_SERVER['HTTP_USER_AGENT']);
return strstr($useragent,"opera") && strstr($useragent, "mac");
}
function needsFramesrc() {
$useragent = strtolower($_SERVER['HTTP_USER_AGENT']);
return strstr($useragent,"safari/");
@ -308,7 +313,7 @@ function setup_chatview_for_user($thread,$level) {
$page['send_shortcut'] = "Enter";
$page['ignorectrl'] = 1;
} else {
$page['send_shortcut'] = "Ctrl-Enter";
$page['send_shortcut'] = is_mac_opera() ? "⌘-Enter" : "Ctrl-Enter";
$page['ignorectrl'] = 0;
}
@ -364,7 +369,7 @@ function setup_chatview_for_operator($thread,$operator) {
$page['send_shortcut'] = "Enter";
$page['ignorectrl'] = 1;
} else {
$page['send_shortcut'] = "Ctrl-Enter";
$page['send_shortcut'] = is_mac_opera() ? "⌘-Enter" : "Ctrl-Enter";
$page['ignorectrl'] = 0;
}