pull/12/head
Ludovic Marcotte 2013-06-19 15:07:19 -04:00
parent a764286879
commit 871115e349
13 changed files with 38 additions and 36 deletions

View File

@ -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.

View File

@ -1,8 +1,6 @@
/* UIxFolderActions.h - this file is part of SOGo
*
* Copyright (C) 2007 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
* 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

View File

@ -1,8 +1,6 @@
/* UIxFolderActions.m - this file is part of SOGo
*
* Copyright (C) 2007-2010 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
* 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

View File

@ -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

View File

@ -1,8 +1,6 @@
/* UIxContactFoldersView.m - this file is part of SOGo
*
* Copyright (C) 2006-2010 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
* 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

View File

@ -105,7 +105,7 @@
actionName = "export";
};
import = {
protectedBy = "View";
protectedBy = "Add Documents, Images, and Files";
actionClass = "UIxContactFolderActions";
actionName = "import";
};

View File

@ -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

View File

@ -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

View File

@ -1,8 +1,6 @@
/* UIxCalMainActions.h - this file is part of SOGo
*
* Copyright (C) 2009 Inverse inc.
*
* Author: Cyril Robert <crobert@inverse.ca>
* 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

View File

@ -1,8 +1,6 @@
/* UIxCalMainActions.m - this file is part of SOGo
*
* Copyright (C) 2009 Inverse inc.
*
* Author: Cyril Robert <crobert@inverse.ca>
* 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

View File

@ -150,7 +150,7 @@
actionName = "redirectForUIDs";
};
import = {
protectedBy = "View";
protectedBy = "Add Documents, Images, and Files";
actionClass = "UIxCalFolderActions";
actionName = "import";
};

View File

@ -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();

View File

@ -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();