mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-21 19:35:38 +00:00
Fixed bug #2294
This commit is contained in:
@@ -806,19 +806,25 @@ function validateUploadForm () {
|
||||
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)
|
||||
|
||||
try {
|
||||
data = response.evalJSON(true);
|
||||
|
||||
if (data.imported <= 0)
|
||||
$("uploadResultsContent").update(_("An error occured while importing contacts."));
|
||||
else if (data.imported == 0)
|
||||
$("uploadResultsContent").update(_("No card was imported."));
|
||||
else {
|
||||
$("uploadResultsContent").update(_("A total of %{0} cards were imported in the addressbook.").formatted(data.imported));
|
||||
refreshCurrentFolder();
|
||||
}
|
||||
} catch (e) {
|
||||
$("uploadResultsContent").update(_("An error occured while importing contacts."));
|
||||
else if (data.imported == 0)
|
||||
$("uploadResultsContent").update(_("No card was imported."));
|
||||
else {
|
||||
$("uploadResultsContent").update(_("A total of %{0} cards were imported in the addressbook.").formatted(data.imported));
|
||||
refreshCurrentFolder();
|
||||
}
|
||||
|
||||
hideContactsImport();
|
||||
|
||||
Reference in New Issue
Block a user