diff --git a/SoObjects/SOGo/SOGoContentObject.m b/SoObjects/SOGo/SOGoContentObject.m index 801ab2d33..b1afaa699 100644 --- a/SoObjects/SOGo/SOGoContentObject.m +++ b/SoObjects/SOGo/SOGoContentObject.m @@ -1,5 +1,5 @@ /* - Copyright (C) 2006-2010 Inverse inc. + Copyright (C) 2006-2013 Inverse inc. Copyright (C) 2004-2005 SKYRIX Software AG This file is part of SOGo. diff --git a/UI/Common/UIxFolderActions.h b/UI/Common/UIxFolderActions.h index 1a89752f8..8d77775ec 100644 --- a/UI/Common/UIxFolderActions.h +++ b/UI/Common/UIxFolderActions.h @@ -1,8 +1,6 @@ /* UIxFolderActions.h - this file is part of SOGo * - * Copyright (C) 2007 Inverse inc. - * - * Author: Wolfgang Sourdeau + * Copyright (C) 2007-2013 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/UI/Common/UIxFolderActions.m b/UI/Common/UIxFolderActions.m index 76a2bbe37..a527699ec 100644 --- a/UI/Common/UIxFolderActions.m +++ b/UI/Common/UIxFolderActions.m @@ -1,8 +1,6 @@ /* UIxFolderActions.m - this file is part of SOGo * - * Copyright (C) 2007-2010 Inverse inc. - * - * Author: Wolfgang Sourdeau + * Copyright (C) 2007-2013 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/UI/Contacts/UIxContactFolderActions.m b/UI/Contacts/UIxContactFolderActions.m index ea416bc3a..887ce3b7b 100644 --- a/UI/Contacts/UIxContactFolderActions.m +++ b/UI/Contacts/UIxContactFolderActions.m @@ -1,6 +1,6 @@ /* Copyright (C) 2004-2005 SKYRIX Software AG - Copyright (C) 2006-2012 Inverse inc. + Copyright (C) 2006-2013 Inverse inc. This file is part of SOGo diff --git a/UI/Contacts/UIxContactFoldersView.m b/UI/Contacts/UIxContactFoldersView.m index ecfc542cb..f38a3532f 100644 --- a/UI/Contacts/UIxContactFoldersView.m +++ b/UI/Contacts/UIxContactFoldersView.m @@ -1,8 +1,6 @@ /* UIxContactFoldersView.m - this file is part of SOGo * - * Copyright (C) 2006-2010 Inverse inc. - * - * Author: Wolfgang Sourdeau + * Copyright (C) 2006-2013 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/UI/Contacts/product.plist b/UI/Contacts/product.plist index dbec6108a..a2e2847ae 100644 --- a/UI/Contacts/product.plist +++ b/UI/Contacts/product.plist @@ -105,7 +105,7 @@ actionName = "export"; }; import = { - protectedBy = "View"; + protectedBy = "Add Documents, Images, and Files"; actionClass = "UIxContactFolderActions"; actionName = "import"; }; diff --git a/UI/Scheduler/UIxCalFolderActions.h b/UI/Scheduler/UIxCalFolderActions.h index 3a7645429..a7c3c146a 100644 --- a/UI/Scheduler/UIxCalFolderActions.h +++ b/UI/Scheduler/UIxCalFolderActions.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2006-2012 Inverse inc. + Copyright (C) 2006-2013 Inverse inc. Copyright (C) 2004-2005 SKYRIX Software AG This file is part of SOGo diff --git a/UI/Scheduler/UIxCalFolderActions.m b/UI/Scheduler/UIxCalFolderActions.m index 862e08496..0a676472f 100644 --- a/UI/Scheduler/UIxCalFolderActions.m +++ b/UI/Scheduler/UIxCalFolderActions.m @@ -1,5 +1,5 @@ /* - Copyright (C) 2006-2012 Inverse inc. + Copyright (C) 2006-2013 Inverse inc. Copyright (C) 2004-2005 SKYRIX Software AG This file is part of SOGo diff --git a/UI/Scheduler/UIxCalMainActions.h b/UI/Scheduler/UIxCalMainActions.h index d133e7fdf..36ba4fbf3 100644 --- a/UI/Scheduler/UIxCalMainActions.h +++ b/UI/Scheduler/UIxCalMainActions.h @@ -1,8 +1,6 @@ /* UIxCalMainActions.h - this file is part of SOGo * - * Copyright (C) 2009 Inverse inc. - * - * Author: Cyril Robert + * Copyright (C) 2009-2013 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/UI/Scheduler/UIxCalMainActions.m b/UI/Scheduler/UIxCalMainActions.m index 07c16e7d2..e416d221c 100644 --- a/UI/Scheduler/UIxCalMainActions.m +++ b/UI/Scheduler/UIxCalMainActions.m @@ -1,8 +1,6 @@ /* UIxCalMainActions.m - this file is part of SOGo * - * Copyright (C) 2009 Inverse inc. - * - * Author: Cyril Robert + * Copyright (C) 2009-2013 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/UI/Scheduler/product.plist b/UI/Scheduler/product.plist index 128fe8117..c433d5f84 100644 --- a/UI/Scheduler/product.plist +++ b/UI/Scheduler/product.plist @@ -150,7 +150,7 @@ actionName = "redirectForUIDs"; }; import = { - protectedBy = "View"; + protectedBy = "Add Documents, Images, and Files"; actionClass = "UIxCalFolderActions"; actionName = "import"; }; diff --git a/UI/WebServerResources/ContactsUI.js b/UI/WebServerResources/ContactsUI.js index 644f9c145..b83f8a00d 100644 --- a/UI/WebServerResources/ContactsUI.js +++ b/UI/WebServerResources/ContactsUI.js @@ -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(); diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index 44482584f..d7d3d981c 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -3013,19 +3013,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) - $("uploadResultsContent").update(_("An error occurred while importing calendar.")); - else if (data.imported == 0) - $("uploadResultsContent").update(_("No event was imported.")); - else { - $("uploadResultsContent").update(_("A total of %{0} events were imported in the calendar.").formatted(data.imported)); - refreshEventsAndDisplay(); + + try { + data = response.evalJSON(true); + + if (data.imported < 0) + $("uploadResultsContent").update(_("An error occurred while importing calendar.")); + else if (data.imported == 0) + $("uploadResultsContent").update(_("No event was imported.")); + else { + $("uploadResultsContent").update(_("A total of %{0} events were imported in the calendar.").formatted(data.imported)); + refreshEventsAndDisplay(); + } + } catch (e) { + $("uploadResultsContent").update(_("An error occurred while importing calendar.")); } hideCalendarImport();