Menu Manager: Add ability to customize main and sub menu icons.
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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++;
|
||||
|
||||
@@ -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";
|
||||
|
||||
+61
-68
@@ -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';
|
||||
|
||||
?>
|
||||
|
||||
@@ -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'>";
|
||||
|
||||
Reference in New Issue
Block a user