summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-04-15 12:40:28 +0000
committeralecpl <alec@alec.pl>2009-04-15 12:40:28 +0000
commita83697a501b8303408f1329ef724be1ab8736af7 (patch)
treef151513204516e08cbf3d829483f591e4b711900
parent451637a76db5440a2cc3546c76124ba08da68d91 (diff)
- fix console for Konqueror
-rw-r--r--program/js/common.js20
1 files changed, 14 insertions, 6 deletions
diff --git a/program/js/common.js b/program/js/common.js
index 5923989ec..7ec18f205 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -608,20 +608,28 @@ function rcube_console()
{
this.log = function(msg)
{
- box = rcube_find_object('console');
+ var box = rcube_find_object('console');
- if (box)
+ if (box) {
if (msg.charAt(msg.length-1)=='\n')
- box.value += msg+'--------------------------------------\n';
+ msg += '--------------------------------------\n';
else
- box.value += msg+'\n--------------------------------------\n';
+ msg += '\n--------------------------------------\n';
+
+ // Konqueror (Safari also?) doesn't allows to just change value of hidden element
+ if (bw.konq) {
+ box.innerText += msg;
+ box.value = box.innerText;
+ } else
+ box.value += msg;
+ }
};
this.reset = function()
{
- box = rcube_find_object('console');
+ var box = rcube_find_object('console');
if (box)
- box.value = '';
+ box.innerText = box.value = '';
};
}