#19909: Show an error message on Media library ajax calls

Work Item: 19909
This commit is contained in:
Sebastien Ros
2013-11-07 17:43:50 -08:00
parent 7fa6ef9da1
commit f7f710253f
2 changed files with 6 additions and 1 deletions

View File

@@ -349,8 +349,12 @@ $(function () {
viewModel.clearSelection();
} else {
console.log('failed to move media items');
alert(errorMessage);
console.log('failed to move media items: ' + result.toString());
}
}).fail(function (result) {
alert(errorMessage);
console.log('failed to move media items: ' + result.toString());
});
}
});

View File

@@ -100,6 +100,7 @@ var mediaLibrarySettings = {
hasFolderPath: @(viewModel.FolderPath != null ? "true" : "false"),
folderPath: '@HttpUtility.JavaScriptStringEncode(viewModel.FolderPath)',
deleteConfirmationMessage: '@HttpUtility.JavaScriptStringEncode(T("Are you sure you want to delete these media items ?").Text)',
errorMessage: '@HttpUtility.JavaScriptStringEncode(T("An unexpected error occured, please refresh the page and try again.").Text)',
antiForgeryToken: '@Html.AntiForgeryTokenValueOrchard()'
};
//]]>