]> err.no Git - scalable-opengroupware.org/blobdiff - UI/WebServerResources/UIxTaskEditor.js
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1163 d1b88da0-ebda-0310...
[scalable-opengroupware.org] / UI / WebServerResources / UIxTaskEditor.js
index 86bec0685edd09f5692c580f270551e268e92c77..b68d3dac9d7b322d7a8a66f50abd7e08e691dca4 100644 (file)
@@ -1,7 +1,5 @@
 var contactSelectorAction = 'calendars-contacts';
 
-window.addEventListener("load", onTaskEditorLoad, false);
-
 function uixEarlierDate(date1, date2) {
   // can this be done in a sane way?
   //   cuicui = 'year';
@@ -249,9 +247,9 @@ this.onAdjustDueTime = function(event) {
 this.initTimeWidgets = function (widgets) {
   this.timeWidgets = widgets;
 
-  widgets['start']['date'].addEventListener("change", this.onAdjustDueTime, false);
-  widgets['start']['hour'].addEventListener("change", this.onAdjustDueTime, false);
-  widgets['start']['minute'].addEventListener("change", this.onAdjustDueTime, false);
+  Event.observe(widgets['start']['date'], "change", this.onAdjustDueTime, false);
+  Event.observe(widgets['start']['hour'], "change", this.onAdjustDueTime, false);
+  Event.observe(widgets['start']['minute'], "change", this.onAdjustDueTime, false);
 }
 
 function onStatusListChange(event) {
@@ -288,9 +286,11 @@ function onStatusListChange(event) {
 
 function initializeStatusLine() {
    var statusList = $("statusList");
-   statusList.addEventListener("mouseup", onStatusListChange, false);
+   Event.observe(statusList, "mouseup", onStatusListChange, false);
 }
 
 function onTaskEditorLoad() {
    initializeStatusLine();
 }
+
+addEvent(window, 'load', onTaskEditorLoad);