Merge branch 'ent-7032-boton-ok-wizard-snmp-interfaces' into 'develop'
Hide OK button meanwhile is loading data Closes pandora_enterprise#7032 See merge request artica/pandorafms!3837
This commit is contained in:
commit
8a0b4fd090
|
@ -5343,6 +5343,7 @@ class AgentWizard extends HTML
|
||||||
function processListModules() {
|
function processListModules() {
|
||||||
confirmDialog({
|
confirmDialog({
|
||||||
title: "<?php echo __('Modules about to be created'); ?>",
|
title: "<?php echo __('Modules about to be created'); ?>",
|
||||||
|
hideOkButton: true,
|
||||||
message: function() {
|
message: function() {
|
||||||
var id = "div-" + uniqId();
|
var id = "div-" + uniqId();
|
||||||
var loading = "<?php echo __('Loading, this operation might take several minutes...'); ?>";
|
var loading = "<?php echo __('Loading, this operation might take several minutes...'); ?>";
|
||||||
|
@ -5381,6 +5382,8 @@ class AgentWizard extends HTML
|
||||||
},
|
},
|
||||||
datatype: "html",
|
datatype: "html",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
// Show hidden OK button
|
||||||
|
$('.sub.ok.submit-next').removeClass('invisible_important');
|
||||||
$('#' + id).empty().append(data);
|
$('#' + id).empty().append(data);
|
||||||
},
|
},
|
||||||
error: function(e) {
|
error: function(e) {
|
||||||
|
|
|
@ -406,6 +406,7 @@ function load_modal(settings) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
function confirmDialog(settings) {
|
function confirmDialog(settings) {
|
||||||
var randomStr = uniqId();
|
var randomStr = uniqId();
|
||||||
|
var hideOkButton = "";
|
||||||
|
|
||||||
if (settings.size == undefined) {
|
if (settings.size == undefined) {
|
||||||
settings.size = 350;
|
settings.size = 350;
|
||||||
|
@ -414,6 +415,10 @@ function confirmDialog(settings) {
|
||||||
if (settings.maxHeight == undefined) {
|
if (settings.maxHeight == undefined) {
|
||||||
settings.maxHeight = 1000;
|
settings.maxHeight = 1000;
|
||||||
}
|
}
|
||||||
|
// You can hide the OK button.
|
||||||
|
if (settings.hideOkButton != undefined) {
|
||||||
|
hideOkButton = "invisible_important ";
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof settings.message == "function") {
|
if (typeof settings.message == "function") {
|
||||||
$("body").append(
|
$("body").append(
|
||||||
|
@ -447,6 +452,7 @@ function confirmDialog(settings) {
|
||||||
{
|
{
|
||||||
text: "Ok",
|
text: "Ok",
|
||||||
class:
|
class:
|
||||||
|
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",
|
||||||
click: function() {
|
click: function() {
|
||||||
$(this).dialog("close");
|
$(this).dialog("close");
|
||||||
|
|
|
@ -704,6 +704,9 @@ select:-internal-list-box {
|
||||||
.invisible {
|
.invisible {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
.invisible_important {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
.visible {
|
.visible {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
Loading…
Reference in New Issue