mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
#19909: Show an error message on Media library ajax calls
Work Item: 19909
This commit is contained in:
@@ -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());
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@@ -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()'
|
||||
};
|
||||
//]]>
|
||||
|
Reference in New Issue
Block a user