1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-22 13:33:52 +03:00

Fix Uncaught exception in config tab

This commit is contained in:
Carlos Martín 2015-02-19 18:10:03 +01:00
parent 507497b8ce
commit 1729b67061

View File

@ -33,11 +33,15 @@ Config = {
},
"isTabActionEnabled": function(tab_name, action_name, panel_name){
var enabled;
if (panel_name) {
enabled = config['view']['tabs'][tab_name]['panel_tabs_actions'][panel_name][action_name];
} else {
enabled = config['view']['tabs'][tab_name]['actions'][action_name];
var enabled = false;
var config_tab = config['view']['tabs'][tab_name];
if (config_tab != undefined){
if (panel_name) {
enabled = config_tab['panel_tabs_actions'][panel_name][action_name];
} else {
enabled = config_tab['actions'][action_name];
}
}
return enabled;