[Rebranding] Added a header to white backgrounds and make the favicon and the mobile console configurable
This commit is contained in:
parent
063865e179
commit
750ed29ac9
|
@ -2,6 +2,7 @@ START TRANSACTION;
|
|||
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
|
||||
|
||||
UPDATE talert_actions SET name='Monitoring Event' WHERE name='Pandora FMS Event';
|
||||
|
||||
|
|
|
@ -1163,6 +1163,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '3
|
|||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 13);
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
|
||||
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
|
||||
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '720');
|
||||
|
|
|
@ -61,7 +61,7 @@ foreach ($files as $file) {
|
|||
}
|
||||
}
|
||||
|
||||
$logo = ui_get_custom_header_logo();
|
||||
$logo = ui_get_custom_header_logo(true);
|
||||
|
||||
if (! $id || ! file_exists ($help_file)) {
|
||||
echo '<div id="main_help" style="background-color: #fff;text-align:center; padding-top: 15px; padding-bottom: 15px; ">';
|
||||
|
|
|
@ -103,7 +103,7 @@ if (enterprise_installed()) {
|
|||
echo '</form>';
|
||||
echo '<div id="code_license_dialog" style="display: none; text-align: left;" title="' . __('Request new license') . '">';
|
||||
echo '<div id="logo">';
|
||||
html_print_image(ui_get_custom_header_logo());
|
||||
html_print_image(ui_get_custom_header_logo(true));
|
||||
echo '</div>';
|
||||
echo '' . __('To get your <b>%s Enterprise License</b>:', get_product_name()) . '<br />';
|
||||
echo '<ul>';
|
||||
|
|
|
@ -179,6 +179,32 @@ if(!enterprise_installed()){
|
|||
$open=true;
|
||||
}
|
||||
|
||||
// Custom favicon
|
||||
$files = list_files('images/custom_favicon', "ico", 1, 0);
|
||||
$table_styles->data[$row][0] = __('Custom favicon');
|
||||
$table_styles->data[$row][0] .= ui_print_help_tip(__('You can place your favicon into the folder images/custom_favicon/. This file should be in .ico format with a size of 16x16.'), true);
|
||||
$table_styles->data[$row][1] = html_print_select(
|
||||
$files,
|
||||
'custom_favicon',
|
||||
$config["custom_favicon"],
|
||||
'setup_visuals_change_favicon();',
|
||||
__('Default'),
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width:240px'
|
||||
);
|
||||
$table_styles->data[$row][1] .= " " . html_print_image(
|
||||
ui_get_favicon(),
|
||||
true,
|
||||
array('id' => 'favicon_preview')
|
||||
);
|
||||
$row++;
|
||||
|
||||
$table_styles->data[$row][0] = __('Custom background logo');
|
||||
$table_styles->data[$row][1] = html_print_select ($backgrounds_list,
|
||||
'login_background', $config["login_background"], '', __('Default'),
|
||||
'', true,false,true,'',false,'width:240px');
|
||||
|
@ -187,7 +213,6 @@ $table_styles->data[$row][1] .= " " .
|
|||
$row++;
|
||||
|
||||
$table_styles->data[$row][0] = __('Custom logo (header)') . ui_print_help_icon("custom_logo", true);
|
||||
|
||||
if(enterprise_installed()){
|
||||
$ent_files = list_files('enterprise/images/custom_logo', "png", 1, 0);
|
||||
$open_files = list_files('images/custom_logo', "png", 1, 0);
|
||||
|
@ -201,8 +226,24 @@ else{
|
|||
list_files('images/custom_logo', "png", 1, 0), 'custom_logo',
|
||||
$config["custom_logo"], '', '', '',true,false,true,'',$open,'width:240px');
|
||||
}
|
||||
$table_styles->data[$row][1] .= " " . html_print_button(__("View"), 'custom_logo_preview', $open, '', 'class="sub camera logo_preview"', true,false,$open,'visualmodal');
|
||||
$row++;
|
||||
|
||||
$table_styles->data[$row][1] .= " " . html_print_button(__("View"), 'custom_logo_preview', $open, '', 'class="sub camera logo_preview"', true,false,$open,'visualmodal');
|
||||
$table_styles->data[$row][0] = __('Custom logo (header white background)');
|
||||
if(enterprise_installed()){
|
||||
$ent_files = list_files('enterprise/images/custom_logo', "png", 1, 0);
|
||||
$open_files = list_files('images/custom_logo', "png", 1, 0);
|
||||
|
||||
$table_styles->data[$row][1] = html_print_select(
|
||||
array_merge($open_files, $ent_files), 'custom_logo_white_bg',
|
||||
$config["custom_logo_white_bg"], '', '', '',true,false,true,'',$open,'width:240px');
|
||||
}
|
||||
else{
|
||||
$table_styles->data[$row][1] = html_print_select(
|
||||
list_files('images/custom_logo', "png", 1, 0), 'custom_logo_white_bg',
|
||||
$config["custom_logo_white_bg"], '', '', '',true,false,true,'',$open,'width:240px');
|
||||
}
|
||||
$table_styles->data[$row][1] .= " " . html_print_button(__("View"), 'custom_logo_white_bg_preview', $open, '', 'class="sub camera logo_preview"', true,false,$open,'visualmodal');
|
||||
$row++;
|
||||
|
||||
$table_styles->data[$row][0] = __('Custom logo (login)') . ui_print_help_icon("custom_logo", true);
|
||||
|
@ -230,7 +271,6 @@ if(enterprise_installed()) {
|
|||
$config["custom_splash_login"], '', '', '',true,false,true,'',$open,'width:240px');
|
||||
|
||||
$table_styles->data[$row][1] .= " " . html_print_button(__("View"), 'custom_splash_login_preview', $open, '', 'class="sub camera logo_preview"', true,false,$open,'visualmodal');
|
||||
|
||||
$row++;
|
||||
}
|
||||
|
||||
|
@ -298,6 +338,26 @@ if(enterprise_installed()){
|
|||
);
|
||||
$table_styles->data[$row][1] .= " " . html_print_button(__("View"), 'custom_network_center_logo_preview', $open, '', 'class="sub camera logo_preview"', true,false,$open,'visualmodal');
|
||||
$row++;
|
||||
|
||||
// Custom center mobile console icon
|
||||
$table_styles->data[$row][0] = __('Custom mobile console icon');
|
||||
$table_styles->data[$row][0] .= ui_print_help_tip(__('You can place your custom logos into the folder enterprise/images/custom_general_logos/'), true);
|
||||
$table_styles->data[$row][1] = html_print_select(
|
||||
$files,
|
||||
'custom_mobile_console_logo',
|
||||
$config["custom_mobile_console_logo"],
|
||||
'',
|
||||
__('Default'),
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width:240px'
|
||||
);
|
||||
$table_styles->data[$row][1] .= " " . html_print_button(__("View"), 'custom_mobile_console_logo_preview', $open, '', 'class="sub camera logo_preview"', true,false,$open,'visualmodal');
|
||||
$row++;
|
||||
}
|
||||
|
||||
//login title1
|
||||
|
@ -1135,13 +1195,22 @@ $(document).ready (function () {
|
|||
});
|
||||
});
|
||||
|
||||
// Change the favicon preview when is changed
|
||||
function setup_visuals_change_favicon(meta) {
|
||||
var icon_name = $("select#custom_favicon option:selected").val();
|
||||
var icon_path = (icon_name == "")
|
||||
? "images/pandora.ico"
|
||||
: "images/custom_favicon/" + icon_name;
|
||||
$("#favicon_preview").attr("src", "<?php echo $config['homeurl'];?>" + icon_path);
|
||||
}
|
||||
|
||||
// Dialog loaders for the images previews
|
||||
$(".logo_preview").click (function(e) {
|
||||
// Init the vars
|
||||
var icon_name = '';
|
||||
var icon_path = '';
|
||||
var options = {
|
||||
title: "<?php echo __('Logo preview!'); ?>"
|
||||
title: "<?php echo __('Logo preview'); ?>"
|
||||
};
|
||||
|
||||
// Fill it seing the target has been clicked
|
||||
|
@ -1151,6 +1220,10 @@ $(".logo_preview").click (function(e) {
|
|||
icon_path = "<?php echo $config['homeurl']; if(enterprise_installed){ echo 'enterprise/'; } ?>images/custom_logo/" + icon_name;
|
||||
options.grayed = true;
|
||||
break;
|
||||
case 'button-custom_logo_white_bg_preview':
|
||||
icon_name = $("select#custom_logo_white_bg option:selected").val();
|
||||
icon_path = "<?php echo $config['homeurl']; if(enterprise_installed){ echo 'enterprise/'; } ?>images/custom_logo/" + icon_name;
|
||||
break;
|
||||
case 'button-custom_logo_login_preview':
|
||||
icon_name = $("select#custom_logo_login option:selected").val();
|
||||
icon_path = "<?php echo $config['homeurl']; if(enterprise_installed){ echo 'enterprise/'; } ?>images/custom_logo_login/" + icon_name;
|
||||
|
@ -1175,6 +1248,11 @@ $(".logo_preview").click (function(e) {
|
|||
icon_name = $("select#custom_network_center_logo option:selected").val();
|
||||
icon_path = "<?php echo $config['homeurl']; ?>enterprise/images/custom_general_logos/" + icon_name;
|
||||
break;
|
||||
case 'button-custom_mobile_console_logo_preview':
|
||||
icon_name = $("select#custom_mobile_console_logo option:selected").val();
|
||||
icon_path = "<?php echo $config['homeurl']; ?>enterprise/images/custom_general_logos/" + icon_name;
|
||||
options.title = "<?php echo __('Mobile console logo preview'); ?>";
|
||||
break;
|
||||
case 'button-login_background_preview':
|
||||
icon_name = $("select#login_background option:selected").val();
|
||||
icon_path = "<?php echo $config['homeurl']; ?>/images/backgrounds/" + icon_name;
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.1 KiB |
|
@ -500,8 +500,12 @@ function config_update_config () {
|
|||
if (!config_update_value ('flash_charts', (bool) get_parameter ('flash_charts')))
|
||||
$error_update[] = __('Interactive charts');
|
||||
|
||||
if (!config_update_value ('custom_favicon', (string) get_parameter ('custom_favicon')))
|
||||
$error_update[] = __('Custom favicon');
|
||||
if (!config_update_value ('custom_logo', (string) get_parameter ('custom_logo')))
|
||||
$error_update[] = __('Custom logo');
|
||||
if (!config_update_value ('custom_logo_white_bg', (string) get_parameter ('custom_logo_white_bg')))
|
||||
$error_update[] = __('Custom logo white background');
|
||||
if (!config_update_value ('custom_logo_login', (string) get_parameter ('custom_logo_login')))
|
||||
$error_update[] = __('Custom logo login');
|
||||
if (!config_update_value ('custom_splash_login', (string) get_parameter ('custom_splash_login')))
|
||||
|
@ -509,9 +513,11 @@ function config_update_config () {
|
|||
if (!config_update_value ('custom_docs_logo', (string) get_parameter ('custom_docs_logo')))
|
||||
$error_update[] = __('Custom documentation logo');
|
||||
if (!config_update_value ('custom_support_logo', (string) get_parameter ('custom_support_logo')))
|
||||
$error_update[] = __('Custom networkmap center logo');
|
||||
if (!config_update_value ('custom_network_center_logo', (string) get_parameter ('custom_network_center_logo')))
|
||||
$error_update[] = __('Custom support logo');
|
||||
if (!config_update_value ('custom_network_center_logo', (string) get_parameter ('custom_network_center_logo')))
|
||||
$error_update[] = __('Custom networkmap center logo');
|
||||
if (!config_update_value ('custom_mobile_console_logo', (string) get_parameter ('custom_mobile_console_logo')))
|
||||
$error_update[] = __('Custom networkmap center logo');
|
||||
if (!config_update_value ('custom_title1_login', (string) get_parameter ('custom_title1_login')))
|
||||
$error_update[] = __('Custom title1 login');
|
||||
if (!config_update_value ('custom_title2_login', (string) get_parameter ('custom_title2_login')))
|
||||
|
@ -1190,10 +1196,18 @@ function config_process_config () {
|
|||
config_update_value ('fixed_menu', false);
|
||||
}
|
||||
|
||||
if (!isset ($config["custom_favicon"])) {
|
||||
config_update_value ('custom_favicon', '');
|
||||
}
|
||||
|
||||
if (!isset ($config["custom_logo"])) {
|
||||
config_update_value ('custom_logo', 'pandora_logo_head_4.png');
|
||||
}
|
||||
|
||||
if (!isset ($config["custom_logo_white_bg"])) {
|
||||
config_update_value ('custom_logo_white_bg', 'pandora_logo_head_white_bg.png');
|
||||
}
|
||||
|
||||
if (!isset ($config["custom_logo_login"])) {
|
||||
config_update_value ('custom_logo_login', 'login_logo_v7.png');
|
||||
}
|
||||
|
@ -1214,6 +1228,10 @@ function config_process_config () {
|
|||
config_update_value ('custom_network_center_logo', '');
|
||||
}
|
||||
|
||||
if (!isset ($config["custom_mobile_console_logo"])) {
|
||||
config_update_value ('custom_mobile_console_logo', '');
|
||||
}
|
||||
|
||||
if (!isset ($config["custom_title1_login"])) {
|
||||
config_update_value ('custom_title1_login', __('WELCOME TO PANDORA FMS'));
|
||||
}
|
||||
|
|
|
@ -1355,14 +1355,9 @@ function ui_process_page_head ($string, $bitfield) {
|
|||
<meta name="author" content="' . get_copyright_notice() . '" />
|
||||
<meta name="copyright" content="(c) ' . get_copyright_notice() . '" />
|
||||
<meta name="robots" content="index, follow" />';
|
||||
if(defined ('METACONSOLE')){
|
||||
$output .='<link rel="icon" href="images/favicon_meta.ico" type="image/ico" />';
|
||||
}
|
||||
else{
|
||||
$output .='<link rel="icon" href="images/pandora.ico" type="image/ico" />';
|
||||
}
|
||||
$output .='<link rel="icon" href="' . ui_get_favicon() . '" type="image/ico" />';
|
||||
$output .='
|
||||
<link rel="shortcut icon" href="images/pandora.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="' . ui_get_favicon() . '" type="image/x-icon" />
|
||||
<link rel="alternate" href="operation/events/events_rss.php" title="Pandora RSS Feed" type="application/rss+xml" />';
|
||||
|
||||
if ($config["language"] != "en") {
|
||||
|
@ -3960,14 +3955,16 @@ function ui_get_support_logo () {
|
|||
* @return string with the path to logo. If it is not set, return the default value
|
||||
*
|
||||
*/
|
||||
function ui_get_custom_header_logo () {
|
||||
function ui_get_custom_header_logo ($white_bg = false) {
|
||||
global $config;
|
||||
|
||||
if (empty($config['enterprise_installed'])) {
|
||||
return 'images/pandora_tinylogo_open.png';
|
||||
}
|
||||
|
||||
$stored_logo = is_metaconsole() ? $config['meta_custom_logo'] : $config['custom_logo'];
|
||||
$stored_logo = is_metaconsole()
|
||||
? $config['meta_custom_logo']
|
||||
: $white_bg ? $config['custom_logo_white_bg'] : $config['custom_logo'];
|
||||
if (empty($stored_logo)) return 'images/pandora_tinylogo.png';
|
||||
return 'enterprise/images/custom_logo/' . $stored_logo;
|
||||
}
|
||||
|
@ -3987,4 +3984,41 @@ function ui_get_logo_to_center_networkmap () {
|
|||
|
||||
return 'enterprise/images/custom_general_logos/' . $config['custom_support_logo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the mobile console login logo
|
||||
*
|
||||
* @return string with the path to logo. If it is not set, return the default.
|
||||
*
|
||||
*/
|
||||
function ui_get_mobile_login_icon () {
|
||||
global $config;
|
||||
|
||||
if ((!enterprise_installed()) || empty($config['custom_mobile_console_logo'])) {
|
||||
return is_metaconsole()
|
||||
? "mobile/images/metaconsole_mobile.png"
|
||||
: "mobile/images/pandora_mobile_console.png";
|
||||
}
|
||||
|
||||
return 'enterprise/images/custom_general_logos/' . $config['custom_mobile_console_logo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the favicon
|
||||
*
|
||||
* @return string with the path to logo. If it is not set, return the default.
|
||||
*
|
||||
*/
|
||||
function ui_get_favicon () {
|
||||
global $config;
|
||||
|
||||
if (empty($config['custom_favicon'])) {
|
||||
return !is_metaconsole()
|
||||
? "images/pandora.ico"
|
||||
: "enterprise/meta/images/favicon_meta.ico";
|
||||
}
|
||||
|
||||
return 'images/custom_favicon/' . $config['custom_favicon'];
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -226,11 +226,11 @@ class User {
|
|||
$ui->showFooter(false);
|
||||
$ui->beginContent();
|
||||
|
||||
if (!$system->getConfig('metaconsole'))
|
||||
$logo_image = html_print_image ("mobile/images/pandora_mobile_console.png",
|
||||
if ($system->getConfig('metaconsole'))
|
||||
$logo_image = html_print_image (ui_get_mobile_login_icon(),
|
||||
true, array ("alt" => "logo", "border" => 0));
|
||||
else
|
||||
$logo_image = html_print_image ("mobile/images/metaconsole_mobile.png",
|
||||
$logo_image = html_print_image (ui_get_mobile_login_icon(),
|
||||
true, array ("alt" => "logo", "border" => 0),false, false, false, true);
|
||||
|
||||
$ui->contentAddHtml('<div style="text-align: center;" class="login_logo">' .
|
||||
|
@ -289,7 +289,7 @@ class User {
|
|||
$ui->showFooter(false);
|
||||
$ui->beginContent();
|
||||
$ui->contentAddHtml('<div style="text-align: center;" class="login_logo">' .
|
||||
html_print_image ("mobile/images/pandora_mobile_console.png",
|
||||
html_print_image (ui_get_mobile_login_icon(),
|
||||
true, array ("alt" => "logo", "border" => 0)) .
|
||||
'</div>');
|
||||
$ui->contentAddHtml('<div id="login_container">');
|
||||
|
|
|
@ -110,7 +110,7 @@ echo "<title>" . __("%s - Latest events", get_product_name()) . "</title>";
|
|||
|
||||
$query = ui_get_full_url();
|
||||
echo '<meta http-equiv="refresh" content="' . $MARQUEE_INTERVAL . '; URL=' . $query . '">';
|
||||
echo '<link rel="icon" href="../../images/pandora.ico" type="image/ico">';
|
||||
echo '<link rel="icon" href="../../' . ui_get_favicon() . '" type="image/ico">';
|
||||
echo "</head>";
|
||||
|
||||
echo "<body bgcolor='#000000' >";
|
||||
|
|
|
@ -61,7 +61,7 @@ echo "<title>" . __("Sound Events") . "</title>";
|
|||
}
|
||||
</style>
|
||||
<?php
|
||||
echo '<link rel="icon" href="../../images/pandora.ico" type="image/ico" />';
|
||||
echo '<link rel="icon" href="../../' . ui_get_favicon() . '" type="image/ico" />';
|
||||
echo '<link rel="stylesheet" href="../../include/styles/pandora.css" type="text/css" />';
|
||||
echo "</head>";
|
||||
echo "<body style='background-color: #494949; max-width: 550px; max-height: 400px; margin-top:40px;'>";
|
||||
|
|
|
@ -115,7 +115,8 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||
('current_package_enterprise', '722'),
|
||||
('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.0009765625":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'),
|
||||
('custom_docs_logo', 'default_docs.png'),
|
||||
('custom_support_logo', 'default_support.png');
|
||||
('custom_support_logo', 'default_support.png'),
|
||||
('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
|
|
Loading…
Reference in New Issue