diff --git a/ChangeLog b/ChangeLog index ffc062ee7..2321bbc06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-05-28 Francis Lachapelle + + * UI/WebServerResources/SchedulerUI.js (validateUploadForm): hide + Cancel button when the form is valid and disable the Submit button. + + * UI/WebServerResources/ContactsUI.js (validateUploadForm): idem. + 2012-05-24 Jean Raby * debian*/rules: Restart sogod after pkg upgrade (dh_installinit -R) @@ -35,7 +42,7 @@ to read its freebusy info. Without this, sogo would always auto-accept invitations from 'unprivileged' users, potentially bypassing the multiplebooking parameter. - + 2012-05-14 Wolfgang Sourdeau * OpenChange/gen-property-selectors.py: "bannedProps" is now a @@ -105,7 +112,7 @@ * OpenChange/MAPIStoreSOGo.m: register and unregister current thread before and after each backend operation, in order to avoid - issues in multithreaded environment. + issues in multithreaded environment. 2012-05-01 Wolfgang Sourdeau diff --git a/UI/Contacts/English.lproj/Localizable.strings b/UI/Contacts/English.lproj/Localizable.strings index 9d2fcea6a..341bb39d0 100644 --- a/UI/Contacts/English.lproj/Localizable.strings +++ b/UI/Contacts/English.lproj/Localizable.strings @@ -198,6 +198,7 @@ "Import Cards" = "Import Cards"; "Select a vCard or LDIF file." = "Select a vCard or LDIF file."; "Upload" = "Upload"; +"Uploading" = "Uploading"; "Done" = "Done"; "An error occured while importing contacts." = "An error occured while importing contacts."; "No card was imported." = "No card was imported."; diff --git a/UI/Scheduler/English.lproj/Localizable.strings b/UI/Scheduler/English.lproj/Localizable.strings index fb704adc3..8aa9e8642 100644 --- a/UI/Scheduler/English.lproj/Localizable.strings +++ b/UI/Scheduler/English.lproj/Localizable.strings @@ -110,6 +110,7 @@ "Import Events" = "Import Events"; "Select an iCalendar file (.ics)." = "Select an iCalendar file (.ics)."; "Upload" = "Upload"; +"Uploading" = "Uploading"; "Publish Calendar..." = "Publish Calendar..."; "Reload Remote Calendars" = "Reload Remote Calendars"; "Properties" = "Properties"; diff --git a/UI/WebServerResources/ContactsUI.js b/UI/WebServerResources/ContactsUI.js index 6a14b5678..7a87247da 100644 --- a/UI/WebServerResources/ContactsUI.js +++ b/UI/WebServerResources/ContactsUI.js @@ -799,13 +799,21 @@ function hideImportResults () { } function validateUploadForm () { rc = false; - if ($("contactsFile").value.length) + if ($("contactsFile").value.length) { + var btn = jQuery('#uploadSubmit'); + jQuery('#uploadCancel').fadeOut('fast'); + btn.addClass("disabled"); + btn.children('span').text(_('Uploading')); rc = true; + } return rc; } function uploadCompleted(response) { data = response.evalJSON(true); - + jQuery('#uploadCancel').show(); + var btn = jQuery('#uploadSubmit'); + btn.removeClass("disabled"); + btn.children('span').text(_('Upload')); var div = $("uploadResults"); if (data.imported <= 0) $("uploadResultsContent").update(_("An error occured while importing contacts.")); diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index 601279356..f077995a9 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -2849,13 +2849,21 @@ function hideImportResults(event) { } function validateUploadForm() { rc = false; - if ($("calendarFile").value.length) + if ($("calendarFile").value.length) { + var btn = jQuery('#uploadSubmit'); + jQuery('#uploadCancel').fadeOut('fast'); + btn.addClass("disabled"); + btn.children('span').text(_('Uploading')); rc = true; + } return rc; } function uploadCompleted(response) { data = response.evalJSON(true); - + jQuery('#uploadCancel').show(); + var btn = jQuery('#uploadSubmit'); + btn.removeClass("disabled"); + btn.children('span').text(_('Upload')); var div = $("uploadResults"); if (data.imported < 0) $("uploadResultsContent").update(_("An error occurred while importing calendar."));