1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-10 10:04:01 +02:00

Bring notifications into active dialog

This commit is contained in:
maggie0002
2021-06-15 17:46:50 -07:00
parent a53e1fa441
commit 00bbd2203d

View File

@@ -1330,10 +1330,14 @@ function IFM(params) {
*/
this.showMessage = function(m, t) {
let msgType = ( t == "e" ) ? "danger" : ( t == "s" ) ? "success" : "info";
let element = ( self.config.inline ) ? self.rootElement : "body";
let offsetY = ( document.activeElement.tagName == "BODY" ) ? 15 : 70;
$.notify(
{ message: m },
{ type: msgType, delay: 3000, mouse_over: 'pause', offset: { x: 15, y: 65 }, element: element }
{ type: msgType, delay: 3000, mouse_over: 'pause', offset: { x: 0, y: offsetY }, placement: {
from: "bottom",
align: "right"
},
element: document.activeElement }
);
};