Improve deleting occurences of recurrent events

pull/17/head
Francis Lachapelle 2014-02-04 16:25:52 -05:00
parent 4e42d5d410
commit ef1be5dc5f
25 changed files with 173 additions and 91 deletions

2
NEWS
View File

@ -24,6 +24,8 @@ Enhancements
- warn user when overbooking a resource by creating an event in its calendar (#2541)
- converted JavaScript alerts to inline CSS dialogs in appointment editor
- visually identify users with no freebusy information in autocompletion widget of attendees editor (#2565)
- respect occurences of recurrent events when deleting selected events (#1950)
- improved confirmation dialog box when deleting events and tasks
Bug fixes
- don't load 'background' attribute (#2437)

View File

@ -788,16 +788,22 @@ static NSArray *childRecordFields = nil;
- (void) deleteEntriesWithIds: (NSArray *) ids
{
unsigned int count, max;
NSString *currentID;
NSEnumerator *names;
NSString *currentID, *currentName;
SOGoContentObject *deleteObject;
max = [ids count];
for (count = 0; count < max; count++)
{
currentID = [ids objectAtIndex: count];
deleteObject = [self lookupName: currentID
names = [[currentID componentsSeparatedByString: @"/"] objectEnumerator];
deleteObject = self;
while ((currentName = [names nextObject]))
{
deleteObject = [deleteObject lookupName: currentName
inContext: context
acquire: NO];
}
if (![deleteObject isKindOfClass: [NSException class]])
{
if ([deleteObject respondsToSelector: @selector (prepareDelete)])

View File

@ -215,7 +215,7 @@
NSArray *ids;
idsParam = [[context request] formValueForKey: @"ids"];
ids = [idsParam componentsSeparatedByString: @"/"];
ids = [idsParam componentsSeparatedByString: @","];
if ([ids count])
{
clientObject = [self clientObject];

View File

@ -411,8 +411,9 @@ validate_endbeforestart = "تاريخ الانتهاء الذي أدخلته
"Workweek days only" = "ايام العمل الأسبوعية فقط";
"Tasks in View" = "المهمات في العرض";
"eventDeleteConfirmation" = "الحدث (الأحداث) الآتية ستُمحى: \n%{0}\nهل تريد المتابعة؟";
"taskDeleteConfirmation" = "المهمة (المهام) التالية ستمحى: \n %{0}\n هل تريد المتابعة؟";
"eventDeleteConfirmation" = "الحدث (الأحداث) الآتية ستُمحى:";
"taskDeleteConfirmation" = "المهمة (المهام) التالية ستمحى:";
"Would you like to continue?" = " هل تريد المتابعة؟";
"You cannot remove nor unsubscribe from your personal calendar."
= "لا يمكنك حذف أو إلغاء اشتراكك من تقويمك الشخصي.";

View File

@ -416,8 +416,9 @@ validate_endbeforestart = "A data que você informou ocorre antes da data ini
"Workweek days only" = "Somente semanas úteis";
"Tasks in View" = "Tarefas na vista";
"eventDeleteConfirmation" = "O(s) seguinte(s) evento(s) será(ão) apagado(s): \n%{0}\nGostaria de continuar?";
"taskDeleteConfirmation" = "Apagar permanentemente esta tarefa.\nVocê gostaria de continuar?";
"eventDeleteConfirmation" = "O(s) seguinte(s) evento(s) será(ão) apagado(s):";
"taskDeleteConfirmation" = "Apagar permanentemente esta tarefa.";
"Would you like to continue?" = "Gostaria de continuar?";
"You cannot remove nor unsubscribe from your personal calendar."
= "Você não pode remover nem retirar-se do seu calendário pessoal.";

View File

@ -411,8 +411,9 @@ validate_endbeforestart = "La data/hora de començament és posterior a la d'
"Workweek days only" = "Només dies laborables";
"Tasks in View" = "Mostrar tasques";
"eventDeleteConfirmation" = "El següent esdeveniment (s) s'esborrarà: \n%{0}\nVoleu continuar?";
"taskDeleteConfirmation" = "Aquesta tasca s'esborrarà definitivament. Voleu continuar?";
"eventDeleteConfirmation" = "El següent esdeveniment (s) s'esborrarà:";
"taskDeleteConfirmation" = "Aquesta tasca s'esborrarà definitivament.";
"Would you like to continue?" = "Voleu continuar?";
"You cannot remove nor unsubscribe from your personal calendar."
= "No podeu cancel·lar la subscripció al calendari personal o esborrar-lo.";

View File

@ -416,8 +416,9 @@ validate_endbeforestart = "Zadané datum konce je před začátkem události.
"Workweek days only" = "Pouze pracovní dny";
"Tasks in View" = "Zobrazené úkoly";
"eventDeleteConfirmation" = "Tato událost(i) bude smazána:\n%{0}\nChcete pokračovat?";
"taskDeleteConfirmation" = "Smazání tohoto úkolu je permanentní.\nChcete pokračovat?";
"eventDeleteConfirmation" = "Tato událost(i) bude smazána:";
"taskDeleteConfirmation" = "Smazání tohoto úkolu je permanentní.";
"Would you like to continue?" = "Chcete pokračovat?";
"You cannot remove nor unsubscribe from your personal calendar."
= "Nemůžete odebrat nebo se odhlásit z odebírání svého vlastního kalendáře.";

View File

@ -411,8 +411,9 @@ validate_endbeforestart = "Indtastet slutdato ligger før startdato.";
"Workweek days only" = "Arbejdsuge dage kun";
"Tasks in View" = "Opgaver i visning";
"eventDeleteConfirmation" = "Følgende begivenhed er/bliver slettet: \n%{0}\nFortsæt?";
"taskDeleteConfirmation" = "Følgende opgave(r) bliver slettet: \n%{0}\nFortsæt?";
"eventDeleteConfirmation" = "Følgende begivenhed er/bliver slettet:";
"taskDeleteConfirmation" = "Følgende opgave(r) bliver slettet:";
"Would you like to continue?" = "Fortsæt?";
"You cannot remove nor unsubscribe from your personal calendar."
= "Du kan ikke fjerne eller afmelde din personlige kalender.";

View File

@ -416,8 +416,9 @@ validate_endbeforestart = "The end date that you entered occurs before the st
"Workweek days only" = "Workweek days only";
"Tasks in View" = "Tasks in View";
"eventDeleteConfirmation" = "The following event(s) will be erased: \n%{0}\nWould you like to continue?";
"taskDeleteConfirmation" = "The following task(s) will be erased: \n%{0}\nWould you like to continue?";
"eventDeleteConfirmation" = "The following event(s) will be erased:";
"taskDeleteConfirmation" = "The following task(s) will be erased:";
"Would you like to continue?" = "Would you like to continue?";
"You cannot remove nor unsubscribe from your personal calendar."
= "You cannot remove nor unsubscribe from your personal calendar.";

View File

@ -416,8 +416,9 @@ validate_endbeforestart = "La date de fin est avant la date de début.";
"Workweek days only" = "Semaine de travail seulement";
"Tasks in View" = "Afficher les tâches";
"eventDeleteConfirmation" = "Le ou les événements suivants seront supprimés :\n%{0}\nVoulez-vous continuer?";
"taskDeleteConfirmation" = "Le ou les tâches suivantes seront supprimées :\n%{0}\nVoulez-vous continuer?";
"eventDeleteConfirmation" = "Le ou les événements suivants seront supprimés :";
"taskDeleteConfirmation" = "Le ou les tâches suivantes seront supprimées :";
"Would you like to continue?" = "Voulez-vous continuer?";
"You cannot remove nor unsubscribe from your personal calendar."
= "Vous ne pouvez pas supprimer ni vous désabonner de votre agenda personnel.";

View File

@ -416,8 +416,9 @@ validate_endbeforestart = "Ihr Ende ist vor dem Beginndatum.";
"Workweek days only" = "nur Arbeitstage";
"Tasks in View" = "Aufgaben anzeigen";
"eventDeleteConfirmation" = "Diese Termine werden gelöscht: \n%{0}\nFortfahren?";
"taskDeleteConfirmation" = "Diese Aufgaben werden gelöscht: \n%{0}\nFortfahren?";
"eventDeleteConfirmation" = "Diese Termine werden gelöscht:";
"taskDeleteConfirmation" = "Diese Aufgaben werden gelöscht:";
"Would you like to continue?" = "Fortfahren?";
"You cannot remove nor unsubscribe from your personal calendar."
= "Der persönliche Kalender kann weder gelöscht noch abbestellt werden.";

View File

@ -416,8 +416,9 @@ validate_endbeforestart = "A megadott befejező dátum korábbi, mint a kezd
"Workweek days only" = "Csak hétköznapok";
"Tasks in View" = "Feladatok megjelenítése";
"eventDeleteConfirmation" = "Az alábbi esemény(eke)t törli: \n%{0}\nFolytatja?";
"taskDeleteConfirmation" = "A feladat törlése végleges.\nFolytatja?";
"eventDeleteConfirmation" = "Az alábbi esemény(eke)t törli:";
"taskDeleteConfirmation" = "A feladat törlése végleges.";
"Would you like to continue?" = "Folytatja?";
"You cannot remove nor unsubscribe from your personal calendar."
= "Nem törölhet, valamint nem iratkozhat le egy személyes naptárról.";

View File

@ -409,8 +409,9 @@ validate_endbeforestart = "Lokadagurinn sem er tilgreindur, er fyrr en byrjun
"Workweek days only" = "Aðeins vinnudagar";
"Tasks in View" = "Sýnd verkefni";
"eventDeleteConfirmation" = "Eftirfarandi viðburði/viðburðum verður eytt: \n%{0}\nViltu halda áfram?";
"taskDeleteConfirmation" = "Eftirfarandi verkefni/verkefnum verður eytt: \n%{0}\nViltu halda áfram?";
"eventDeleteConfirmation" = "Eftirfarandi viðburði/viðburðum verður eytt:";
"taskDeleteConfirmation" = "Eftirfarandi verkefni/verkefnum verður eytt:";
"Would you like to continue?" = "Viltu halda áfram?";
"You cannot remove nor unsubscribe from your personal calendar."
= "Ekki er hægt að fjarlægja eða segja upp áskrift að sínu eigin persónulega dagatali.";

View File

@ -410,8 +410,9 @@ validate_endbeforestart = "La data finale specificata è precedente alla data
"Workweek days only" = "Solo giorni lavorativi";
"Tasks in View" = "Attività in elenco";
"eventDeleteConfirmation" = "Il seguente evento(i) sarà cancellato: \n%{0}\nVuoi continuare?";
"taskDeleteConfirmation" = "Stai per cancellare in maniera permanente il l'attività.\nVuoi procedere?";
"eventDeleteConfirmation" = "Il seguente evento(i) sarà cancellato:";
"taskDeleteConfirmation" = "Stai per cancellare in maniera permanente il l'attività.";
"Would you like to continue?" = "Vuoi procedere?";
"You cannot remove nor unsubscribe from your personal calendar."
= "Non puoi rimuovere la sottoscrizione del tuo calendario personale.";

View File

@ -416,8 +416,9 @@ validate_endbeforestart = "Дата начала позже даты конц
"Workweek days only" = "Только рабочие дни недели";
"Tasks in View" = "Задания в виде";
"eventDeleteConfirmation" = "Следующие события будут удалены: \n%{0}\nПродолжить удаление?";
"taskDeleteConfirmation" = "Событие будет удалено безвозвратно.\nПродолжить?";
"eventDeleteConfirmation" = "Следующие события будут удалены:";
"taskDeleteConfirmation" = "Событие будет удалено безвозвратно.";
"Would you like to continue?" = "Продолжить?";
"You cannot remove nor unsubscribe from your personal calendar."
= "Вы не можете удалить персональный календарь, равно как и выключить подписку на него.";

View File

@ -373,6 +373,9 @@
"Show Time as Free" = "Čas zobraziť ako voľný";
/* email notifications */
"Send Appointment Notifications" = "Odoslať notifikáciu o stretnutí";
/* validation errors */
validate_notitle = "Názov nebol nastavený, pokračovať?";
@ -411,8 +414,9 @@ validate_endbeforestart = "Zadaný dátum konca je pred začiatkom udalosti."
"Workweek days only" = "Len pracovné dni";
"Tasks in View" = "Zobrazené úlohy";
"eventDeleteConfirmation" = "Nasledujúca udalosť(i) bude odstránená:\n%{0}\nChcete pokračovať?";
"taskDeleteConfirmation" = "Odstránenie nasledujúcej úlohy(oh) je nevratné.\n%{0}\nChcete pokračovať?";
"eventDeleteConfirmation" = "Nasledujúca udalosť(i) bude odstránená:";
"taskDeleteConfirmation" = "Odstránenie nasledujúcej úlohy(oh) je nevratné.";
"Would you like to continue?" = "Chcete pokračovať?";
"You cannot remove nor unsubscribe from your personal calendar."
= "Nemôžete odstrániť ani sa odhlásiť z odoberania svojho vlastného kalendára.";

View File

@ -411,8 +411,9 @@ validate_endbeforestart = "La fecha/hora de inicio es posterior a la de fin."
"Workweek days only" = "Sólo días laborales";
"Tasks in View" = "Mostrar tareas";
"eventDeleteConfirmation" = "Se eliminarán el/los siguiente(s) evento(s) : \n%{0}\n¿Desea proceder?";
"taskDeleteConfirmation" = "No se puede deshacer el borrado de esta tarea. ¿Desea continuar?";
"eventDeleteConfirmation" = "Se eliminarán el/los siguiente(s) evento(s) :";
"taskDeleteConfirmation" = "No se puede deshacer el borrado de esta tarea.";
"Would you like to continue?" = "¿Desea continuar?";
"You cannot remove nor unsubscribe from your personal calendar."
= "No puede quitarse ni darse de baja de su calendario personal.";

View File

@ -416,8 +416,9 @@ validate_endbeforestart = "La fecha/hora de inicio es posterior a la de fin."
"Workweek days only" = "Sólo días laborables";
"Tasks in View" = "Mostrar tareas";
"eventDeleteConfirmation" = "Se eliminarán el/los siguiente(s) evento(s) : \n%{0}\n¿Desea proceder?";
"taskDeleteConfirmation" = "No se puede deshacer el borrado de esta tarea. ¿Desea continuar?";
"eventDeleteConfirmation" = "Se eliminarán el/los siguiente(s) evento(s) :";
"taskDeleteConfirmation" = "No se puede deshacer el borrado de esta tarea.";
"Would you like to continue?" = "¿Desea continuar?";
"You cannot remove nor unsubscribe from your personal calendar."
= "No se puede quitar ni darse de baja de su calendario personal.";

View File

@ -79,6 +79,12 @@
}
}
- (NSString *) localeCode
{
// WARNING : NSLocaleCode is not defined in <Foundation/NSUserDefaults.h>
return [locale objectForKey: @"NSLocaleCode"];
}
- (NSArray *) monthMenuItems
{
static NSMutableArray *monthMenuItems = nil;

View File

@ -409,8 +409,9 @@ validate_endbeforestart = "Дата закінчення передує да
"Workweek days only" = "Лише робочі дні";
"Tasks in View" = "Перегляд завдань";
"eventDeleteConfirmation" = "Ці події буде вилучено: \n%{0}\nПродовжити?";
"taskDeleteConfirmation" = "Завдання буде вилучено назавжди.\nПродовжити?";
"eventDeleteConfirmation" = "Ці події буде вилучено:";
"taskDeleteConfirmation" = "Завдання буде вилучено назавжди.";
"Would you like to continue?" = "Продовжити?";
"You cannot remove nor unsubscribe from your personal calendar."
= "Ви не можете вилучити персональнтй календар,а також відписатись від нього.";

View File

@ -15,6 +15,7 @@
var firstDayOfWeek = <var:string value="firstDayOfWeek"/>;
var dayStartHour = <var:string value="dayStartHour"/>;
var currentView = '<var:string value="currentView"/>';
var localeCode = '<var:string value="localeCode" />';
</script>
<style type="text/css">
<var:if condition="horizontalDragHandleStyle">

View File

@ -498,7 +498,7 @@ function onToolbarDeleteSelectedContactsConfirm(dialogId) {
for (var i = 0; i < rowIds.length; i++)
$(rowIds[i]).hide();
triggerAjaxRequest(urlstr, onContactDeleteEventCallback, rowIds,
('ids=' + rowIds.join("/")),
('ids=' + rowIds.join(",")),
{ "Content-type": "application/x-www-form-urlencoded" });
}

View File

@ -208,22 +208,22 @@ function editEvent() {
}
function _batchDeleteEvents() {
// Delete the next event from the batch
var events = eventsToDelete.shift();
// Delete the events of the next calendar
var calendar = calendarsOfEventsToDelete.shift();
var events = eventsToDelete.shift();
var urlstr = (ApplicationBaseURL + calendar
+ "/batchDelete?ids=" + events.join('/'));
+ "/batchDelete?ids=" + events.join(','));
document.deleteEventAjaxRequest = triggerAjaxRequest(urlstr,
deleteEventCallback,
{ calendar: calendar,
events: events });
{ calendar: calendar, events: events });
}
function deleteEvent() {
var label = "";
var events = [];
if (listOfSelection) {
var nodes = listOfSelection.getSelectedRows();
if (nodes.length > 0) {
var label = "";
if (listOfSelection.parentNode == $("tasksList"))
label = _("taskDeleteConfirmation");
else
@ -240,41 +240,54 @@ function deleteEvent() {
var canDelete;
var sortedNodes = [];
var calendars = [];
var events = [];
for (var i = 0; i < nodes.length; i++) {
canDelete = nodes[i].erasable;
if (canDelete) {
var calendar = nodes[i].calendar;
var cname = nodes[i].cname;
if (nodes[i].recurrenceTime) {
cname += '/occurence' + nodes[i].recurrenceTime;
}
if (!sortedNodes[calendar]) {
sortedNodes[calendar] = [];
calendars.push(calendar);
}
if (sortedNodes[calendar].indexOf(nodes[i].cname) < 0) {
sortedNodes[calendar].push(nodes[i].cname);
if (sortedNodes[calendar].indexOf(cname) < 0) {
// Build list item element for confirmation dialog
var itemElement = new Element('li');
var colorBox = new Element('div', {'class': 'colorBox calendarFolder' + nodes[i].calendar});
var content = '';
if (nodes[i].tagName == 'TR') {
var cell = nodes[i].down('td span');
var title = cell.allTextContent();
events.push(title); // extract the first column only
content = cell.allTextContent(); // extract the first column only
}
else
events.push(nodes[i].allTextContent());
else {
content = nodes[i].allTextContent();
}
itemElement.appendChild(colorBox);
itemElement.appendChild(new Element('span').update(content));
if (nodes[i].startDate) {
var startDate = new Date(nodes[i].startDate*1000);
var dateElement = new Element('div', {'class': 'muted'});
var date;
if (typeof nodes[i].hour == 'undefined')
date = startDate.toLocaleDateString(localeCode);
else
date = startDate.toLocaleString(localeCode);
dateElement.update(date);
itemElement.appendChild(dateElement);
}
events.push(itemElement);
sortedNodes[calendar].push(cname);
}
}
}
// Update global arrays
for (i = 0; i < calendars.length; i++) {
calendarsOfEventsToDelete.push(calendars[i]);
eventsToDelete.push(sortedNodes[calendars[i]]);
}
if (i > 0) {
var p = createElement("p", null, ["list"]);
if (Prototype.Browser.IE)
label = label.formatted('<br><br> - <b>' + events.join('</b><br> - <b>') + '</b><br><br>');
else
label = label.formatted('<ul><li>' + events.join('<li>') + '</ul>');
p.innerHTML = label;
showConfirmDialog(_("Warning"), p, deleteEventFromListConfirm, deleteEventCancel);
}
else
if (i == 0)
showAlertDialog(_("You don't have the required privileges to perform the operation."));
}
}
@ -293,18 +306,24 @@ function deleteEvent() {
var canDelete;
var sortedNodes = [];
var calendars = [];
var events = [];
var cname;
for (var i = 0; i < selectedCalendarCell.length; i++) {
canDelete = selectedCalendarCell[i].erasable;
if (canDelete) {
var calendar = selectedCalendarCell[i].calendar;
var cname = selectedCalendarCell[i].cname;
if (selectedCalendarCell[i].recurrenceTime) {
cname += '/occurence' + selectedCalendarCell[i].recurrenceTime;
}
if (!sortedNodes[calendar]) {
sortedNodes[calendar] = [];
calendars.push(calendar);
}
if (sortedNodes[calendar].indexOf(selectedCalendarCell[i].cname) < 0) {
// Extract event name for confirmation dialog
var content = "";
if (sortedNodes[calendar].indexOf(cname) < 0) {
// Build list item element for confirmation dialog
var itemElement = new Element('li');
var colorBox = new Element('div', {'class': 'colorBox calendarFolder' + selectedCalendarCell[i].calendar});
var content = '';
var event = $(selectedCalendarCell[i]).down("DIV.text");
for (var j = 0; j < event.childNodes.length; j++) {
var node = event.childNodes[j];
@ -312,33 +331,49 @@ function deleteEvent() {
content += node.nodeValue;
}
}
events.push(content);
sortedNodes[calendar].push(selectedCalendarCell[i].cname);
itemElement.appendChild(colorBox);
itemElement.appendChild(new Element('span').update(content));
if (selectedCalendarCell[i].startDate) {
var startDate = new Date(selectedCalendarCell[i].startDate*1000);
var dateElement = new Element('div', {'class': 'muted'});
var date;
if (selectedCalendarCell[i].readAttribute('hour') == 'allday')
date = startDate.toLocaleDateString(localeCode);
else
date = startDate.toLocaleString(localeCode);
dateElement.update(date);
itemElement.appendChild(dateElement);
}
events.push(itemElement);
sortedNodes[calendar].push(cname);
}
}
}
// Update global arrays
for (i = 0; i < calendars.length; i++) {
calendarsOfEventsToDelete.push(calendars[i]);
eventsToDelete.push(sortedNodes[calendars[i]]);
}
if (i > 0) {
var p = createElement("p", null, ["list"]);
var label = _("eventDeleteConfirmation");
if (Prototype.Browser.IE)
label = label.formatted('<br><br> - <b>' + events.join('</b><br> - <b>') + '</b><br><br>');
else
label = label.formatted('<ul><li>' + events.join('<li>') + '</ul>');
p.innerHTML = label;
showConfirmDialog(_("Warning"), p, deleteEventFromListConfirm, deleteEventCancel);
}
else
if (i == 0)
showAlertDialog(_("You don't have the required privileges to perform the operation."));
}
}
else
showAlertDialog(_("Please select an event or a task."));
if (events.length > 0) {
// Show confirmation dialog
var p = new Element('p');
p.appendChild(document.createTextNode(label));
var list = new Element('ul');
for (i = 0; i < events.length; i++) {
list.appendChild(events[i]);
}
p.appendChild(list);
p.appendChild(document.createTextNode(_("Would you like to continue?")));
showConfirmDialog(_("Warning"), p, deleteEventFromListConfirm, deleteEventCancel);
}
return false;
}
@ -638,12 +673,11 @@ function deleteEventCallback(http) {
var calendar = http.callbackData.calendar;
var events = http.callbackData.events;
for (var i = 0; i < events.length; i++) {
var cname = events[i];
_deleteCalendarEventBlocks(calendar, cname);
_deleteEventFromTables(calendar, cname);
_deleteCalendarEventCache(calendar, cname);
var cname = /(.+)\/occurence([0-9]+)/.exec(events[i]) || [null, events[i]];
_deleteCalendarEventBlocks(calendar, cname[1], cname[2]);
_deleteEventFromTables(calendar, cname[1], cname[2]);
_deleteCalendarEventCache(calendar, cname[1], cname[2]);
}
if (eventsToDelete.length)
_batchDeleteEvents();
else
@ -957,8 +991,8 @@ function eventsListCallback(http) {
row.isException = data[i][17];
row.editable = data[i][18] || IsSuperUser;
row.erasable = data[i][19] || IsSuperUser;
var startDate = new Date();
startDate.setTime(data[i][5] * 1000);
row.startDate = data[i][5];
var startDate = new Date(data[i][5]*1000);
row.day = startDate.getDayString();
if (!data[i][8])
row.hour = startDate.getHourString(); // event is not all day
@ -1710,8 +1744,9 @@ function newBaseEventDIV(eventRep, event, eventText) {
eventCell.calendar = event[1];
var startDate = new Date(event[5]*1000);
if (startDate) {
eventCell.startDate = event[5];
eventCell.writeAttribute('day', startDate.getDayString());
eventCell.writeAttribute('hour', startDate.getHourString());
eventCell.writeAttribute('hour', event[8]? 'allday' : startDate.getHourString());
}
// if (event[8] == 1)
// eventCell.addClassName("private");
@ -3352,7 +3387,7 @@ function onDocumentKeydown(event) {
keyCode = "V".charCodeAt(0);
}
if (keyCode == Event.KEY_DELETE
|| (keyCode == Event.KEY_BACKSPACE && isMac())) {
|| (keyCode == Event.KEY_BACKSPACE)) {
$("eventDialog").hide();
deleteEvent();
event.stop();

View File

@ -290,6 +290,9 @@ UL.choiceMenu LI._chosen:hover
{ background-color: #9ABCD8;
color: #fff; }
.menu LI:hover span.muted
{ color: #fff !important; }
.menu LI.disabled:hover
{ background-color: inherit; }
@ -659,9 +662,13 @@ DIV.dialog.none
opacity: 1;
margin: 100px auto; /* top margin could be dynamically set depending on window height */ }
DIV.dialog.none DIV
DIV.dialog.none > DIV
{ padding: 10px; }
DIV.dialog DIV.muted
{ font-size: smaller;
padding: 0; }
DIV.dialog HR
{ clear: both;
height: 0px;
@ -680,10 +687,18 @@ DIV.dialog.none P
DIV.dialog P.prompt
{ text-align: right; }
DIV.dialog P.list
DIV.dialog P.list,
DIV.dialog UL
{ max-height: 200px;
overflow-y: auto; }
DIV.dialog UL
{ list-style-type: none;
padding-left: 20px; }
DIV.dialog UL LI
{ margin-bottom: 10px; }
DIV.dialog .button
{ font-family: Lucida Grande, Bitstream VeraSans, Tahoma, sans-serif;
font-size: 8pt;

View File

@ -65,9 +65,7 @@ function clickEventWrapper(functionRef) {
}
function createElement(tagName, id, classes,
attributes, htmlAttributes,
parentNode) {
function createElement(tagName, id, classes, attributes, htmlAttributes, parentNode) {
var newElement = $(document.createElement(tagName));
if (id)
newElement.setAttribute("id", id);