* fix issues with room list in firefox 2 (didn't detect console.log properly, again)
[citadel.git] / webcit / static / wclib.js
index 61f4b929cc8751410ff1cd6d9915c0b93a43e3a0..09cb0f242ca6fd309617dfca79c09196dbb716fd 100644 (file)
@@ -154,9 +154,7 @@ function changeIconBarEvent(event) {
 }
 function changeIconBar(target) {
   var switchTo = target.ctdlSwitchIconBarTo;
-  if (!!window.console) {
-    console.log("Changing to: " + switchTo);
-  }
+  WCLog("Changing to: " + switchTo);
   ctdlLocalPrefs.setPref("iconbar_view", target.ctdlSwitchIconBarTo);  
   if (switchTo == "rooms") {
     switch_to_room_list();
@@ -677,9 +675,6 @@ function eventEditAllDay() {
        }
 }
 
-
-
-
 // Functions which handle show/hide of various elements in the recurrence editor
 
 function RecurrenceShowHide() {
@@ -760,3 +755,11 @@ function RecurrenceShowHide() {
 function launchChat(event) {
 window.open('chat', 'ctdl_chat_window', 'toolbar=no,location=no,directories=no,copyhistory=no,status=no,scrollbars=yes,resizable=yes');
 }
+// logger
+function WCLog(msg) {
+  if (!!window.console && !!console.log) {
+    console.log(msg);
+  } else if (!!window.opera && !!opera.postError) {
+    opera.postError(msg);
+  }
+}