Monotone-Parent: 1a3634c32194a58102b74c15f2af08066e7d4e91
Monotone-Revision: 2b073c86000b676cc91d3818d5d6c6db3446f2e2 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-05-17T19:19:45 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
1de98394d4
commit
4c399caaa7
|
@ -8,7 +8,7 @@
|
|||
(availabilitySession): new class, used by the above, for
|
||||
triggering availability searchs in the available freebusys.
|
||||
Listeners should implement the "onRequestComplete" method.
|
||||
(freeBusyRequest): new class design to asynchronosly fetch a user
|
||||
(freeBusyRequest): new class designed to asynchronosly fetch a user
|
||||
freebusy between specific dates. Makes use of an internal cache
|
||||
and may trigger ajax requests covering more that the specified
|
||||
range in order to take advantage of that cache. Listeners should
|
||||
|
@ -18,6 +18,7 @@
|
|||
(initializeTimeSlotWidgets): new method that initializes the new
|
||||
widgets that controls the time range behaviour in the freebusy
|
||||
searches.
|
||||
(editorConflictHander): new class that handles time conflicts.
|
||||
|
||||
* UI/Scheduler/UIxCalListingActions.m (-findPossibleSlotAction):
|
||||
removed action method and submethods since the slot resolution is
|
||||
|
|
|
@ -488,6 +488,9 @@ validate_endbeforestart = "A data que você informou ocorre antes da data ini
|
|||
"During specified hours" = "During specified hours";
|
||||
"and" = "and";
|
||||
|
||||
"A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?"
|
||||
= "A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?";
|
||||
|
||||
/* apt list */
|
||||
"Title" = "Título";
|
||||
"Start" = "Início";
|
||||
|
|
|
@ -488,6 +488,9 @@ validate_endbeforestart = "Zadané datum konce je před začátkem události.
|
|||
"During specified hours" = "During specified hours";
|
||||
"and" = "and";
|
||||
|
||||
"A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?"
|
||||
= "A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?";
|
||||
|
||||
/* apt list */
|
||||
"Title" = "Název";
|
||||
"Start" = "Začátek";
|
||||
|
|
|
@ -487,6 +487,9 @@ validate_endbeforestart = "Het begin vindt plaats vóór het einde.";
|
|||
"During specified hours" = "Tijdens gespecificeerde uren";
|
||||
"and" = "en";
|
||||
|
||||
"A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?"
|
||||
= "A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?";
|
||||
|
||||
/* apt list */
|
||||
"Title" = "Titel";
|
||||
"Start" = "Begin";
|
||||
|
|
|
@ -488,6 +488,9 @@ validate_endbeforestart = "The end date that you entered occurs before the st
|
|||
"During specified hours" = "During specified hours";
|
||||
"and" = "and";
|
||||
|
||||
"A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?"
|
||||
= "A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?";
|
||||
|
||||
/* apt list */
|
||||
"Title" = "Title";
|
||||
"Start" = "Start";
|
||||
|
|
|
@ -488,6 +488,9 @@ validate_endbeforestart = "La date de fin est avant la date de début.";
|
|||
"During specified hours" = "Pendant les heures spécifiées";
|
||||
"and" = "et";
|
||||
|
||||
"A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?"
|
||||
= "Il y a un conflit avec l'horaire d'un ou plusieurs participants.\nVoulez-vous conserver les paramètres actuel malgré tout?";
|
||||
|
||||
/* apt list */
|
||||
"Title" = "Titre";
|
||||
"Start" = "Début";
|
||||
|
|
|
@ -488,6 +488,9 @@ validate_endbeforestart = "Ihr Beginn ist nach dem Ende";
|
|||
"During specified hours" = "During specified hours";
|
||||
"and" = "and";
|
||||
|
||||
"A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?"
|
||||
= "A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?";
|
||||
|
||||
/* apt list */
|
||||
"Title" = "Titel";
|
||||
"Start" = "Beginn";
|
||||
|
|
|
@ -488,6 +488,9 @@ validate_endbeforestart = "A megadott befejező dátum korábbi, mint a kezd
|
|||
"During specified hours" = "During specified hours";
|
||||
"and" = "and";
|
||||
|
||||
"A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?"
|
||||
= "A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?";
|
||||
|
||||
/* apt list */
|
||||
"Title" = "Cím";
|
||||
"Start" = "Kezdés";
|
||||
|
|
|
@ -488,6 +488,9 @@ validate_endbeforestart = "La data finale specificata è precedente alla data
|
|||
"During specified hours" = "During specified hours";
|
||||
"and" = "and";
|
||||
|
||||
"A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?"
|
||||
= "A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?";
|
||||
|
||||
/* apt list */
|
||||
"Title" = "Titolo";
|
||||
"Start" = "Inizio";
|
||||
|
|
|
@ -488,6 +488,9 @@ validate_endbeforestart = "The end date that you entered occurs before the st
|
|||
"During specified hours" = "During specified hours";
|
||||
"and" = "and";
|
||||
|
||||
"A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?"
|
||||
= "A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?";
|
||||
|
||||
/* apt list */
|
||||
"Title" = "Title";
|
||||
"Start" = "Start";
|
||||
|
|
|
@ -488,6 +488,9 @@ validate_endbeforestart = "Su fecha/hora de comienzo es posterio a la de fina
|
|||
"During specified hours" = "During specified hours";
|
||||
"and" = "and";
|
||||
|
||||
"A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?"
|
||||
= "A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?";
|
||||
|
||||
/* apt list */
|
||||
"Title" = "Título";
|
||||
"Start" = "Inicio";
|
||||
|
|
|
@ -488,6 +488,9 @@ validate_endbeforestart = "Angivet slutdatumet inträffar före angivet start
|
|||
"During specified hours" = "During specified hours";
|
||||
"and" = "and";
|
||||
|
||||
"A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?"
|
||||
= "A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?";
|
||||
|
||||
/* apt list */
|
||||
"Title" = "Titel";
|
||||
"Start" = "Start";
|
||||
|
|
|
@ -488,6 +488,9 @@ validate_endbeforestart = "Mae'r dyddiad gorffen sydd wedi'i roi yn digwydd c
|
|||
"During specified hours" = "During specified hours";
|
||||
"and" = "and";
|
||||
|
||||
"A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?"
|
||||
= "A time conflict exists with one or more attendees.\nWould you like to keep the current settings anyway?";
|
||||
|
||||
/* apt list */
|
||||
"Title" = "Teitl";
|
||||
"Start" = "Dechrau";
|
||||
|
|
|
@ -591,7 +591,6 @@ availabilitySession.prototype = {
|
|||
},
|
||||
|
||||
_step: function aS__step() {
|
||||
// log("currentStart: " + this.mCurrentStart);
|
||||
this.mCurrentEntries = null;
|
||||
var max = this.mUids.length;
|
||||
if (max > 0) {
|
||||
|
@ -626,7 +625,6 @@ availabilitySession.prototype = {
|
|||
this.mActiveRequests--;
|
||||
this._mergeEntries(entries);
|
||||
if (this.mActiveRequests == 0) {
|
||||
// log("requests done");
|
||||
var foundDate = this._findDate();
|
||||
if (foundDate) {
|
||||
var foundEndDate = foundDate.clone();
|
||||
|
@ -644,7 +642,6 @@ availabilitySession.prototype = {
|
|||
if (this.mWorkDaysOnly) {
|
||||
this._adjustCurrentStart();
|
||||
}
|
||||
// log("found no date, new start: " + this.mCurrentStart);
|
||||
this._step();
|
||||
}
|
||||
}
|
||||
|
@ -877,7 +874,7 @@ _freeBusyCacheEntry.prototype = {
|
|||
if (adjustedSd.getTime() < this.startDate.getTime()) {
|
||||
var start = adjustedSd.clone();
|
||||
start.addDays(-7);
|
||||
var end = start.clone();
|
||||
var end = this.startDate.beginOfDay();
|
||||
end.addDays(-1);
|
||||
fetchDates.push({ start: start, end: end });
|
||||
}
|
||||
|
@ -997,6 +994,66 @@ freeBusyRequest.prototype = {
|
|||
}
|
||||
};
|
||||
|
||||
function editorConflictHandler(uids, startDate, endDate, listener) {
|
||||
this.mUids = uids;
|
||||
this.mRemaining = uids.length;
|
||||
this.mCurrentUid = 0;
|
||||
|
||||
this.mStartDate = startDate;
|
||||
this.mEndDate = endDate;
|
||||
|
||||
this.mListener = listener;
|
||||
}
|
||||
|
||||
editorConflictHandler.prototype = {
|
||||
mUids: null,
|
||||
mCurrentUid: 0,
|
||||
|
||||
mStartDate: null,
|
||||
mEndDate: null,
|
||||
|
||||
mQuOffset: 0,
|
||||
mQuOffsetMax: 0,
|
||||
|
||||
mCurrentEntries: null,
|
||||
|
||||
mListener: null,
|
||||
|
||||
start: function eCH_start() {
|
||||
this.mQuOffset = (this.mStartDate.getHours() * 4
|
||||
+ Math.floor(this.mStartDate.getMinutes() / 15));
|
||||
this.mQuOffsetMax = (this.mEndDate.deltaDays(this.mStartDate) * 96
|
||||
+ this.mEndDate.getHours() * 4
|
||||
+ Math.ceil(this.mEndDate.getMinutes() / 15));
|
||||
this._step();
|
||||
},
|
||||
|
||||
_step: function eCH__step() {
|
||||
if (this.mCurrentUid < this.mUids.length) {
|
||||
var fbRequest = new freeBusyRequest(this.mStartDate,
|
||||
this.mEndDate,
|
||||
this.mUids[this.mCurrentUid],
|
||||
this);
|
||||
fbRequest.start();
|
||||
}
|
||||
else {
|
||||
this.mListener.onRequestComplete(this, true);
|
||||
}
|
||||
},
|
||||
|
||||
onRequestComplete: function eCH_onRequestComplete(fbRequest, success,
|
||||
entries) {
|
||||
var periodEntries = entries.slice(this.mQuOffset, this.mQuOffsetMax);
|
||||
if (periodEntries.indexOf("1") > -1) {
|
||||
this.mListener.onRequestComplete(this, false);
|
||||
}
|
||||
else {
|
||||
this.mCurrentUid++;
|
||||
this._step();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function displayFreeBusyForNode(input) {
|
||||
var rowIndex = input.parentNode.parentNode.sectionRowIndex;
|
||||
var row = $("freeBusyData").tBodies[0].rows[rowIndex];
|
||||
|
@ -1213,10 +1270,41 @@ function updateSlotDisplayCallback(http) {
|
|||
function onEditorOkClick(event) {
|
||||
preventDefault(event);
|
||||
|
||||
var uids = [];
|
||||
var inputs = $("freeBusy").getElementsByTagName("input");
|
||||
for (var i = 0; i < inputs.length - 1; i++) {
|
||||
var input = inputs[i];
|
||||
if (input.uid) {
|
||||
uids.push(input.uid);
|
||||
}
|
||||
}
|
||||
|
||||
var startDate = $("startTime_date").valueAsDate();
|
||||
startDate.setHours(parseInt($("startTime_time_hour").value));
|
||||
startDate.setMinutes(parseInt($("startTime_time_minute").value));
|
||||
var endDate = $("endTime_date").valueAsDate();
|
||||
endDate.setHours(parseInt($("endTime_time_hour").value));
|
||||
endDate.setMinutes(parseInt($("endTime_time_minute").value));
|
||||
|
||||
var listener = {
|
||||
onRequestComplete: function eCH_l_onRequestComplete(handlers, code) {
|
||||
var label = ("A time conflict exists with one or more attendees.\n"
|
||||
+ "Would you like to keep the current settings anyway?");
|
||||
if (code || window.confirm(getLabel(label))) {
|
||||
_confirmEditorOkClick();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var conflictHandler = new editorConflictHandler(uids, startDate,
|
||||
endDate, listener);
|
||||
conflictHandler.start();
|
||||
}
|
||||
|
||||
function _confirmEditorOkClick() {
|
||||
var attendees = window.opener.attendees;
|
||||
var newAttendees = new Hash();
|
||||
var table = $("freeBusy");
|
||||
var inputs = table.getElementsByTagName("input");
|
||||
var inputs = $("freeBusy").getElementsByTagName("input");
|
||||
for (var i = 0; i < inputs.length - 1; i++) {
|
||||
var row = $(inputs[i]).up("tr");
|
||||
var name = extractEmailName(inputs[i].value);
|
||||
|
@ -1294,16 +1382,14 @@ function onTimeWidgetChange() {
|
|||
}
|
||||
|
||||
function onTimeDateWidgetChange() {
|
||||
var table = $("freeBusyHeader");
|
||||
var rows = table.select("tr");
|
||||
var rows = $("freeBusyHeader").select("tr");
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
for (var j = rows[i].cells.length - 1; j > -1; j--) {
|
||||
rows[i].deleteCell(j);
|
||||
}
|
||||
}
|
||||
|
||||
table = $("freeBusyData");
|
||||
rows = table.select("tr");
|
||||
rows = $("freeBusyData").select("tr");
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
for (var j = rows[i].cells.length - 1; j > -1; j--) {
|
||||
rows[i].deleteCell(j);
|
||||
|
|
Loading…
Reference in New Issue