2011-08-10 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_menu.php, operation/menu.php, godmode/menu.php: fixed when set a icon in a enterprise extension for the entry in menu. And added the feature to set a default icon when the icon not exists. Fixes: #3388452 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4704 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
f678a4ff72
commit
e22d598249
|
@ -1,4 +1,12 @@
|
|||
2011-08-11 Sancho Lerena <slerena@artica.es>
|
||||
2011-08-10 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_menu.php, operation/menu.php, godmode/menu.php: fixed
|
||||
when set a icon in a enterprise extension for the entry in menu. And added
|
||||
the feature to set a default icon when the icon not exists.
|
||||
|
||||
Fixes: #3388452
|
||||
|
||||
2011-08-10 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* include/styles/pandora.css: Removed black line in header.
|
||||
|
||||
|
|
|
@ -256,6 +256,8 @@ if (check_acl ($config['id_user'], 0, "PM")) {
|
|||
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["icon"] = $extmenu['icon'];
|
||||
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["sec"] = 'gextensions';
|
||||
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["extension"] = true;
|
||||
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["enterprise"] = $extension['enterprise'];
|
||||
|
||||
$menu[$extmenu['fatherId']]['hasExtensions'] = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -144,9 +144,26 @@ function menu_print_menu (&$menu) {
|
|||
else $secExtensionBool = false;
|
||||
|
||||
if ($secExtensionBool) {
|
||||
$imageIcon = 'images/extensions.png';
|
||||
if (strlen($sub["icon"]) > 0)
|
||||
$imageIconDefault = 'images/extensions.png';
|
||||
if (strlen($sub["icon"]) > 0) {
|
||||
$icon_enterprise = false;
|
||||
if (isset($sub['enterprise'])) {
|
||||
$icon_enterprise = (bool)$sub['enterprise'];
|
||||
}
|
||||
|
||||
if ($icon_enterprise) {
|
||||
$imageIcon ='enterprise/extensions/'.$sub["icon"];
|
||||
}
|
||||
else {
|
||||
$imageIcon ='extensions/'.$sub["icon"];
|
||||
}
|
||||
|
||||
if (!file_exists(realpath($imageIcon)))
|
||||
$imageIcon = $imageIconDefault;
|
||||
}
|
||||
else {
|
||||
$imageIcon = $imageIconDefault;
|
||||
}
|
||||
|
||||
$submenu_output .= '<div style="background: url('.$imageIcon.') no-repeat; width: 16px; height: 16px; float: left; margin: 5px 0px 0px 3px;"> </div>';
|
||||
}
|
||||
|
|
|
@ -295,6 +295,7 @@ if (check_acl ($config['id_user'], 0, "AR")) {
|
|||
$menu[$operationModeMenu['fatherId']]['sub'][$operationModeMenu['sec2']]["icon"] = $operationModeMenu['icon'];
|
||||
$menu[$operationModeMenu['fatherId']]['sub'][$operationModeMenu['sec2']]["sec"] = 'extensions';
|
||||
$menu[$operationModeMenu['fatherId']]['sub'][$operationModeMenu['sec2']]["extension"] = true;
|
||||
$menu[$operationModeMenu['fatherId']]['sub'][$operationModeMenu['sec2']]["extension"] = $extension['enterprise'];
|
||||
$menu[$operationModeMenu['fatherId']]['hasExtensions'] = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue