diff --git a/UI/WebServerResources/ContactsUI.js b/UI/WebServerResources/ContactsUI.js index b0333f8a4..642ca89a0 100644 --- a/UI/WebServerResources/ContactsUI.js +++ b/UI/WebServerResources/ContactsUI.js @@ -770,7 +770,9 @@ function initializeMenus() { var initContacts = { handleEvent: function (event) { - configureAbToolbar(); + if (!document.body.hasClassName("popup")) { + configureAbToolbar(); + } configureContactFolders(); // initDnd(); } diff --git a/UI/WebServerResources/SchedulerUI.css b/UI/WebServerResources/SchedulerUI.css index dd4bd5375..f7be7cd0b 100644 --- a/UI/WebServerResources/SchedulerUI.css +++ b/UI/WebServerResources/SchedulerUI.css @@ -431,116 +431,6 @@ DIV.appointmentView white-space: nowrap; border: 1px solid #000; } -SPAN.colorBox -{ display: block; - float: right; - border: 1px solid #333; - margin: .12em; - width: 1em; - height: .75em; } - -DIV.freeBusyView -{ margin-left: 12em; - overflow: auto; - border-top: 2px solid #222; - border-left: 2px solid #222; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - -moz-border-top-colors: ThreeDShadow ThreeDDarkShadow; - -moz-border-left-colors: ThreeDShadow ThreeDDarkShadow; } - -TABLE.freeBusy TD, -TABLE.freeBusy TH -{ padding: 0px; - margin: 0px; - border: 0px; } - -TABLE.freeBusy TH.attendees, -TABLE.freeBusy TD.attendees -{ position: absolute; - padding: 0px .5em; - margin: 0px; - width: 11em; - border: 0px !important; - background: #dbdad5 !important; - overflow: hidden; - left: 0px; } - -TABLE.freeBusy TD.attendees IMG -{ position: absolute; - left: 0em; - top: .5em; } - -TABLE.freeBusy TD.attendees INPUT -{ width: 10em; - margin: 0px; - margin-left: 10px; } - -TABLE.freeBusy TR.freeBusyHeader2 TH -{ font-weight: normal; } - -TABLE.freeBusy TR.freeBusyHeader1 TH, -TABLE.freeBusy TR.freeBusyHeader2 TH, -TABLE.freeBusy TR.freeBusyHeader3 TH -{ text-align: left; - color: #777; - background: #fff; - border-collapse: collapse; } - -TABLE.freeBusy TR.freeBusyHeader2 TH -{ width: 6em; } - -TABLE.freeBusy TR.freeBusyHeader3 TH -{ border-bottom: 1px solid #cecbff; } - -TABLE.freeBusy TR.attendeeModel -{ display: none; } - -TABLE.freeBusy TR.futureAttendee TD -{ border-right: none; } - -TABLE.freeBusy TD -{ border-bottom: 1px solid #cecbff; - border-right: 1px solid #cecbff; - height: 2em; - background-color: #fff; } - -TABLE.freeBusy TD.noFreeBusy -{ background-color: #559; - border-right: 0px; } - -SPAN.freeBusyZoneElement -{ display: block; - float: left; - width: 25%; - margin: 0px; - padding: 0px; - border: 0px; } - -TABLE.freeBusy TR.freeBusyHeader3 SPAN.freeBusyZoneElement -{ height: .25em; } - -TABLE.freeBusy TD SPAN.freeBusyZoneElement -{ height: 100%; } - -SPAN[class~="colorBox"].free, -TABLE.freeBusy TD SPAN.freeBusyZoneElement -{ background-color: #8ca6bd; } - -TABLE.freeBusy TH SPAN[class~="freeBusyZoneElement"].busy -{ background-color: #c55 !important; } - -SPAN[class~="colorBox"].busy, -SPAN[class~="freeBusyZoneElement"].busy -{ background-color: #5a6b79 !important; } - -SPAN[class~="colorBox"].maybe-busy, -SPAN[class~="freeBusyZoneElement"].maybe-busy -{ background-color: #adc0d0 !important; } - -SPAN[class~="colorBox"].noFreeBusy -{ background-color: #559; } - /* new draggable presentation */ DIV.daysView diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index 88a6680f6..3d53d93c9 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -37,7 +37,7 @@ function newEvent(sender, type) { if (params.length > 0) urlstr += "?" + params.join("&"); - window.open(urlstr, "", "width=620,height=600,resizable=0"); + window.open(urlstr, "", "width=463,height=600,resizable=0"); return false; /* stop following the link */ } @@ -51,8 +51,7 @@ function _editEventId(id, owner) { var urlstr = urlBase + id + "/edit"; var win = window.open(urlstr, "SOGo_edit_" + id, - "width=620,height=600,resizable=0,scrollbars=0,toolbar=0," + - "location=0,directories=0,status=0,menubar=0,copyhistory=0"); + "width=463,height=600,resizable=0"); win.focus(); } @@ -542,24 +541,24 @@ function calendarDisplayCallback(http) log ("ajax fuckage"); } -function assignCalendar(name) -{ - var node = $(name); - - node.calendar = new skycalendar(node); - node.calendar.setCalendarPage(ResourcesURL + "/skycalendar.html"); - var dateFormat = node.getAttribute("dateFormat"); - if (dateFormat) - node.calendar.setDateFormat(dateFormat); +function assignCalendar(name) { + if (typeof(skycalendar) != "undefined") { + var node = $(name); + + node.calendar = new skycalendar(node); + node.calendar.setCalendarPage(ResourcesURL + "/skycalendar.html"); + var dateFormat = node.getAttribute("dateFormat"); + if (dateFormat) + node.calendar.setDateFormat(dateFormat); + } } -function popupCalendar(node) -{ - var nodeId = node.getAttribute("inputId"); - var input = $(nodeId); - input.calendar.popup(); +function popupCalendar(node) { + var nodeId = node.getAttribute("inputId"); + var input = $(nodeId); + input.calendar.popup(); - return false; + return false; } function onAppointmentContextMenu(event, element) diff --git a/UI/WebServerResources/UIxAppointmentEditor.css b/UI/WebServerResources/UIxAppointmentEditor.css index 21709aa25..6e2223685 100644 --- a/UI/WebServerResources/UIxAppointmentEditor.css +++ b/UI/WebServerResources/UIxAppointmentEditor.css @@ -5,16 +5,7 @@ DIV.appointmentLabel text-align: right; width: 3em; } -DIV#editorTabs -{ - position: absolute; - top: 4.5em; - left: 0px; - right: 0px; - bottom: 0px; -} - -DIV#editorTabs > DIV.tab +DIV#eventView { overflow: hidden; padding: .5em; } @@ -22,9 +13,18 @@ DIV.appointmentRightLabel { display: inline; vertical-align: middle; } +#privacy-menu LI +{ list-style-position: inside; + list-style-image: url("menu-nocheck.gif"); } + +#privacy-menu LI._chosen +{ list-style-image: url("menu-check.gif"); } + +#privacy-menu LI._chosen:hover +{ list-style-image: url("menu-check-hover.gif"); } + UL.contactList -{ - display: block; +{ display: block; cursor: default; list-style-type: none; list-style-image: none; @@ -34,8 +34,7 @@ UL.contactList border: 1px solid #000; width: 15em; height: 5em; - overflow: auto; -} + overflow: auto; } UL.contactList LI IMG { vertical-align: middle; } @@ -61,7 +60,7 @@ LABEL, SPAN.checkBoxList width: 100%; } LABEL#commentArea -{ height: 11.5em; } +{ height: 15em; } SPAN.checkBoxList#participantsCB { height: 7em; } @@ -88,7 +87,10 @@ TEXTAREA vertical-align: bottom; bottom: 1em; right: 1em; - padding-bottom: 1em; } + padding-bottom: 0em; } + +A#changeUrlButton +{ margin-left: 1em; } A#detailsButton { position: absolute; @@ -112,7 +114,7 @@ SPAN#categoriesCB INPUT { border: 2px solid #000; vertical-align: middle; -moz-border-top-colors: #000 #fff; - -moz-border-left-colors: #000 #fff; + -moz-border-left-colors: #000 #fff; -moz-border-bottom-colors: #000 #fff; -moz-border-right-colors: #000 #fff; } @@ -120,6 +122,9 @@ SPAN#categoriesCB LABEL { margin-left: 0px; margin-right: 1em; } +SPAN#allDay > INPUT +{ position: static; } + SPAN.content > INPUT { position: absolute; top: 0px; @@ -128,48 +133,3 @@ SPAN.content > INPUT LABEL#urlArea INPUT { position: static; } - -DIV.freeBusyView -{ height: 22em; - overflow: auto; } - -DIV#freeBusyFooter -{ position: absolute; - left: .5em; - right: .5em; - height: 6em; - line-height: 2em; - text-align: right; - bottom: 0px; } - -DIV#freeBusyButtons -{ float: left; - text-align: center; } - -DIV#freeBusyButtons A.button -{ width: 5em; } - -DIV#freeBusyReplicas LABEL -{ line-height: 1.5em; } - -DIV.legend UL -{ cursor: default; - float: left; - width: 30%; - margin: 0px; - padding: 0px; - line-height: 1.5em; - list-style-type: none; - list-style-image: none; } - -DIV.legend UL LI -{ white-space: nowrap; - margin: 0px; - padding: 0px; } - -DIV.legend UL IMG -{ margin-right: .5em; } - -DIV.legend UL LI SPAN.colorBox -{ float: left; - margin-right: .5em; } diff --git a/UI/WebServerResources/UIxFreeBusyUserSelector.js b/UI/WebServerResources/UIxAttendeesEditor.js similarity index 56% rename from UI/WebServerResources/UIxFreeBusyUserSelector.js rename to UI/WebServerResources/UIxAttendeesEditor.js index e8c8d44a0..39ce40fee 100644 --- a/UI/WebServerResources/UIxFreeBusyUserSelector.js +++ b/UI/WebServerResources/UIxAttendeesEditor.js @@ -5,7 +5,13 @@ var address; var delay = 500; var requestField; var awaitingFreeBusyRequests = new Array(); -var freeBusySelectorId; +var additionalDays = 2; + +var dayStartHour = 8; +var dayEndHour = 18; + +var attendeesNames; +var attendeesEmails; function onContactKeydown(event) { if (event.keyCode == 9) { @@ -31,6 +37,7 @@ function onContactKeydown(event) { || event.keyCode > 47) { running = true; requestField = this; + requestField.setAttribute("modified", "1"); setTimeout("triggerRequest()", delay); } else if (this.confirmedValue) { @@ -85,7 +92,7 @@ function updateResults(http) { function resetFreeBusyZone() { - var table = $("attendeesView").childNodesWithTag("div")[0].childNodesWithTag("table")[0]; + var table = $("freeBusy"); var row = table.tHead.rows[2]; for (var i = 1; i < row.cells.length; i++) { var nodes = row.cells[i].childNodesWithTag("span"); @@ -96,16 +103,17 @@ function resetFreeBusyZone() function redisplayFreeBusyZone() { - var table = $("attendeesView").childNodesWithTag("div")[0].childNodesWithTag("table")[0]; + var table = $("freeBusy"); var row = table.tHead.rows[2]; - var stDay = this.timeWidgets['start']['date'].valueAsDate(); - var etDay = this.timeWidgets['end']['date'].valueAsDate(); + var stDay = $("startTime_date").valueAsDate(); + var etDay = $("endTime_date").valueAsDate(); + var days = stDay.daysUpTo(etDay); var addDays = days.length - 1; - var stHour = parseInt(this.timeWidgets['start']['hour'].value); - var stMinute = parseInt(this.timeWidgets['start']['minute'].value) / 15; - var etHour = parseInt(this.timeWidgets['end']['hour'].value); - var etMinute = parseInt(this.timeWidgets['end']['minute'].value) / 15; + var stHour = parseInt($("startTime_time_hour").value); + var stMinute = parseInt($("startTime_time_minute").value) / 15; + var etHour = parseInt($("endTime_time_hour").value); + var etMinute = parseInt($("endTime_time_minute").value) / 15; if (stHour < 8) { stHour = 8; stMinute = 0; @@ -160,7 +168,7 @@ function redisplayFreeBusyZone() function newAttendee(event) { - var table = $("attendeesView").childNodesWithTag("div")[0].childNodesWithTag("table")[0]; + var table = $("freeBusy"); var tbody = table.tBodies[0]; var model = tbody.rows[tbody.rows.length - 1]; var newAttendeeRow = tbody.rows[tbody.rows.length - 2] @@ -207,10 +215,10 @@ function displayFreeBusyForNode(node) document.contactFreeBusyAjaxRequest.aborted = true; document.contactFreeBusyAjaxRequest.abort(); } - var sd = startDayAsShortString(); - var ed = endDayAsShortString(); + var sd = $('startTime_date').valueAsShortDateString(); + var ed = $('endTime_date').valueAsShortDateString(); var urlstr = ( UserFolderURL + "../" + node.uid + "/freebusy.ifb/ajaxRead?" - + "sday=" + sd + "&eday=" + ed + "&additional=2" ); + + "sday=" + sd + "&eday=" + ed + "&additional=" + additionalDays ); document.contactFreeBusyAjaxRequest = triggerAjaxRequest(urlstr, updateFreeBusyData, @@ -262,7 +270,7 @@ function updateFreeBusyData(http) function resetAttendeesValue() { - var table = $("attendeesView").childNodesWithTag("div")[0].childNodesWithTag("table")[0]; + var table = $("freeBusy"); var inputs = table.getElementsByTagName("input"); var uids = new Array(); for (var i = 0; i < inputs.length - 2; i++) { @@ -277,23 +285,13 @@ function resetAttendeesValue() currentInput.addEventListener("keydown", onContactKeydown, false); currentInput.addEventListener("blur", checkAttendee, false); } - var input = $(freeBusySelectorId); - input.value = uids.join(","); inputs[inputs.length - 2].setAttribute("autocomplete", "off"); inputs[inputs.length - 2].addEventListener("click", newAttendee, false); } -function initializeFreeBusyUserSelector() -{ - resetAttendeesValue(); - resetAllFreeBusys(); - disableAnchor($('FBStartTimeReplica_date').parentNode.childNodesWithTag('a')[0]); - disableAnchor($('FBEndTimeReplica_date').parentNode.childNodesWithTag('a')[0]); -} - function resetAllFreeBusys() { - var table = $("attendeesView").childNodesWithTag("div")[0].childNodesWithTag("table")[0]; + var table = $("freeBusy"); var inputs = table.getElementsByTagName("input"); for (var i = 0; i < inputs.length - 2; i++) { @@ -306,68 +304,196 @@ function resetAllFreeBusys() displayFreeBusyForNode(awaitingFreeBusyRequests.shift()); } -if (this.initTimeWidgets) - this.oldInitTimeWidgets = this.initTimeWidgets; +function initializeWindowButtons() { + var okButton = $("okButton"); + var cancelButton = $("cancelButton"); -this.initTimeWidgets = function(widgets) { - if (this.oldInitTimeWidgets) - this.oldInitTimeWidgets(widgets); - - this.timeWidgets = widgets; - - widgets['start']['hour'].addEventListener("change", onTimeWidgetChange, false); - widgets['start']['minute'].addEventListener("change", onTimeWidgetChange, false); - widgets['end']['hour'].addEventListener("change", onTimeWidgetChange, false); - widgets['end']['minute'].addEventListener("change", onTimeWidgetChange, false); - widgets['start']['date'].addEventListener("change", onTimeDateWidgetChange, false); - widgets['end']['date'].addEventListener("change", onTimeDateWidgetChange, false); - - widgets['start']['date'].assignReplica($("FBStartTimeReplica_date")); - widgets['end']['date'].assignReplica($("FBEndTimeReplica_date")); - - var form = $("FBStartTimeReplica_date").form; - widgets['end']['hour'].assignReplica(form["FBEndTimeReplica_time_hour"]); - widgets['end']['minute'].assignReplica(form["FBEndTimeReplica_time_minute"]); - widgets['start']['hour'].assignReplica(form["FBStartTimeReplica_time_hour"]); - widgets['start']['minute'].assignReplica(form["FBStartTimeReplica_time_minute"]); + okButton.addEventListener("click", onEditorOkClick, false); + cancelButton.addEventListener("click", onEditorCancelClick, false); } -function onTimeDateWidgetChange(event) { - if (document.timeWidgetsFreeBusyAjaxRequest) { - document.timeWidgetsFreeBusyAjaxRequest.aborted = true; - document.timeWidgetsFreeBusyAjaxRequest.abort(); - } +function onEditorOkClick(event) { + event.preventDefault(); - var date1 = window.timeWidgets['start']['date'].valueAsShortDateString(); - var date2 = window.timeWidgets['end']['date'].valueAsShortDateString(); - var attendees = $(freeBusySelectorId).value; - var urlstr = ( "../freeBusyTable?sday=" + date1 + "&eday=" + date2 - + "&attendees=" + attendees ); - document.timeWidgetsFreeBusyAjaxRequest - = triggerAjaxRequest(urlstr, timeWidgetsFreeBusyCallback); + attendeesNames = new Array(); + attendeesEmails = new Array(); + + var table = $("freeBusy"); + var inputs = table.getElementsByTagName("input"); + for (var i = 0; i < inputs.length - 2; i++) { + var name = inputs[i].uid; + if (!(name && name.length > 0)) + name = extractEmailName(inputs[i].value); + var email = extractEmailAddress(inputs[i].value); + var pos = attendeesEmails.indexOf(email); + if (pos == -1) + pos = attendeesEmails.length; + attendeesNames[pos] = name; + attendeesEmails[pos] = email; + } + + parent$("attendeesNames").value = attendeesNames.join(","); + parent$("attendeesEmails").value = attendeesEmails.join(","); + window.opener.refreshAttendees(); + + window.close(); } -function timeWidgetsFreeBusyCallback(http) -{ - if (http.readyState == 4) { - if (http.status == 200) { - var div = $("parentOf" + freeBusySelectorId.capitalize()); - div.innerHTML = http.responseText; - resetAttendeesValue(); - resetAllFreeBusys(); - redisplayFreeBusyZone(); - } - document.timeWidgetsFreeBusyAjaxRequest = null; - } +function onEditorCancelClick(event) { + event.preventDefault(); + window.close(); +} + +function synchronizeWithParent(srcWidgetName, dstWidgetName) { + var srcDate = parent$(srcWidgetName + "_date"); + var dstDate = $(dstWidgetName + "_date"); + dstDate.value = srcDate.value; + + var srcHour = parent$(srcWidgetName + "_time_hour"); + var dstHour = $(dstWidgetName + "_time_hour"); + dstHour.value = srcHour.value; + + var srcMinute = parent$(srcWidgetName + "_time_minute"); + var dstMinute = $(dstWidgetName + "_time_minute"); + dstMinute.value = srcMinute.value; +} + +function initializeTimeWidgets() { + synchronizeWithParent("startTime", "startTime"); + synchronizeWithParent("endTime", "endTime"); + + $("startTime_date").addEventListener("change", onTimeDateWidgetChange, false); + $("startTime_time_hour").addEventListener("change", onTimeWidgetChange, false); + $("startTime_time_minute").addEventListener("change", onTimeWidgetChange, + false); + + $("endTime_date").addEventListener("change", onTimeDateWidgetChange, false); + $("endTime_time_hour").addEventListener("change", onTimeWidgetChange, false); + $("endTime_time_minute").addEventListener("change", onTimeWidgetChange, false); } function onTimeWidgetChange() { - setTimeout("redisplayFreeBusyZone();", 1000); + redisplayFreeBusyZone(); +} + +function onTimeDateWidgetChange(event) { + var table = $("freeBusy"); + + var rows = table.tHead.rows; + for (var i = 0; i < rows.length; i++) { + for (var j = rows[i].cells.length - 1; j > 0; j--) { + rows[i].deleteCell(j); + } + } + + rows = table.tBodies[0].rows; + for (var i = 0; i < rows.length; i++) { + for (var j = rows[i].cells.length - 1; j > 0; j--) { + rows[i].deleteCell(j); + } + } + + prepareTableHeaders(); + prepareTableRows(); + redisplayFreeBusyZone(); + resetAttendeesValue(); + resetAllFreeBusys(); +} + +function prepareTableHeaders() { + var startTimeDate = $("startTime_date"); + var startDate = startTimeDate.valueAsDate(); + + var endTimeDate = $("endTime_date"); + var endDate = endTimeDate.valueAsDate(); + endDate.setTime(endDate.getTime() + (additionalDays * 86400000)); + + var rows = $("freeBusy").tHead.rows; + var days = startDate.daysUpTo(endDate); + for (var i = 0; i < days.length; i++) { + var header1 = document.createElement("th"); + header1.colSpan = (dayEndHour - dayStartHour) + 1; + header1.appendChild(document.createTextNode(days[i].toLocaleDateString())); + rows[0].appendChild(header1); + for (var hour = dayStartHour; hour < (dayEndHour + 1); hour++) { + var header2 = document.createElement("th"); + var text = hour + ":00"; + if (hour < 10) + text = "0" + text; + header2.appendChild(document.createTextNode(text)); + rows[1].appendChild(header2); + + var header3 = document.createElement("th"); + for (var span = 0; span < 4; span++) { + var spanElement = document.createElement("span"); + spanElement.addClassName("freeBusyZoneElement"); + header3.appendChild(spanElement); + } + rows[2].appendChild(header3); + } + } +} + +function prepareTableRows() { + var startTimeDate = $("startTime_date"); + var startDate = startTimeDate.valueAsDate(); + + var endTimeDate = $("endTime_date"); + var endDate = endTimeDate.valueAsDate(); + endDate.setTime(endDate.getTime() + (additionalDays * 86400000)); + + var rows = $("freeBusy").tBodies[0].rows; + var days = startDate.daysUpTo(endDate); + for (var i = 0; i < days.length; i++) { + for (var rowNbr = 0; rowNbr < rows.length; rowNbr++) { + for (var hour = dayStartHour; hour < (dayEndHour + 1); hour++) { + var cell = document.createElement("td"); + rows[rowNbr].appendChild(cell); + } + } + } +} + +function prepareAttendees() { + var value = parent$("attendeesNames").value; + if (value.length > 0) { + attendeesNames = parent$("attendeesNames").value.split(","); + attendeesEmails = parent$("attendeesEmails").value.split(","); + + var body = $("freeBusy").tBodies[0]; + for (var i = 0; i < attendeesNames.length; i++) { + var tr = body.insertRow(i); + var td = document.createElement("td"); + td.addClassName("attendees"); + var input = document.createElement("input"); + var value = ""; + if (attendeesNames[i].length > 0) + value += attendeesNames[i] + " "; + value += "<" + attendeesEmails[i] + ">"; + input.value = value; + input.setAttribute("uid", attendeesNames[i]); + input.addClassName("textField"); + input.setAttribute("modified", "0"); + tr.appendChild(td) + td.appendChild(input) + } + } + else { + attendeesNames = new Array(); + attendeesEmails = new Array(); + } } function onFreeBusyLoadHandler() { - initializeFreeBusyUserSelector(); + initializeWindowButtons(); + initializeTimeWidgets(); + prepareAttendees(); + prepareTableHeaders(); + prepareTableRows(); + redisplayFreeBusyZone(); + resetAttendeesValue(); + resetAllFreeBusys(); } window.addEventListener("load", onFreeBusyLoadHandler, false); diff --git a/UI/WebServerResources/UIxTaskEditor.css b/UI/WebServerResources/UIxTaskEditor.css index 5771ec399..4b0ddea5c 100644 --- a/UI/WebServerResources/UIxTaskEditor.css +++ b/UI/WebServerResources/UIxTaskEditor.css @@ -5,13 +5,7 @@ DIV.appointmentLabel text-align: right; width: 3em; } -DIV#editorTabs -{ - width: 100%; - height: 38em; -} - -DIV#editorTabs > DIV.tab +DIV#eventView { overflow: hidden; padding: .5em; } @@ -19,35 +13,15 @@ DIV.appointmentRightLabel { display: inline; vertical-align: middle; } -UL.contactList -{ - display: block; - cursor: default; - list-style-type: none; - list-style-image: none; - margin: 0px; - padding: 0px; - background: #fff; - border: 1px solid #000; - width: 15em; - height: 5em; - overflow: auto; -} +#privacy-menu LI +{ list-style-position: inside; + list-style-image: url("menu-nocheck.gif"); } -UL.contactList LI IMG -{ vertical-align: middle; } +#privacy-menu LI._chosen +{ list-style-image: url("menu-check.gif"); } -UL.contactList LI -{ width: 100%; - white-space: nowrap; - vertical-align: middle; } - -UL.contactList LI._selected -{ background: #4b6983; - color: #fff; } - -DIV.contactSelector -{ margin: 0px; } +#privacy-menu LI._chosen:hover +{ list-style-image: url("menu-check-hover.gif"); } LABEL, SPAN.checkBoxList { display: block; @@ -58,7 +32,7 @@ LABEL, SPAN.checkBoxList width: 100%; } LABEL#commentArea -{ height: 11.5em; } +{ height: 15em; } SPAN.checkBoxList#participantsCB { height: 7em; } @@ -75,17 +49,20 @@ SPAN.checkBoxList SPAN.content LABEL SPAN.content { position: absolute; top: -.25em; - left: 8em; + left: 7em; right: 1em; } TEXTAREA { position: absolute; top: 0px; - left: 8em; + left: 7em; vertical-align: bottom; - height: 10em; + bottom: 1em; right: 1em; - padding-bottom: 1em; } + padding-bottom: 0em; } + +A#changeUrlButton +{ margin-left: 1em; } A#detailsButton { position: absolute; @@ -109,7 +86,7 @@ SPAN#categoriesCB INPUT { border: 2px solid #000; vertical-align: middle; -moz-border-top-colors: #000 #fff; - -moz-border-left-colors: #000 #fff; + -moz-border-left-colors: #000 #fff; -moz-border-bottom-colors: #000 #fff; -moz-border-right-colors: #000 #fff; } @@ -117,6 +94,9 @@ SPAN#categoriesCB LABEL { margin-left: 0px; margin-right: 1em; } +SPAN#allDay > INPUT +{ position: static; } + SPAN.content > INPUT { position: absolute; top: 0px; @@ -125,5 +105,12 @@ SPAN.content > INPUT INPUT#startDateCB, INPUT#dueDateCB, +INPUT#statusPercent, LABEL#urlArea INPUT { position: static; } + +INPUT#statusPercent +{ width: 2em; } + +INPUT#statusTime_date +{ width: 5em; } diff --git a/UI/WebServerResources/UIxTaskEditor.js b/UI/WebServerResources/UIxTaskEditor.js index ff5846d5b..2330307f4 100644 --- a/UI/WebServerResources/UIxTaskEditor.js +++ b/UI/WebServerResources/UIxTaskEditor.js @@ -1,26 +1,7 @@ -/* - Copyright (C) 2005 SKYRIX Software AG - - This file is part of SOGo. - - OGo is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - OGo is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with OGo; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. -*/ - var contactSelectorAction = 'calendars-contacts'; +window.addEventListener("load", onTaskEditorLoad, false); + function uixEarlierDate(date1, date2) { // can this be done in a sane way? // cuicui = 'year'; @@ -273,3 +254,44 @@ this.initTimeWidgets = function (widgets) { widgets['start']['hour'].addEventListener("change", this.onAdjustDueTime, false); widgets['start']['minute'].addEventListener("change", this.onAdjustDueTime, false); } + +function onStatusListChange(event) { + var value = $("statusList").value; + var statusTimeDate = $("statusTime_date"); + var statusPercent = $("statusPercent"); + + if (value == "WONoSelectionString") { + statusTimeDate.disabled = true; + statusPercent.disabled = true; + statusPercent.value = ""; + } + else if (value == "0") { + statusTimeDate.disabled = true; + statusPercent.disabled = false; + } + else if (value == "1") { + statusTimeDate.disabled = true; + statusPercent.disabled = false; + } + else if (value == "2") { + statusTimeDate.disabled = false; + statusPercent.disabled = false; + statusPercent.value = "100"; + } + else if (value == "3") { + statusTimeDate.disabled = true; + statusPercent.disabled = true; + } + else { + statusTimeDate.disabled = true; + } +} + +function initializeStatusLine() { + var statusList = $("statusList"); + statusList.addEventListener("mouseup", onStatusListChange, false); +} + +function onTaskEditorLoad() { + initializeStatusLine(); +} diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js index a4586b9d3..35ef61c05 100644 --- a/UI/WebServerResources/generic.js +++ b/UI/WebServerResources/generic.js @@ -128,11 +128,13 @@ function extractEmailAddress(mailTo) { function extractEmailName(mailTo) { var emailName = ""; - var emailNamere = /(\w[\w\ _-]+)\ (<|<)/; + var emailNamere = /(.+)\