WIP command center
This commit is contained in:
parent
39d1ee8d60
commit
bdf6c9f258
|
@ -444,6 +444,7 @@ function load_modal(settings) {
|
|||
function confirmDialog(settings) {
|
||||
var randomStr = uniqId();
|
||||
var hideOkButton = "";
|
||||
var hideCancelButton = "";
|
||||
|
||||
if (settings.size == undefined) {
|
||||
settings.size = 350;
|
||||
|
@ -456,6 +457,14 @@ function confirmDialog(settings) {
|
|||
if (settings.hideOkButton != undefined) {
|
||||
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") {
|
||||
$("body").append(
|
||||
|
@ -480,15 +489,18 @@ function confirmDialog(settings) {
|
|||
id: "cancel_btn_dialog",
|
||||
text: "Cancel",
|
||||
class:
|
||||
hideCancelButton +
|
||||
"ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel",
|
||||
click: function() {
|
||||
$(this).dialog("close");
|
||||
$(this).remove();
|
||||
if (typeof settings.notCloseOnDeny == "undefined") {
|
||||
$(this).dialog("close");
|
||||
$(this).remove();
|
||||
}
|
||||
if (typeof settings.onDeny == "function") settings.onDeny();
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "Ok",
|
||||
text: settings.strOKButton,
|
||||
class:
|
||||
hideOkButton +
|
||||
"ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next",
|
||||
|
|
Loading…
Reference in New Issue