Merge branch '1539-pantalla-en-blanco-al-crear-mapas-de-red-radial-dinamic-dev' into 'develop'

1539 pantalla en blanco al crear mapas de red radial dinamic dev

See merge request artica/pandorafms!1083
This commit is contained in:
vgilc 2017-11-16 12:48:03 +01:00
commit 9fdd95ad0d
2 changed files with 30 additions and 4 deletions

View File

@ -18,7 +18,13 @@
global $config; global $config;
check_login (); check_login ();
$id = get_parameter('id_networkmap', true); if (_id_ != "_id_") {
$id = _id_;
}
else {
$id = get_parameter('id_networkmap', true);
}
$activeTab = get_parameter('activeTab', true); $activeTab = get_parameter('activeTab', true);
if (enterprise_installed()) { if (enterprise_installed()) {
@ -31,6 +37,11 @@ if (enterprise_installed()) {
} }
} }
if (_activeTab_ != "_activeTab_") {
$activeTab = _activeTab_;
$tab = $activeTab;
}
// Networkmap id required // Networkmap id required
if (!isset($id)) { if (!isset($id)) {
db_pandora_audit("ACL Violation", db_pandora_audit("ACL Violation",
@ -107,6 +118,11 @@ ui_print_page_header(io_safe_output($networkmap['name']),
global $width; global $width;
global $height; global $height;
if (_id_ != "_id_") {
$width = array();
$height = array();
}
if (empty($width)) { if (empty($width)) {
$width = 600; $width = 600;
} }

View File

@ -112,8 +112,10 @@ if (enterprise_installed()) {
__('Succesfully created'), __('Could not be created'), '', __('Succesfully created'), __('Could not be created'), '',
true); true);
// Force the tab = 'list' $id = $result;
$tab = "list"; define("_id_", $id);
$tab = "view";
} }
else if ($update_empty_networkmap) { else if ($update_empty_networkmap) {
$id_group = (int) get_parameter('id_group', 0); $id_group = (int) get_parameter('id_group', 0);
@ -290,8 +292,13 @@ if ($new_networkmap || $save_networkmap) {
$id = $result; $id = $result;
define("_id_", $id); define("_id_", $id);
// Force the tab = 'view'
$tab = "view"; $tab = "view";
if ($values['generation_method'] == 6) {
$tab = "r_dinamic";
define("_activeTab_", 'radial_dynamic');
}
} }
} }
// The networkmap exists // The networkmap exists
@ -433,6 +440,9 @@ else if ($update_networkmap || $copy_networkmap || $delete) {
} }
switch ($tab) { switch ($tab) {
case 'r_dinamic':
require('networkmap.dinamic.php');
break;
case 'edit': case 'edit':
require('pandora_networkmap.editor.php'); require('pandora_networkmap.editor.php');
break; break;