mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-02 13:46:23 +00:00
Monotone-Parent: f7911e1f3d0c926e6815a5dff6b0912b4fad036d
Monotone-Revision: 49976b1102a1a35107c285adb4e08d81c27bd01d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-06-08T21:32:31 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
2010-06-08 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/UIxAttendeesEditor.js
|
||||
(initializeAttendeeRole): new function that initialize an input's
|
||||
row appearance based in the associated uid.
|
||||
|
||||
* UI/WebServerResources/SchedulerUI.js:
|
||||
(onCalendarsMenuPrepareVisibility): the "export" menu option is
|
||||
now disabled for non-owner users, since the function itself will
|
||||
|
||||
@@ -272,25 +272,11 @@ function performSearchCallback(http) {
|
||||
else {
|
||||
if (document.currentPopupMenu)
|
||||
hideMenu(document.currentPopupMenu);
|
||||
|
||||
|
||||
if (data.contacts.length == 1) {
|
||||
// Single result
|
||||
var contact = data.contacts[0];
|
||||
input.uid = contact["c_uid"];
|
||||
var row = $(input.parentNode.parentNode);
|
||||
if (input.uid == OwnerLogin) {
|
||||
row.removeAttribute("role");
|
||||
row.setAttribute("partstat", "accepted");
|
||||
row.addClassName("organizer-row");
|
||||
row.removeClassName("attendee-row");
|
||||
row.isOrganizer = true;
|
||||
} else {
|
||||
row.removeAttribute("partstat");
|
||||
row.setAttribute("role", "req-participant");
|
||||
row.addClassName("attendee-row");
|
||||
row.removeClassName("organizer-row");
|
||||
row.isOrganizer = false;
|
||||
}
|
||||
var isList = (contact["c_component"] &&
|
||||
contact["c_component"] == "vlist");
|
||||
if (isList) {
|
||||
@@ -326,6 +312,7 @@ function performSearchCallback(http) {
|
||||
checkAttendee(input);
|
||||
}
|
||||
}
|
||||
initializeAttendeeRole(input);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -334,6 +321,25 @@ function performSearchCallback(http) {
|
||||
}
|
||||
}
|
||||
|
||||
function initializeAttendeeRole(input) {
|
||||
var row = $(input.parentNode.parentNode);
|
||||
if (input.uid && input.uid == OwnerLogin) {
|
||||
row.removeAttribute("role");
|
||||
row.removeClassName("attendee-row");
|
||||
row.setAttribute("partstat", "accepted");
|
||||
row.addClassName("organizer-row");
|
||||
row.isOrganizer = true;
|
||||
} else {
|
||||
row.removeAttribute("partstat");
|
||||
row.removeClassName("organizer-row");
|
||||
if (input.value.length > 0) {
|
||||
row.setAttribute("role", "req-participant");
|
||||
row.addClassName("attendee-row");
|
||||
}
|
||||
row.isOrganizer = false;
|
||||
}
|
||||
}
|
||||
|
||||
function onAttendeeResultClick(event) {
|
||||
var input = this.parentNode.input;
|
||||
input.uid = this.uid;
|
||||
@@ -341,7 +347,9 @@ function onAttendeeResultClick(event) {
|
||||
input.container = this.container;
|
||||
input.isList = this.isList;
|
||||
input.confirmedValue = input.value = this.address;
|
||||
initializeAttendeeRole(input);
|
||||
checkAttendee(input);
|
||||
|
||||
this.parentNode.input = null;
|
||||
}
|
||||
|
||||
@@ -497,7 +505,7 @@ function checkAttendee(input) {
|
||||
var dataRow = dataTable.rows[row.sectionRowIndex];
|
||||
tbody.removeChild(row);
|
||||
dataTable.removeChild(dataRow);
|
||||
}
|
||||
}
|
||||
else if (input.modified) {
|
||||
if (!row.hasClassName("needs-action")) {
|
||||
row.addClassName("needs-action");
|
||||
@@ -532,6 +540,7 @@ function onInputBlur(event) {
|
||||
if (this.isList) {
|
||||
resolveListAttendees(this, false);
|
||||
} else {
|
||||
initializeAttendeeRole(this);
|
||||
checkAttendee(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user