From 29f631e807e545c9b89dd2f1effc28b9511d6672 Mon Sep 17 00:00:00 2001 From: Alex ORLUC <alex.orluc@maarch.org> Date: Thu, 13 Apr 2017 12:28:23 +0200 Subject: [PATCH] update alert auto fade error --- .../maarch_entreprise/js/angular/app/profile.component.js | 8 ++++++-- .../maarch_entreprise/js/angular/app/profile.component.ts | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/apps/maarch_entreprise/js/angular/app/profile.component.js b/apps/maarch_entreprise/js/angular/app/profile.component.js index bad47dabccc..d8494eded24 100644 --- a/apps/maarch_entreprise/js/angular/app/profile.component.js +++ b/apps/maarch_entreprise/js/angular/app/profile.component.js @@ -107,7 +107,9 @@ var ProfileComponent = (function () { if (data.errors) { _this.resultInfo = data.errors; $j('#resultInfo').removeClass().addClass('alert alert-danger alert-dismissible'); - $j('#resultInfo').modal('show').show(); + $j("#resultInfo").fadeTo(3000, 500).slideUp(500, function () { + $j("#resultInfo").slideUp(500); + }); } else { _this.showPassword = false; @@ -179,7 +181,9 @@ var ProfileComponent = (function () { if (data.errors) { _this.resultInfo = data.errors; $j('#resultInfo').removeClass().addClass('alert alert-danger alert-dismissible'); - $j('#resultInfo').modal('show').show(); + $j("#resultInfo").fadeTo(3000, 500).slideUp(500, function () { + $j("#resultInfo").slideUp(500); + }); } else { _this.resultInfo = 'Les informations utilisateur ont été modifiées'; diff --git a/apps/maarch_entreprise/js/angular/app/profile.component.ts b/apps/maarch_entreprise/js/angular/app/profile.component.ts index 0b54fd76505..e38291802f2 100644 --- a/apps/maarch_entreprise/js/angular/app/profile.component.ts +++ b/apps/maarch_entreprise/js/angular/app/profile.component.ts @@ -118,7 +118,9 @@ export class ProfileComponent implements OnInit { if (data.errors) { this.resultInfo = data.errors; $j('#resultInfo').removeClass().addClass('alert alert-danger alert-dismissible'); - $j('#resultInfo').modal('show').show(); + $j("#resultInfo").fadeTo(3000, 500).slideUp(500, function(){ + $j("#resultInfo").slideUp(500); + }); } else { this.showPassword = false; this.passwordModel = { @@ -190,7 +192,9 @@ export class ProfileComponent implements OnInit { if (data.errors) { this.resultInfo = data.errors; $j('#resultInfo').removeClass().addClass('alert alert-danger alert-dismissible'); - $j('#resultInfo').modal('show').show(); + $j("#resultInfo").fadeTo(3000, 500).slideUp(500, function(){ + $j("#resultInfo").slideUp(500); + }); }else{ this.resultInfo = 'Les informations utilisateur ont été modifiées'; -- GitLab