X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=afb-client%2Fapp%2FFrontend%2Fwidgets%2FFormInput%2FUploadFiles.js;fp=afb-client%2Fapp%2FFrontend%2Fwidgets%2FFormInput%2FUploadFiles.js;h=8bc8ecadbf0da602470b4533699823ade82d528c;hb=20853066884b9d3cddfa29c9741d625ba625c5f3;hp=88669a99024986b19607fc611c9aa7b0568db485;hpb=3b1b2ddc4692776318a135a66c1da8c5dee13f64;p=src%2Fapp-framework-demo.git diff --git a/afb-client/app/Frontend/widgets/FormInput/UploadFiles.js b/afb-client/app/Frontend/widgets/FormInput/UploadFiles.js index 88669a9..8bc8eca 100644 --- a/afb-client/app/Frontend/widgets/FormInput/UploadFiles.js +++ b/afb-client/app/Frontend/widgets/FormInput/UploadFiles.js @@ -53,6 +53,7 @@ function LoadFileSvc (scope, elem, posturl, files, thumbnailCB) { // Upload is finish let's notify controler callback xmlReq.onload = function () { elem.addClass ("success"); + elem.removeClass ("error"); var response ={ status : xmlReq.status, headers: xmlReq.getAllResponseHeaders() @@ -61,7 +62,8 @@ function LoadFileSvc (scope, elem, posturl, files, thumbnailCB) { }; xmlReq.onerror = function () { - elem.addClass ("error fail"); + elem.addClass ("error"); + elem.removeClass ("success"); var response ={ status : xmlReq.status, headers: xmlReq.getAllResponseHeaders() @@ -70,7 +72,8 @@ function LoadFileSvc (scope, elem, posturl, files, thumbnailCB) { }; xmlReq.onabort = function () { - elem.addClass ("error abort"); + elem.addClass ("error"); + elem.removeClass ("success"); var response ={ status : xmlReq.status, headers: xmlReq.getAllResponseHeaders()