diff --git a/ChangeLog b/ChangeLog index 976c2171a..15142b923 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-10-08 Francis Lachapelle + * UI/WebServerResources/generic.js (showConfirmDialog) + (showPromptDialog): keys for cached dialogs are now build from a + combination of the dialog title and label to avoid collisions. + * UI/WebServerResources/SchedulerUI.js (deleteEventFromViewCancel): new function loaded if the user cancel the deletion of an event. It clears the array of events to diff --git a/UI/WebServerResources/ContactsUI.js b/UI/WebServerResources/ContactsUI.js index b61a332ac..c1533ae9f 100644 --- a/UI/WebServerResources/ContactsUI.js +++ b/UI/WebServerResources/ContactsUI.js @@ -1021,8 +1021,7 @@ function onMenuSharing(event) { var selected = folders.getSelectedNodes()[0]; var owner = selected.getAttribute("owner"); if (owner == "nobody") - showAlertDialog(clabels["The user rights cannot be" - + " edited for this object!"]); + showAlertDialog(_("The user rights cannot be edited for this object!")); else { var title = this.innerHTML; var url = URLForFolderID(selected.getAttribute("id")); diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js index b6bd87978..c676b3031 100644 --- a/UI/WebServerResources/generic.js +++ b/UI/WebServerResources/generic.js @@ -1822,7 +1822,7 @@ function _showAlertDialog(label) { } function showConfirmDialog(title, label, callbackYes, callbackNo) { - var dialog = dialogs[label]; + var dialog = dialogs[title+label]; if (dialog) { $("bgDialogDiv").show(); } @@ -1836,13 +1836,13 @@ function showConfirmDialog(title, label, callbackYes, callbackNo) { fields, "none"); document.body.appendChild(dialog); - dialogs[label] = dialog; + dialogs[title+label] = dialog; } dialog.show(); } function showPromptDialog(title, label, callback, defaultValue) { - var dialog = dialogs[label]; + var dialog = dialogs[title+label]; v = defaultValue?defaultValue:""; if (dialog) { $("bgDialogDiv").show(); @@ -1867,7 +1867,7 @@ function showPromptDialog(title, label, callback, defaultValue) { fields, "none"); document.body.appendChild(dialog); - dialogs[label] = dialog; + dialogs[title+label] = dialog; } dialog.show(); dialog.down("input").focus();