mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
Feature #3748: Generic methods to hide/show the form submit button
This commit is contained in:
parent
a739fe2cf7
commit
f33fee8913
@ -699,6 +699,7 @@ define(function(require) {
|
||||
var context = $("#" + tabId);
|
||||
_popFormPanelLoading(tabId);
|
||||
_enableFormPanelSubmit(tabId);
|
||||
_showFormPanelSubmit(tabId);
|
||||
|
||||
setTimeout(function() {
|
||||
var tab = SunstoneCfg["tabs"][tabId];
|
||||
@ -844,6 +845,16 @@ define(function(require) {
|
||||
off("click.disable");
|
||||
}
|
||||
|
||||
function _hideFormPanelSubmit(tabId) {
|
||||
var context = $("#" + tabId);
|
||||
$(".submit_button", context).hide();
|
||||
}
|
||||
|
||||
function _showFormPanelSubmit(tabId) {
|
||||
var context = $("#" + tabId);
|
||||
$(".submit_button", context).show();
|
||||
}
|
||||
|
||||
var _getButton = function(tadId, buttonName) {
|
||||
var button = null;
|
||||
var buttons = SunstoneCfg["tabs"][tadId]["buttons"];
|
||||
@ -905,6 +916,8 @@ define(function(require) {
|
||||
"hideFormPanelLoading": _hideFormPanelLoading,
|
||||
"disableFormPanelSubmit": _disableFormPanelSubmit,
|
||||
"enableFormPanelSubmit": _enableFormPanelSubmit,
|
||||
"hideFormPanelSubmit": _hideFormPanelSubmit,
|
||||
"showFormPanelSubmit": _showFormPanelSubmit,
|
||||
|
||||
|
||||
"rightInfoVisible": _rightInfoVisible,
|
||||
|
@ -83,19 +83,19 @@ define(function(require) {
|
||||
$(".vcenter_credentials", context).hide();
|
||||
$("#vnm_mads", context).show();
|
||||
$("#name_container", context).show();
|
||||
$("#"+TAB_ID+"submit_button", "#"+TAB_ID).show();
|
||||
Sunstone.showFormPanelSubmit(TAB_ID);
|
||||
$(".drivers", context).show();
|
||||
} else if (this.value == "vcenter") {
|
||||
$("#vnm_mads", context).hide();
|
||||
$("#name_container", context).hide();
|
||||
$(".vcenter_credentials", context).show();
|
||||
$("#"+TAB_ID+"submit_button", "#"+TAB_ID).hide();
|
||||
Sunstone.hideFormPanelSubmit(TAB_ID);
|
||||
$(".drivers", context).hide();
|
||||
} else {
|
||||
$(".vcenter_credentials", context).hide();
|
||||
$("#vnm_mads", context).show();
|
||||
$("#name_container", context).show();
|
||||
$("#"+TAB_ID+"submit_button", "#"+TAB_ID).show();
|
||||
Sunstone.showFormPanelSubmit(TAB_ID);
|
||||
$(".drivers", context).hide();
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user