Menu Manager: Add ability to customize main and sub menu icons.

This commit is contained in:
reliberate
2016-05-02 14:42:06 -06:00
parent 46611580ac
commit 5956a3a17f
11 changed files with 1193 additions and 88 deletions

View File

@@ -13,6 +13,7 @@
$apps[$x]['menu'][0]['uuid'] = "1f59d07b-b4f7-4f9e-bde9-312cf491d66e";
$apps[$x]['menu'][0]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
$apps[$x]['menu'][0]['category'] = "external";
$apps[$x]['menu'][0]['icon'] = "glyphicon-new-window";
$apps[$x]['menu'][0]['path'] = "<!--{project_path}-->/app/adminer/index.php";
$apps[$x]['menu'][0]['groups'][] = "superadmin";

View File

@@ -6,13 +6,14 @@ $apps[$x]['menu'][0]['title']['es-mx'] = "Plan de Marcado";
$apps[$x]['menu'][0]['title']['fr-fr'] = "Dialplan";
$apps[$x]['menu'][0]['title']['pt-pt'] = "Dialplan";
$apps[$x]['menu'][0]['title']['pt-br'] = "Dialplan";
$apps[$x]['menu'][0]['title']['pl'] = "Dialplan ";
$apps[$x]['menu'][0]['title']['pl'] = "Dialplan";
$apps[$x]['menu'][0]['title']['uk'] = "Маршрутизація";
$apps[$x]['menu'][0]['title']['sv-se'] = "Nummerplan";
$apps[$x]['menu'][0]['title']['de-at'] = "Wählplan";
$apps[$x]['menu'][0]['uuid'] = "b94e8bd9-9eb5-e427-9c26-ff7a6c21552a";
$apps[$x]['menu'][0]['parent_uuid'] = "";
$apps[$x]['menu'][0]['category'] = "internal";
$apps[$x]['menu'][0]['icon'] = "glyphicon-transfer";
$apps[$x]['menu'][0]['path'] = "";
$apps[$x]['menu'][0]['order'] = "15";
$apps[$x]['menu'][0]['groups'][] = "admin";

View File

@@ -15,6 +15,7 @@
$apps[$x]['menu'][$y]['uuid'] = "f1905fec-0577-daef-6045-59d09b7d3f94";
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
$apps[$x]['menu'][$y]['category'] = "external";
$apps[$x]['menu'][$y]['icon'] = "glyphicon-new-window";
$apps[$x]['menu'][$y]['path'] = "/app/edit/index.php?dir=scripts";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
$y++;
@@ -32,6 +33,7 @@
$apps[$x]['menu'][$y]['uuid'] = "16013877-606a-2a05-7d6a-c1b215839131";
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
$apps[$x]['menu'][$y]['category'] = "external";
$apps[$x]['menu'][$y]['icon'] = "glyphicon-new-window";
$apps[$x]['menu'][$y]['path'] = "/app/edit/index.php?dir=xml";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
$y++;
@@ -49,6 +51,7 @@
$apps[$x]['menu'][$y]['uuid'] = "57773542-a565-1a29-605d-6535da1a0870";
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
$apps[$x]['menu'][$y]['category'] = "external";
$apps[$x]['menu'][$y]['icon'] = "glyphicon-new-window";
$apps[$x]['menu'][$y]['path'] = "/app/edit/index.php?dir=provision";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
$y++;
@@ -66,6 +69,7 @@
$apps[$x]['menu'][$y]['uuid'] = "eae1f2d6-789b-807c-cc26-44501e848693";
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
$apps[$x]['menu'][$y]['category'] = "external";
$apps[$x]['menu'][$y]['icon'] = "glyphicon-new-window";
$apps[$x]['menu'][$y]['path'] = "/app/edit/index.php?dir=php";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
$y++;
@@ -83,6 +87,7 @@
$apps[$x]['menu'][$y]['uuid'] = "c3db739e-89f9-0fa2-44ce-0f4c2ff43b1a";
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
$apps[$x]['menu'][$y]['category'] = "external";
$apps[$x]['menu'][$y]['icon'] = "glyphicon-new-window";
$apps[$x]['menu'][$y]['path'] = "/app/edit/index.php?dir=grammar";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";

View File

@@ -12,6 +12,7 @@ $apps[$x]['menu'][0]['title']['de-at'] = "Applikationen";
$apps[$x]['menu'][0]['uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
$apps[$x]['menu'][0]['parent_uuid'] = "";
$apps[$x]['menu'][0]['category'] = "internal";
$apps[$x]['menu'][0]['icon'] = "glyphicon-send";
$apps[$x]['menu'][0]['path'] = "";
$apps[$x]['menu'][0]['order'] = "20";
$apps[$x]['menu'][0]['groups'][] = "user";

View File

@@ -149,6 +149,10 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "menu_item_icon";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "menu_item_category";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
@@ -163,7 +167,6 @@
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "menu_item_description";
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "menu_item_desc";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;

View File

@@ -180,6 +180,16 @@ $text['label-language']['uk'] = "Мова";
$text['label-language']['sv-se'] = "Språk";
$text['label-language']['de-at'] = "Sprache";
$text['label-icon']['en-us'] = "Icon";
$text['label-icon']['es-cl'] = "Icono";
$text['label-icon']['pt-pt'] = "Ícone";
$text['label-icon']['fr-fr'] = "Icône";
$text['label-icon']['pt-br'] = "Ícone";
$text['label-icon']['pl'] = "Ikona";
$text['label-icon']['uk'] = "іконка";
$text['label-icon']['sv-se'] = "Ikon";
$text['label-icon']['de-at'] = "Symbol";
$text['label-groups']['en-us'] = "Groups";
$text['label-groups']['es-cl'] = "Grupos";
$text['label-groups']['pt-pt'] = "Grupos";

View File

@@ -27,6 +27,7 @@ $apps[$x]['menu'][1]['title']['de-at'] = "Home";
$apps[$x]['menu'][1]['uuid'] = "02194288-6d56-6d3e-0b1a-d53a2bc10788";
$apps[$x]['menu'][1]['parent_uuid'] = "";
$apps[$x]['menu'][1]['category'] = "internal";
$apps[$x]['menu'][1]['icon'] = "glyphicon-home";
$apps[$x]['menu'][1]['path'] = "";
$apps[$x]['menu'][1]['order'] = "5";
$apps[$x]['menu'][1]['groups'][] = "user";
@@ -45,92 +46,84 @@ $apps[$x]['menu'][2]['title']['de-at'] = "Konten";
$apps[$x]['menu'][2]['uuid'] = "bc96d773-ee57-0cdd-c3ac-2d91aba61b55";
$apps[$x]['menu'][2]['parent_uuid'] = "";
$apps[$x]['menu'][2]['category'] = "internal";
$apps[$x]['menu'][2]['icon'] = "glyphicon-user";
$apps[$x]['menu'][2]['path'] = "";
$apps[$x]['menu'][2]['order'] = "10";
$apps[$x]['menu'][2]['groups'][] = "admin";
$apps[$x]['menu'][2]['groups'][] = "superadmin";
$apps[$x]['menu'][3]['title']['en-us'] = "Dialplan";
$apps[$x]['menu'][3]['title']['pl'] = "Dialplan ";
$apps[$x]['menu'][3]['title']['uk'] = "Маршрутизація (Dialplan)";
$apps[$x]['menu'][3]['title']['sv-se'] = "Nummerplan";
$apps[$x]['menu'][3]['title']['de-at'] = "Wählplan";
$apps[$x]['menu'][3]['uuid'] = "b94e8bd9-9eb5-e427-9c26-ff7a6c21552a";
$apps[$x]['menu'][3]['title']['en-us'] = "Status";
$apps[$x]['menu'][3]['title']['es-cl'] = "Estado";
$apps[$x]['menu'][3]['title']['fr-fr'] = "Etat";
$apps[$x]['menu'][3]['title']['pt-pt'] = "Estado";
$apps[$x]['menu'][3]['title']['pt-br'] = "Estados";
$apps[$x]['menu'][3]['title']['pl'] = "Status ";
$apps[$x]['menu'][3]['title']['uk'] = "Статус";
$apps[$x]['menu'][3]['title']['sv-se'] = "Status";
$apps[$x]['menu'][3]['title']['de-at'] = "Status";
$apps[$x]['menu'][3]['uuid'] = "0438b504-8613-7887-c420-c837ffb20cb1";
$apps[$x]['menu'][3]['parent_uuid'] = "";
$apps[$x]['menu'][3]['category'] = "internal";
$apps[$x]['menu'][3]['icon'] = "glyphicon-equalizer";
$apps[$x]['menu'][3]['path'] = "";
$apps[$x]['menu'][3]['order'] = "15";
$apps[$x]['menu'][3]['order'] = "25";
$apps[$x]['menu'][3]['groups'][] = "user";
$apps[$x]['menu'][3]['groups'][] = "admin";
$apps[$x]['menu'][3]['groups'][] = "superadmin";
$apps[$x]['menu'][4]['title']['en-us'] = "Status";
$apps[$x]['menu'][4]['title']['es-cl'] = "Estado";
$apps[$x]['menu'][4]['title']['fr-fr'] = "Etat";
$apps[$x]['menu'][4]['title']['pt-pt'] = "Estado";
$apps[$x]['menu'][4]['title']['pt-br'] = "Estados";
$apps[$x]['menu'][4]['title']['pl'] = "Status ";
$apps[$x]['menu'][4]['title']['uk'] = "Статус";
$apps[$x]['menu'][4]['title']['sv-se'] = "Status";
$apps[$x]['menu'][4]['title']['de-at'] = "Status";
$apps[$x]['menu'][4]['uuid'] = "0438b504-8613-7887-c420-c837ffb20cb1";
$apps[$x]['menu'][4]['title']['en-us'] = "Advanced";
$apps[$x]['menu'][4]['title']['es-cl'] = "Avanzado";
$apps[$x]['menu'][4]['title']['fr-fr'] = "Avancé";
$apps[$x]['menu'][4]['title']['pt-pt'] = "Avançado";
$apps[$x]['menu'][4]['title']['pt-br'] = "Avançado";
$apps[$x]['menu'][4]['title']['pl'] = "Zaawansowany";
$apps[$x]['menu'][4]['title']['uk'] = "Розширені";
$apps[$x]['menu'][4]['title']['sv-se'] = "Avancerad";
$apps[$x]['menu'][4]['title']['de-at'] = "Erweitert";
$apps[$x]['menu'][4]['uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
$apps[$x]['menu'][4]['parent_uuid'] = "";
$apps[$x]['menu'][4]['category'] = "internal";
$apps[$x]['menu'][4]['icon'] = "glyphicon-cog";
$apps[$x]['menu'][4]['path'] = "";
$apps[$x]['menu'][4]['order'] = "25";
$apps[$x]['menu'][4]['groups'][] = "user";
$apps[$x]['menu'][4]['groups'][] = "admin";
$apps[$x]['menu'][4]['order'] = "30";
$apps[$x]['menu'][4]['groups'][] = "superadmin";
$apps[$x]['menu'][4]['groups'][] = "admin";
$apps[$x]['menu'][5]['title']['en-us'] = "Advanced";
$apps[$x]['menu'][5]['title']['es-cl'] = "Avanzado";
$apps[$x]['menu'][5]['title']['fr-fr'] = "Avancé";
$apps[$x]['menu'][5]['title']['pt-pt'] = "Avançado";
$apps[$x]['menu'][5]['title']['pt-br'] = "Avançado";
$apps[$x]['menu'][5]['title']['pl'] = "Zaawansowany";
$apps[$x]['menu'][5]['title']['uk'] = "Розширені";
$apps[$x]['menu'][5]['title']['sv-se'] = "Avancerad";
$apps[$x]['menu'][5]['title']['de-at'] = "Erweitert";
$apps[$x]['menu'][5]['uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
$apps[$x]['menu'][5]['title']['en-us'] = "Login";
$apps[$x]['menu'][5]['title']['es-cl'] = "Ingresar";
$apps[$x]['menu'][5]['title']['es-mx'] = "";
$apps[$x]['menu'][5]['title']['de-de'] = "";
$apps[$x]['menu'][5]['title']['de-ch'] = "";
$apps[$x]['menu'][5]['title']['de-at'] = "";
$apps[$x]['menu'][5]['title']['fr-fr'] = "Connexion";
$apps[$x]['menu'][5]['title']['fr-ca'] = "";
$apps[$x]['menu'][5]['title']['fr-ch'] = "";
$apps[$x]['menu'][5]['title']['pt-pt'] = "Entrar";
$apps[$x]['menu'][5]['title']['pt-br'] = "";
$apps[$x]['menu'][5]['uuid'] = "c85bf816-b88d-40fa-8634-11b456928afa";
$apps[$x]['menu'][5]['parent_uuid'] = "";
$apps[$x]['menu'][5]['category'] = "internal";
$apps[$x]['menu'][5]['path'] = "";
$apps[$x]['menu'][5]['order'] = "30";
$apps[$x]['menu'][5]['groups'][] = "superadmin";
$apps[$x]['menu'][5]['groups'][] = "admin";
$apps[$x]['menu'][5]['icon'] = "glyphicon-log-in";
$apps[$x]['menu'][5]['path'] = "/login.php";
$apps[$x]['menu'][5]['groups'][] = "public";
$apps[$x]['menu'][5]['order'] = "99";
$apps[$x]['menu'][6]['title']['en-us'] = "Login";
$apps[$x]['menu'][6]['title']['es-cl'] = "Ingresar";
$apps[$x]['menu'][6]['title']['es-mx'] = "";
$apps[$x]['menu'][6]['title']['de-de'] = "";
$apps[$x]['menu'][6]['title']['de-ch'] = "";
$apps[$x]['menu'][6]['title']['de-at'] = "";
$apps[$x]['menu'][6]['title']['fr-fr'] = "Connexion";
$apps[$x]['menu'][6]['title']['fr-ca'] = "";
$apps[$x]['menu'][6]['title']['fr-ch'] = "";
$apps[$x]['menu'][6]['title']['pt-pt'] = "Entrar";
$apps[$x]['menu'][6]['title']['pt-br'] = "";
$apps[$x]['menu'][6]['uuid'] = "c85bf816-b88d-40fa-8634-11b456928afa";
$apps[$x]['menu'][6]['parent_uuid'] = "";
$apps[$x]['menu'][6]['category'] = "internal";
$apps[$x]['menu'][6]['path'] = "/login.php";
$apps[$x]['menu'][6]['groups'][] = "public";
$apps[$x]['menu'][6]['order'] = "99";
$apps[$x]['menu'][7]['title']['en-us'] = 'Logout';
$apps[$x]['menu'][7]['title']['es-mx'] = 'Salir';
$apps[$x]['menu'][7]['title']['pt-pt'] = 'Sair';
$apps[$x]['menu'][7]['title']['pt-br'] = '';
$apps[$x]['menu'][7]['title']['de-at'] = 'Abmelden';
$apps[$x]['menu'][7]['title']['fr-fr'] = 'Déconnexion';
$apps[$x]['menu'][7]['title']['pl'] = 'Wyloguj';
$apps[$x]['menu'][7]['title']['uk'] = 'вийти';
$apps[$x]['menu'][7]['title']['uk'] = 'Logga Ut';
$apps[$x]['menu'][7]['uuid'] = '0d29e9f4-0c9b-9d8d-cd2d-454899dc9bc4';
$apps[$x]['menu'][7]['parent_uuid'] = '02194288-6d56-6d3e-0b1a-d53a2bc10788';
$apps[$x]['menu'][7]['category'] = 'internal';
$apps[$x]['menu'][7]['path'] = '/logout.php';
$apps[$x]['menu'][7]['groups'][] = 'user';
$apps[$x]['menu'][7]['groups'][] = 'admin';
$apps[$x]['menu'][7]['groups'][] = 'superadmin';
$apps[$x]['menu'][6]['title']['en-us'] = 'Logout';
$apps[$x]['menu'][6]['title']['es-mx'] = 'Salir';
$apps[$x]['menu'][6]['title']['pt-pt'] = 'Sair';
$apps[$x]['menu'][6]['title']['pt-br'] = '';
$apps[$x]['menu'][6]['title']['de-at'] = 'Abmelden';
$apps[$x]['menu'][6]['title']['fr-fr'] = 'Déconnexion';
$apps[$x]['menu'][6]['title']['pl'] = 'Wyloguj';
$apps[$x]['menu'][6]['title']['uk'] = 'вийти';
$apps[$x]['menu'][6]['title']['uk'] = 'Logga Ut';
$apps[$x]['menu'][6]['uuid'] = '0d29e9f4-0c9b-9d8d-cd2d-454899dc9bc4';
$apps[$x]['menu'][6]['parent_uuid'] = '02194288-6d56-6d3e-0b1a-d53a2bc10788';
$apps[$x]['menu'][6]['category'] = 'internal';
$apps[$x]['menu'][6]['icon'] = "glyphicon-log-out";
$apps[$x]['menu'][6]['path'] = '/logout.php';
$apps[$x]['menu'][6]['groups'][] = 'user';
$apps[$x]['menu'][6]['groups'][] = 'admin';
$apps[$x]['menu'][6]['groups'][] = 'superadmin';
?>

View File

@@ -80,6 +80,7 @@ else {
$menu_item_title = check_str($_POST["menu_item_title"]);
$menu_item_link = check_str($_POST["menu_item_link"]);
$menu_item_category = check_str($_POST["menu_item_category"]);
$menu_item_icon = check_str($_POST["menu_item_icon"]);
$menu_item_description = check_str($_POST["menu_item_description"]);
$menu_item_protected = check_str($_POST["menu_item_protected"]);
//$menu_item_uuid = check_str($_POST["menu_item_uuid"]);
@@ -149,6 +150,7 @@ else {
$sql .= "menu_item_title, ";
$sql .= "menu_item_link, ";
$sql .= "menu_item_category, ";
$sql .= "menu_item_icon, ";
$sql .= "menu_item_description, ";
$sql .= "menu_item_protected, ";
$sql .= "menu_item_uuid, ";
@@ -165,6 +167,7 @@ else {
$sql .= "'$menu_item_title', ";
$sql .= "'$menu_item_link', ";
$sql .= "'$menu_item_category', ";
$sql .= "'$menu_item_icon', ";
$sql .= "'$menu_item_description', ";
$sql .= "'$menu_item_protected', ";
$sql .= "'".$menu_item_uuid."', ";
@@ -188,6 +191,7 @@ else {
$sql .= "menu_item_title = '$menu_item_title', ";
$sql .= "menu_item_link = '$menu_item_link', ";
$sql .= "menu_item_category = '$menu_item_category', ";
$sql .= "menu_item_icon = '$menu_item_icon', ";
$sql .= "menu_item_description = '$menu_item_description', ";
$sql .= "menu_item_protected = '$menu_item_protected', ";
if (strlen($menu_item_parent_uuid) == 0) {
@@ -307,6 +311,7 @@ else {
$menu_item_title = $row["menu_item_title"];
$menu_item_link = $row["menu_item_link"];
$menu_item_category = $row["menu_item_category"];
$menu_item_icon = $row["menu_item_icon"];
$menu_item_description = $row["menu_item_description"];
$menu_item_protected = $row["menu_item_protected"];
$menu_item_parent_uuid = $row["menu_item_parent_uuid"];
@@ -351,10 +356,12 @@ else {
echo " <td class='vncellreq'>".$text['label-title']."</td>";
echo " <td class='vtable'><input type='text' class='formfld' name='menu_item_title' value='$menu_item_title'></td>";
echo " </tr>";
echo " <tr>";
echo " <td class='vncellreq'>".$text['label-link']."</td>";
echo " <td class='vtable'><input type='text' class='formfld' name='menu_item_link' value='$menu_item_link'></td>";
echo " </tr>";
echo " <tr>";
echo " <td class='vncellreq'>".$text['label-category']."</td>";
echo " <td class='vtable'>";
@@ -366,6 +373,49 @@ else {
echo " </td>";
echo " </tr>";
echo " <tr>";
echo " <td class='vncell'>".$text['label-icon']."</td>";
echo " <td class='vtable' style='vertical-align: bottom;'>";
if (file_exists($_SERVER["PROJECT_ROOT"].'/resources/bootstrap/glyphicons.json')) {
$tmp_array = json_decode(file_get_contents($_SERVER["PROJECT_ROOT"].'/resources/bootstrap/glyphicons.json'), true);
if (is_array($tmp_array['icons']) && sizeof($tmp_array['icons']) > 0) {
// rebuild and sort array
foreach ($tmp_array['icons'] as $i => $glyphicon) {
$tmp_string = str_replace('glyphicon-', '', $glyphicon['id']);
$tmp_string = str_replace('-', ' ', $tmp_string);
$tmp_string = ucwords($tmp_string);
$glyphicons[$glyphicon['id']] = $tmp_string;
}
asort($glyphicons, SORT_STRING);
echo "<table cellpadding='0' cellspacing='0' border='0'>\n";
echo " <tr>\n";
echo " <td>\n";
echo " <select class='formfld' name='menu_item_icon' id='menu_item_icon' onchange=\"$('#glyphicons').slideUp(); $('#grid_icon').fadeIn();\">\n";
echo " <option value=''></option>\n";
foreach ($glyphicons as $glyphicon_class => $glyphicon_name) {
$selected = ($menu_item_icon == $glyphicon_class) ? "selected" : null;
echo " <option value='".$glyphicon_class."' ".$selected.">".$glyphicon_name."</option>\n";
}
echo " </select>\n";
echo " </td>\n";
echo " <td style='padding: 0 0 0 5px;'>\n";
echo " <button id='grid_icon' type='button' class='btn btn-default list_control_icon' style='font-size: 15px; padding-top: 1px; padding-left: 3px;' onclick=\"$('#glyphicons').slideToggle(); $(this).fadeOut();\"><span class='glyphicon glyphicon-th'></span></button>";
echo " </td>\n";
echo " </tr>\n";
echo "</table>\n";
echo "<div id='glyphicons' style='clear: both; display: none; padding-top: 10px; color: #000;'>";
foreach ($glyphicons as $glyphicon_class => $glyphicon_name) {
echo "<span class='glyphicon ".$glyphicon_class."' style='font-size: 24px; float: left; margin: 0 8px 8px 0; cursor: pointer; opacity: 0.3;' title='".$glyphicon_name."' onclick=\"$('#menu_item_icon').val('".$glyphicon_class."'); $('#glyphicons').slideUp(); $('#grid_icon').fadeIn();\" onmouseover=\"this.style.opacity='1';\" onmouseout=\"this.style.opacity='0.3';\"></span>\n";
}
echo "</div>";
}
}
else {
echo " <input type='text' class='formfld' name='menu_item_icon' value='".$menu_item_icon."'>";
}
echo " </td>";
echo " </tr>";
echo " <tr>";
echo " <td class='vncell'>".$text['label-parent_menu']."</td>";
echo " <td class='vtable'>";

File diff suppressed because it is too large Load Diff

View File

@@ -99,6 +99,7 @@ if (!class_exists('menu')) {
$menu_item_uuid = $menu['uuid'];
$menu_item_parent_uuid = $menu['parent_uuid'];
$menu_item_category = $menu['category'];
$menu_item_icon = $menu['icon'];
$menu_item_path = $menu['path'];
$menu_item_order = $menu['order'];
$menu_item_description = $menu['desc'];
@@ -120,6 +121,7 @@ if (!class_exists('menu')) {
$sql .= "menu_item_title, ";
$sql .= "menu_item_link, ";
$sql .= "menu_item_category, ";
$sql .= "menu_item_icon, ";
if (strlen($menu_item_order) > 0) {
$sql .= "menu_item_order, ";
}
@@ -135,6 +137,7 @@ if (!class_exists('menu')) {
$sql .= "'".check_str($menu_item_title)."', ";
$sql .= "'$menu_item_path', ";
$sql .= "'$menu_item_category', ";
$sql .= "'$menu_item_icon', ";
if (strlen($menu_item_order) > 0) {
$sql .= "'$menu_item_order', ";
}
@@ -404,7 +407,7 @@ if (!class_exists('menu')) {
//get the menu from the database
if (strlen($sql) == 0) { //default sql for base of the menu
$sql = "select i.menu_item_link, l.menu_item_title as menu_language_title, i.menu_item_title, i.menu_item_protected, i.menu_item_category, i.menu_item_uuid, i.menu_item_parent_uuid ";
$sql = "select i.menu_item_link, l.menu_item_title as menu_language_title, i.menu_item_title, i.menu_item_protected, i.menu_item_category, i.menu_item_icon, i.menu_item_uuid, i.menu_item_parent_uuid ";
$sql .= "from v_menu_items as i, v_menu_languages as l ";
$sql .= "where i.menu_item_uuid = l.menu_item_uuid ";
$sql .= "and l.menu_language = '".$_SESSION['domain']['language']['code']."' ";
@@ -475,7 +478,7 @@ if (!class_exists('menu')) {
$menu_item_level = $menu_item_level+1;
//get the child menu from the database
$sql = "select i.menu_item_link, l.menu_item_title as menu_language_title, i.menu_item_title, i.menu_item_protected, i.menu_item_category, i.menu_item_uuid, i.menu_item_parent_uuid ";
$sql = "select i.menu_item_link, l.menu_item_title as menu_language_title, i.menu_item_title, i.menu_item_protected, i.menu_item_category, i.menu_item_icon, i.menu_item_uuid, i.menu_item_parent_uuid ";
$sql .= "from v_menu_items as i, v_menu_languages as l ";
$sql .= "where i.menu_item_uuid = l.menu_item_uuid ";
$sql .= "and l.menu_language = '".$_SESSION['domain']['language']['code']."' ";
@@ -513,6 +516,7 @@ if (!class_exists('menu')) {
//set the variables
$menu_item_link = $row['menu_item_link'];
$menu_item_category = $row['menu_item_category'];
$menu_item_icon = $row['menu_item_icon'];
$menu_item_uuid = $row['menu_item_uuid'];
$menu_item_parent_uuid = $row['menu_item_parent_uuid'];

View File

@@ -2048,17 +2048,13 @@
}
$mod_a_2 = ($menu_parent['menu_item_link'] != '') ? $menu_parent['menu_item_link'] : '#';
$mod_a_3 = ($menu_parent['menu_item_category'] == 'external') ? "target='_blank' " : null;
if ($_SESSION['theme']['menu_main_icons']['boolean'] == 'true' || $_SESSION['theme']['menu_main_icons']['boolean'] == '') {
switch ($menu_parent['menu_item_title']) {
case "Home": $glyph = 'home'; break;
case "Accounts": $glyph = 'user'; break;
case "Dialplan": $glyph = 'transfer'; break;
case "Apps": $glyph = 'send'; break;
case "Status": $glyph = 'equalizer'; break;
case "Advanced": $glyph = 'cog'; break;
default: $glyph = null;
if ($_SESSION['theme']['menu_main_icons']['boolean'] != 'false') {
if ($menu_parent['menu_item_icon'] != '' && substr_count($menu_parent['menu_item_icon'], 'glyphicon-') > 0) {
$menu_main_icon = "<span class='glyphicon ".$menu_parent['menu_item_icon']."' title=\"".$menu_parent['menu_language_title']."\"></span>";
}
else {
unset($menu_main_icon);
}
$menu_main_icon = ($glyph != '') ? "<span class='glyphicon glyphicon-".$glyph."' title=\"".$menu_parent['menu_language_title']."\"></span>" : null;
$menu_main_item = "<span class='hidden-sm'>".$menu_parent['menu_language_title']."</span>";
}
else {
@@ -2079,14 +2075,15 @@
$mod_a_2 = PROJECT_PATH . $mod_a_2;
}
$mod_a_3 = ($menu_sub['menu_item_category'] == 'external') ? "target='_blank' " : null;
if ($_SESSION['theme']['menu_sub_icons']['boolean'] == 'true') {
$mod_nw = ($menu_sub['menu_item_category'] == 'external') ? "<span class='glyphicon glyphicon-new-window'></span>" : null;
switch ($menu_sub['menu_item_title']) {
case 'Logout': $mod_icon = "<span class='glyphicon glyphicon-log-out'></span>"; break;
default: $mod_icon = null;
if ($_SESSION['theme']['menu_sub_icons']['boolean'] != 'false') {
if ($menu_sub['menu_item_icon'] != '' && substr_count($menu_sub['menu_item_icon'], 'glyphicon-') > 0) {
$menu_sub_icon = "<span class='glyphicon ".$menu_sub['menu_item_icon']."'></span>";
}
else {
unset($menu_sub_icon);
}
}
echo "<li><a href='".$mod_a_2."' ".$mod_a_3.">".(($_SESSION['theme']['menu_sub_icons']) ? "<span class='glyphicon glyphicon-minus visible-xs pull-left' style='margin: 4px 10px 0 25px;'></span>" : null).$menu_sub['menu_language_title'].$mod_icon.$mod_nw."</a></li>\n";
echo "<li><a href='".$mod_a_2."' ".$mod_a_3.">".(($_SESSION['theme']['menu_sub_icons']) ? "<span class='glyphicon glyphicon-minus visible-xs pull-left' style='margin: 4px 10px 0 25px;'></span>" : null).$menu_sub['menu_language_title'].$menu_sub_icon."</a></li>\n";
}
echo "</ul>\n";
}