Event.observe(window, 'load', taskViewActivate);
//document.observe("dom:loaded", setupPrefEngine);
document.observe("dom:loaded", setupIconBar);
-document.observe('dom:loaded', function() { $('ib_chat_launch').observe('click', launchChat);});
+document.observe('dom:loaded', function() { if (!!document.getElementById("ib_chat_launch")) { $('ib_chat_launch').observe('click', launchChat); } });
function CtdlRandomString() {
return((Math.random()+'').substr(3));
}
}
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();
function attachDatePicker(relative) {
var dpck = new DatePicker({
relative: relative,
- language: 'en', // fix please
- disableFutureDate: false
+ language: 'en', //wclang.substr(0,2),
+ disableFutureDate: false,
+ dateFormat: [ ["yyyy", "mm", "dd"], "-"],
+ showDuration: 0.2
});
document.getElementById(relative).dpck = dpck; // attach a ref to it
}
}
}
-
-
-
// Functions which handle show/hide of various elements in the recurrence editor
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);
+ }
+}