mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
MQ exceptions, warning message on mq issues
This commit is contained in:
parent
f52d389327
commit
8365b47be7
@ -1,3 +1,4 @@
|
|||||||
|
/* globals $, get_php_value, infoMessage */
|
||||||
/**
|
/**
|
||||||
* -------------------------------------
|
* -------------------------------------
|
||||||
* Connection Check
|
* Connection Check
|
||||||
@ -97,62 +98,3 @@ function showConnectionMessage(conn = true, msg = "") {
|
|||||||
infoMessage(data, "message_dialog_connection");
|
infoMessage(data, "message_dialog_connection");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function infoMessage(data, idMsg) {
|
|
||||||
var title = data.title;
|
|
||||||
var err_messge = data.text;
|
|
||||||
|
|
||||||
if (idMsg == null) {
|
|
||||||
idMsg = uniqId();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($("#" + idMsg).length === 0) {
|
|
||||||
$("body").append('<div title="' + title + '" id="' + idMsg + '"></div>');
|
|
||||||
$("#" + idMsg).empty();
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#err_msg").empty();
|
|
||||||
$("#err_msg").html("\n\n" + err_messge);
|
|
||||||
|
|
||||||
$("#" + idMsg)
|
|
||||||
.dialog({
|
|
||||||
height: 250,
|
|
||||||
width: 528,
|
|
||||||
opacity: 1,
|
|
||||||
modal: true,
|
|
||||||
position: {
|
|
||||||
my: "center",
|
|
||||||
at: "center",
|
|
||||||
of: window,
|
|
||||||
collision: "fit"
|
|
||||||
},
|
|
||||||
title: data.title,
|
|
||||||
buttons: [
|
|
||||||
{
|
|
||||||
class:
|
|
||||||
"ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next",
|
|
||||||
text: "Retry",
|
|
||||||
click: function(e) {
|
|
||||||
handleConnection();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
class:
|
|
||||||
"ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-cancel",
|
|
||||||
text: "Close",
|
|
||||||
click: function() {
|
|
||||||
$(this).dialog("close");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
|
|
||||||
open: function(event, ui) {
|
|
||||||
$(".ui-widget-overlay").addClass("error-modal-opened");
|
|
||||||
},
|
|
||||||
close: function(event, ui) {
|
|
||||||
$(".ui-widget-overlay").removeClass("error-modal-opened");
|
|
||||||
closed = true;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.show();
|
|
||||||
}
|
|
||||||
|
@ -577,6 +577,9 @@ function generalShowMsg(data, idMsg) {
|
|||||||
function infoMessage(data, idMsg) {
|
function infoMessage(data, idMsg) {
|
||||||
var title = data.title;
|
var title = data.title;
|
||||||
var err_messge = data.text;
|
var err_messge = data.text;
|
||||||
|
// False or null: Show all buttons and classic behaviour,
|
||||||
|
// if true, show an OK button and message from data.text.
|
||||||
|
var simple = data.simple;
|
||||||
|
|
||||||
if (idMsg == null) {
|
if (idMsg == null) {
|
||||||
idMsg = uniqId();
|
idMsg = uniqId();
|
||||||
@ -590,6 +593,41 @@ function infoMessage(data, idMsg) {
|
|||||||
$("#err_msg").empty();
|
$("#err_msg").empty();
|
||||||
$("#err_msg").html("\n\n" + err_messge);
|
$("#err_msg").html("\n\n" + err_messge);
|
||||||
|
|
||||||
|
var buttons = [];
|
||||||
|
|
||||||
|
if (simple == null || simple == false) {
|
||||||
|
buttons = [
|
||||||
|
{
|
||||||
|
class:
|
||||||
|
"ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next",
|
||||||
|
text: "Retry",
|
||||||
|
click: function(e) {
|
||||||
|
handleConnection();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
class:
|
||||||
|
"ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-cancel",
|
||||||
|
text: "Close",
|
||||||
|
click: function() {
|
||||||
|
$(this).dialog("close");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
$("#" + idMsg).append($("#err_msg"));
|
||||||
|
buttons = [
|
||||||
|
{
|
||||||
|
class:
|
||||||
|
"ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next",
|
||||||
|
text: "Ok",
|
||||||
|
click: function(e) {
|
||||||
|
$("#" + idMsg).dialog("close");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
$("#" + idMsg)
|
$("#" + idMsg)
|
||||||
.dialog({
|
.dialog({
|
||||||
height: 250,
|
height: 250,
|
||||||
@ -603,24 +641,7 @@ function infoMessage(data, idMsg) {
|
|||||||
collision: "fit"
|
collision: "fit"
|
||||||
},
|
},
|
||||||
title: data.title,
|
title: data.title,
|
||||||
buttons: [
|
buttons: buttons,
|
||||||
{
|
|
||||||
class:
|
|
||||||
"ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next",
|
|
||||||
text: "Retry",
|
|
||||||
click: function(e) {
|
|
||||||
handleConnection();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
class:
|
|
||||||
"ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-cancel",
|
|
||||||
text: "Close",
|
|
||||||
click: function() {
|
|
||||||
$(this).dialog("close");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
|
|
||||||
open: function(event, ui) {
|
open: function(event, ui) {
|
||||||
$(".ui-widget-overlay").addClass("error-modal-opened");
|
$(".ui-widget-overlay").addClass("error-modal-opened");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user