fixed toaster issues for uploading file in Admin UI

pull/63/head
13621160019@163.com 2021-08-22 17:49:41 +08:00
parent f8e5905468
commit e016b1df9b
4 changed files with 5 additions and 6 deletions

View File

@ -37,7 +37,7 @@ app.controller('CostFileController', function (
toaster.pop({ toaster.pop({
type: "success", type: "success",
title: $translate.instant("TOASTER.SUCCESS_TITLE"), title: $translate.instant("TOASTER.SUCCESS_TITLE"),
body: $translate.instant("TOASTER.SUCCESS_ADD_BODY".format(file.name)), body: $translate.instant("TOASTER.SUCCESS_ADD_BODY", {template: file.name}),
showCloseButton: true, showCloseButton: true,
}); });
$scope.getAllCostFiles(); $scope.getAllCostFiles();
@ -46,7 +46,7 @@ app.controller('CostFileController', function (
toaster.pop({ toaster.pop({
type: "error", type: "error",
title: $translate.instant("TOASTER.FAILURE_TITLE"), title: $translate.instant("TOASTER.FAILURE_TITLE"),
body: $translate.instant("TOASTER.ERROR_ADD_BODY".format(file.name)), body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: file.name}),
showCloseButton: true, showCloseButton: true,
}); });
} }

View File

@ -37,7 +37,7 @@ app.controller('KnowledgeFileController', function (
toaster.pop({ toaster.pop({
type: "success", type: "success",
title: $translate.instant("TOASTER.SUCCESS_TITLE"), title: $translate.instant("TOASTER.SUCCESS_TITLE"),
body: $translate.instant("TOASTER.SUCCESS_ADD_BODY".format(file.name)), body: $translate.instant("TOASTER.SUCCESS_ADD_BODY", {template: file.name}),
showCloseButton: true, showCloseButton: true,
}); });
$scope.getAllKnowledgeFiles(); $scope.getAllKnowledgeFiles();
@ -46,7 +46,7 @@ app.controller('KnowledgeFileController', function (
toaster.pop({ toaster.pop({
type: "error", type: "error",
title: $translate.instant("TOASTER.FAILURE_TITLE"), title: $translate.instant("TOASTER.FAILURE_TITLE"),
body: $translate.instant("TOASTER.ERROR_ADD_BODY".format(file.name)), body: $translate.instant("TOASTER.ERROR_ADD_BODY", {template: file.name}),
showCloseButton: true, showCloseButton: true,
}); });
} }

View File

@ -38,7 +38,7 @@ app.controller('OfflineMeterFileController', function(
toaster.pop({ toaster.pop({
type: "success", type: "success",
title: $translate.instant("TOASTER.SUCCESS_TITLE"), title: $translate.instant("TOASTER.SUCCESS_TITLE"),
body: $translate.instant("TOASTER.SUCCESS_ADD_BODY",{template: file.name}), body: $translate.instant("TOASTER.SUCCESS_ADD_BODY", {template: file.name}),
showCloseButton: true, showCloseButton: true,
}); });
$scope.getAllOfflineMeterFiles(); $scope.getAllOfflineMeterFiles();

View File

@ -342,7 +342,6 @@ function dropZone() {
link: function(scope, element, attrs) { link: function(scope, element, attrs) {
var config = { var config = {
url: 'http://localhost:8080/upload',
maxFilesize: 100, maxFilesize: 100,
paramName: "uploadfile", paramName: "uploadfile",
maxThumbnailFilesize: 10, maxThumbnailFilesize: 10,