From 7fe5f2277066a78cf131b383980142ef2407f547 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Fri, 6 Apr 2018 02:10:11 -0400 Subject: [PATCH] Make error messages persistent and increase the timeout of warning to 10 seconds. Signed-off-by: Roberto Rosario --- HISTORY.rst | 3 ++- docs/releases/3.0.rst | 1 + mayan/apps/appearance/static/appearance/js/mayan_app.js | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index eb072faff0..fd41360fed 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -142,7 +142,8 @@ the solution. - Removing running workflow instances in document of a specific type if that document type is removed from the workflow. - +- Make error messages persistent and increase the timeout of warning to 10 seconds. + 2.7.3 (2017-09-11) ================== diff --git a/docs/releases/3.0.rst b/docs/releases/3.0.rst index c86144e7ba..a80a13071a 100644 --- a/docs/releases/3.0.rst +++ b/docs/releases/3.0.rst @@ -435,6 +435,7 @@ Other changes worth mentioning - Fix issue when using workflows transitions with the new version upload event as trigger. Thanks to Sema @Miggaten for the find and the solution. +- Make error messages persistent and increase the timeout of warning to 10 seconds. Removals diff --git a/mayan/apps/appearance/static/appearance/js/mayan_app.js b/mayan/apps/appearance/static/appearance/js/mayan_app.js index 148d0e01c8..efcdd0dc38 100644 --- a/mayan/apps/appearance/static/appearance/js/mayan_app.js +++ b/mayan/apps/appearance/static/appearance/js/mayan_app.js @@ -163,9 +163,14 @@ App.prototype.doToastrMessages = function () { var options = {}; if (value.tags === 'error') { + // Error messages persist + options['timeOut'] = 0; + } + if (value.tags === 'warning') { // Error messages persist options['timeOut'] = 10000; } + toastr[value.tags](value.message, '', options); }); }