Menu: New option to set icon colors.
This commit is contained in:
@@ -184,6 +184,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_color";
|
||||
$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]['search'] = "true";
|
||||
|
||||
@@ -540,6 +540,33 @@ $text['label-icon']['zh-cn'] = "图标";
|
||||
$text['label-icon']['ja-jp'] = "アイコン";
|
||||
$text['label-icon']['ko-kr'] = "아이콘";
|
||||
|
||||
$text['label-icon_color']['en-us'] = "Icon Color";
|
||||
$text['label-icon_color']['en-gb'] = "Icon Color";
|
||||
$text['label-icon_color']['ar-eg'] = "لون الأيقونة";
|
||||
$text['label-icon_color']['de-at'] = "Symbolfarbe";
|
||||
$text['label-icon_color']['de-ch'] = "Symbolfarbe";
|
||||
$text['label-icon_color']['de-de'] = "Symbolfarbe";
|
||||
$text['label-icon_color']['el-gr'] = "Χρώμα εικονιδίου";
|
||||
$text['label-icon_color']['es-cl'] = "Color del icono";
|
||||
$text['label-icon_color']['es-mx'] = "Color del icono";
|
||||
$text['label-icon_color']['fr-ca'] = "Couleur de l'icône";
|
||||
$text['label-icon_color']['fr-fr'] = "Couleur de l'icône";
|
||||
$text['label-icon_color']['he-il'] = "צבע סמל";
|
||||
$text['label-icon_color']['it-it'] = "Colore dell'icona";
|
||||
$text['label-icon_color']['ka-ge'] = "ხატულა ფერი";
|
||||
$text['label-icon_color']['nl-nl'] = "Icoon Kleur";
|
||||
$text['label-icon_color']['pl-pl'] = "Kolor ikony";
|
||||
$text['label-icon_color']['pt-br'] = "Cor do ícone";
|
||||
$text['label-icon_color']['pt-pt'] = "Cor do ícone";
|
||||
$text['label-icon_color']['ro-ro'] = "Culoarea pictogramei";
|
||||
$text['label-icon_color']['ru-ru'] = "Цвет значка";
|
||||
$text['label-icon_color']['sv-se'] = "Ikon färg";
|
||||
$text['label-icon_color']['uk-ua'] = "Колір значка";
|
||||
$text['label-icon_color']['tr-tr'] = "Simge Rengi";
|
||||
$text['label-icon_color']['zh-cn'] = "图标颜色";
|
||||
$text['label-icon_color']['ja-jp'] = "アイコンの色";
|
||||
$text['label-icon_color']['ko-kr'] = "아이콘 색상";
|
||||
|
||||
$text['label-groups']['en-us'] = "Groups";
|
||||
$text['label-groups']['en-gb'] = "Groups";
|
||||
$text['label-groups']['ar-eg'] = "المجموعات";
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
$menu_item_link = '';
|
||||
$menu_item_category = '';
|
||||
$menu_item_icon = '';
|
||||
$menu_item_icon_color = '';
|
||||
$menu_item_description = '';
|
||||
$menu_item_protected = '';
|
||||
$menu_item_parent_uuid = null;
|
||||
@@ -102,6 +103,7 @@
|
||||
$menu_item_link = $_POST["menu_item_link"] ?? '';
|
||||
$menu_item_category = $_POST["menu_item_category"] ?? '';
|
||||
$menu_item_icon = $_POST["menu_item_icon"] ?? '';
|
||||
$menu_item_icon_color = $_POST["menu_item_icon_color"] ?? '';
|
||||
$menu_item_description = $_POST["menu_item_description"] ?? '';
|
||||
$menu_item_protected = $_POST["menu_item_protected"] ?? '';
|
||||
$menu_item_parent_uuid = $_POST["menu_item_parent_uuid"] ?? null;
|
||||
@@ -173,6 +175,7 @@
|
||||
$array['menu_items'][0]['menu_item_link'] = $menu_item_link;
|
||||
$array['menu_items'][0]['menu_item_category'] = $menu_item_category;
|
||||
$array['menu_items'][0]['menu_item_icon'] = $menu_item_icon;
|
||||
$array['menu_items'][0]['menu_item_icon_color'] = $menu_item_icon_color;
|
||||
$array['menu_items'][0]['menu_item_description'] = $menu_item_description;
|
||||
$array['menu_items'][0]['menu_item_protected'] = $menu_item_protected;
|
||||
$array['menu_items'][0]['menu_item_uuid'] = $menu_item_uuid;
|
||||
@@ -198,6 +201,7 @@
|
||||
$array['menu_items'][0]['menu_item_link'] = $menu_item_link;
|
||||
$array['menu_items'][0]['menu_item_category'] = $menu_item_category;
|
||||
$array['menu_items'][0]['menu_item_icon'] = $menu_item_icon;
|
||||
$array['menu_items'][0]['menu_item_icon_color'] = $menu_item_icon_color;
|
||||
$array['menu_items'][0]['menu_item_description'] = $menu_item_description;
|
||||
$array['menu_items'][0]['menu_item_protected'] = $menu_item_protected;
|
||||
$array['menu_items'][0]['menu_item_uuid'] = $menu_item_uuid;
|
||||
@@ -313,6 +317,7 @@
|
||||
$menu_item_link = $row["menu_item_link"];
|
||||
$menu_item_category = $row["menu_item_category"];
|
||||
$menu_item_icon = $row["menu_item_icon"];
|
||||
$menu_item_icon_color = $row["menu_item_icon_color"];
|
||||
$menu_item_description = $row["menu_item_description"];
|
||||
$menu_item_protected = $row["menu_item_protected"];
|
||||
$menu_item_parent_uuid = $row["menu_item_parent_uuid"];
|
||||
@@ -430,7 +435,7 @@
|
||||
echo "<table cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td>\n";
|
||||
echo " <select class='formfld' name='menu_item_icon' id='selected_icon' onchange=\"$('#icons').slideUp(200); $('#icon_search').fadeOut(200, function() { $('#grid_icon').fadeIn(); });\">\n";
|
||||
echo " <select class='formfld' name='menu_item_icon' id='selected_icon' onchange=\"if ($(this).val()) { $('#icons').slideUp(200); $('#icon_search').fadeOut(200, function() { $('#grid_icon').fadeIn(); }); $('#icon_color').show(); } else { $('#icon_color').hide(); }\">\n";
|
||||
echo " <option value=''></option>\n";
|
||||
foreach ($font_awesome_icons as $icon) {
|
||||
$selected = $menu_item_icon == implode(' ', $icon['classes']) ? "selected" : null;
|
||||
@@ -470,6 +475,11 @@
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
|
||||
echo " <tr id='icon_color' ".(empty($menu_item_icon) ? "style='display: none;'" : null).">";
|
||||
echo " <td class='vncell'>".$text['label-icon_color']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld colorpicker' name='menu_item_icon_color' value=\"".escape($menu_item_icon_color)."\"></td>";
|
||||
echo " </tr>";
|
||||
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-parent_menu']."</td>";
|
||||
echo " <td class='vtable'>";
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
$menu_item_title = $row2['menu_item_title'];
|
||||
$menu_item_link = $row2['menu_item_link'];
|
||||
$menu_item_icon = $row2['menu_item_icon'];
|
||||
$menu_item_icon_color = $row2['menu_item_icon_color'];
|
||||
|
||||
//get the groups that have been assigned to the menu
|
||||
$sql = "select ";
|
||||
@@ -149,7 +150,7 @@
|
||||
}
|
||||
|
||||
//format icon
|
||||
$menu_item_icon = !empty($menu_item_icon) ? "<i class='".$menu_item_icon."' style='margin-left: 7px; margin-top: 2px; opacity: 0.4;'></i>" : null;
|
||||
$menu_item_icon = !empty($menu_item_icon) ? "<i class='".$menu_item_icon."' style='margin-left: 7px; margin-top: 2px; ".(!empty($menu_item_icon_color) ? "color: ".$menu_item_icon_color.";" : "opacity: 0.4;")."'></i>" : null;
|
||||
|
||||
//display the content of the list
|
||||
if (permission_exists('menu_item_edit')) {
|
||||
@@ -291,6 +292,7 @@
|
||||
$menu_item_title = $row['menu_item_title'];
|
||||
$menu_item_link = $row['menu_item_link'];
|
||||
$menu_item_icon = $row['menu_item_icon'];
|
||||
$menu_item_icon_color = $row['menu_item_icon_color'];
|
||||
$menu_item_protected = $row['menu_item_protected'];
|
||||
|
||||
//get the groups that have been assigned to the menu
|
||||
@@ -336,7 +338,7 @@
|
||||
}
|
||||
|
||||
//format icon
|
||||
$menu_item_icon = !empty($menu_item_icon) ? "<i class='".$menu_item_icon."' style='margin-left: 7px; margin-top: 2px; opacity: 0.4;'></i>" : null;
|
||||
$menu_item_icon = !empty($menu_item_icon) ? "<i class='".$menu_item_icon."' style='margin-left: 7px; margin-top: 2px; ".(!empty($menu_item_icon_color) ? "color: ".$menu_item_icon_color.";" : "opacity: 0.4;")."'></i>" : null;
|
||||
|
||||
//display the content of the list
|
||||
if (permission_exists('menu_item_edit')) {
|
||||
@@ -437,4 +439,4 @@
|
||||
|
||||
echo "</script>\n";
|
||||
|
||||
?>
|
||||
?>
|
||||
Reference in New Issue
Block a user