mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
WIP command center
This commit is contained in:
parent
39d1ee8d60
commit
bdf6c9f258
@ -444,6 +444,7 @@ function load_modal(settings) {
|
|||||||
function confirmDialog(settings) {
|
function confirmDialog(settings) {
|
||||||
var randomStr = uniqId();
|
var randomStr = uniqId();
|
||||||
var hideOkButton = "";
|
var hideOkButton = "";
|
||||||
|
var hideCancelButton = "";
|
||||||
|
|
||||||
if (settings.size == undefined) {
|
if (settings.size == undefined) {
|
||||||
settings.size = 350;
|
settings.size = 350;
|
||||||
@ -456,6 +457,14 @@ function confirmDialog(settings) {
|
|||||||
if (settings.hideOkButton != undefined) {
|
if (settings.hideOkButton != undefined) {
|
||||||
hideOkButton = "invisible_important ";
|
hideOkButton = "invisible_important ";
|
||||||
}
|
}
|
||||||
|
// You can hide the Cancel button.
|
||||||
|
if (settings.hideCancelButton != undefined) {
|
||||||
|
hideCancelButton = "invisible_important ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (settings.strOKButton == undefined) {
|
||||||
|
settings.strOKButton = "Ok";
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof settings.message == "function") {
|
if (typeof settings.message == "function") {
|
||||||
$("body").append(
|
$("body").append(
|
||||||
@ -480,15 +489,18 @@ function confirmDialog(settings) {
|
|||||||
id: "cancel_btn_dialog",
|
id: "cancel_btn_dialog",
|
||||||
text: "Cancel",
|
text: "Cancel",
|
||||||
class:
|
class:
|
||||||
|
hideCancelButton +
|
||||||
"ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel",
|
"ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel",
|
||||||
click: function() {
|
click: function() {
|
||||||
$(this).dialog("close");
|
if (typeof settings.notCloseOnDeny == "undefined") {
|
||||||
$(this).remove();
|
$(this).dialog("close");
|
||||||
|
$(this).remove();
|
||||||
|
}
|
||||||
if (typeof settings.onDeny == "function") settings.onDeny();
|
if (typeof settings.onDeny == "function") settings.onDeny();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: "Ok",
|
text: settings.strOKButton,
|
||||||
class:
|
class:
|
||||||
hideOkButton +
|
hideOkButton +
|
||||||
"ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next",
|
"ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user