mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Theme: Additional settings to control domain name (selector), menu toggle icon, and logout icon color and hover colors separately.
Adminer: Added ability to login automatically.
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
$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]['path'] = "<!--{project_path}-->/app/adminer/index.php".(($_SESSION['adminer']['auto_login']['boolean'] == 'true') ? '?'.$_SESSION['adminer']['database_type']['text']."=&username=auto&db=fusionpbx&ns=public" : null);
|
||||
$apps[$x]['menu'][0]['groups'][] = "superadmin";
|
||||
|
||||
?>
|
||||
@@ -31,29 +31,34 @@ function adminer_object() {
|
||||
// custom name in title and heading
|
||||
return 'Adminer';
|
||||
}
|
||||
/*
|
||||
|
||||
function permanentLogin() {
|
||||
// key used for permanent login
|
||||
return "7bebc76d8680196752c6b961ef13c360";
|
||||
if ($_SESSION['adminer']['auto_login']['boolean'] == 'true') {
|
||||
return "7bebc76d8680196752c6b961ef13c360";
|
||||
}
|
||||
}
|
||||
|
||||
function credentials() {
|
||||
global $db_host, $db_username, $db_password;
|
||||
// server, username and password for connecting to database
|
||||
return array($db_host.':'.$db_port, $db_username, $db_password);
|
||||
if ($_SESSION['adminer']['auto_login']['boolean'] == 'true') {
|
||||
global $db_host, $db_username, $db_password;
|
||||
return array($db_host.':'.$db_port, $db_username, $db_password);
|
||||
}
|
||||
}
|
||||
|
||||
function database() {
|
||||
global $db_name;
|
||||
// database name, will be escaped by Adminer
|
||||
return $db_name;
|
||||
if ($_SESSION['adminer']['auto_login']['boolean'] == 'true') {
|
||||
global $db_name;
|
||||
return $db_name;
|
||||
}
|
||||
}
|
||||
|
||||
function login($login, $password) {
|
||||
// validate user submitted credentials
|
||||
return ($login == 'admin' && $password == '');
|
||||
return ($_SESSION['adminer']['auto_login']['boolean'] == 'true') ? true : false;
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -88,11 +88,46 @@ if ($domains_processed == 1) {
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'domain_color';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '#69e5ff';
|
||||
$array[$x]['default_setting_value'] = '#ffffff';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the text color (and opacity) for domain name.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'domain_color_hover';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '#69e5ff';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the text hover color (and opacity) for domain name.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'logout_icon_color';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '#ffffff';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the color (and opacity) for the logout icon (if visible).';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'logout_icon_color_hover';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '#69e5ff';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the hover color (and opacity) for the logout icon (if visible).';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'menu_main_toggle_color';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '#ffffff';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the color (and opacity) for the menu toggle icon (in mobile view).';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'menu_main_toggle_color_hover';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '#69e5ff';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the hover color (and opacity) for the menu toggle icon (in mobile view).';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'footer_background_color';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'rgba(0,0,0,0.1)';
|
||||
|
||||
@@ -320,25 +320,6 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
/* xs menu toggle button */
|
||||
.navbar-inverse .navbar-toggle {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-toggle:hover,
|
||||
.navbar-inverse .navbar-toggle:focus,
|
||||
.navbar-inverse .navbar-toggle:active {
|
||||
background: <?php echo ($_SESSION['theme']['menu_main_background_color']['text'] != '') ? $_SESSION['theme']['menu_main_background_color']['text'] : 'rgba(0,0,0,0.90)'; ?>;
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-toggle .icon-bar {
|
||||
background: <?php echo ($_SESSION['theme']['menu_main_text_color']['text'] != '') ? $_SESSION['theme']['menu_main_text_color']['text'] : '#fff'; ?>;
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-toggle:hover > .icon-bar {
|
||||
background: <?php echo ($_SESSION['theme']['menu_main_text_color_hover']['text'] != '') ? $_SESSION['theme']['menu_main_text_color_hover']['text'] : '#fd9c03'; ?>;
|
||||
}
|
||||
|
||||
/* sub menu container */
|
||||
.navbar-nav > li > .dropdown-menu {
|
||||
margin-top: 0;
|
||||
@@ -380,72 +361,63 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false;
|
||||
.dropdown-menu > li > a > span.glyphicon {
|
||||
display: inline-block;
|
||||
font-size: 8pt;
|
||||
margin: 0px 0 8px 8px;
|
||||
margin: 0 0 8px 8px;
|
||||
opacity: 0.30;
|
||||
text-align: top;
|
||||
}
|
||||
|
||||
/* menu toggle button */
|
||||
.navbar-header > button.navbar-toggle {
|
||||
margin-left: 20px;
|
||||
/* domain name/selector */
|
||||
a.domain_selector_domain {
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
font-size: 9.5pt;
|
||||
color: <?php echo ($_SESSION['theme']['domain_color']['text'] != '') ? $_SESSION['theme']['domain_color']['text'] : 'rgba(255,255,255,0.8)'; ?>;
|
||||
padding: 16px 0 14px 0;
|
||||
}
|
||||
|
||||
#logout_icon {
|
||||
color: <?php echo ($_SESSION['theme']['domain_color']['text'] != '') ? $_SESSION['theme']['domain_color']['text'] : '#fff'; ?>;
|
||||
a.domain_selector_domain:hover,
|
||||
a.domain_selector_domain:focus,
|
||||
a.domain_selector_domain:active {
|
||||
color: <?php echo ($_SESSION['theme']['domain_color_hover']['text'] != '') ? $_SESSION['theme']['domain_color_hover']['text'] : 'rgba(255,255,255,1.0)'; ?>;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* logout icon */
|
||||
a.logout_icon {
|
||||
display: inline-block;
|
||||
color: <?php echo ($_SESSION['theme']['logout_icon_color']['text'] != '') ? $_SESSION['theme']['logout_icon_color']['text'] : 'rgba(255,255,255,0.8)'; ?>;
|
||||
font-size: 11pt;
|
||||
margin: 16px 19px 0 5px;
|
||||
filter: alpha(opacity=80);
|
||||
opacity: 0.80;
|
||||
-moz-opacity: 0.80;
|
||||
-khtml-opacity: 0.80;
|
||||
padding: 16px 10px 13px 10px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#logout_icon:hover {
|
||||
filter: alpha(opacity=100);
|
||||
opacity: 1;
|
||||
-moz-opacity: 1;
|
||||
-khtml-opacity: 1;
|
||||
cursor: pointer;
|
||||
a.logout_icon:hover,
|
||||
a.logout_icon:focus,
|
||||
a.logout_icon:active {
|
||||
color: <?php echo ($_SESSION['theme']['logout_icon_color_hover']['text'] != '') ? $_SESSION['theme']['logout_icon_color_hover']['text'] : 'rgba(255,255,255,1.0)'; ?>;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* domain name: xs only */
|
||||
.navbar-inverse .navbar-header .navbar-nav .domain_selector_domain {
|
||||
<?php if ($_SESSION['theme']['domain_visible']['text'] != 'true') { ?>display: none;<?php } ?>
|
||||
white-space: nowrap;
|
||||
opacity: 0.8;
|
||||
-moz-opacity: 0.8;
|
||||
-khtml-opacity: 0.8;
|
||||
font-size: 9.5pt;
|
||||
color: <?php echo ($_SESSION['theme']['domain_color']['text'] != '') ? $_SESSION['theme']['domain_color']['text'] : '#fff'; ?>;
|
||||
/* xs menu toggle button */
|
||||
.navbar-inverse .navbar-toggle {
|
||||
background: transparent;
|
||||
border: none;
|
||||
padding: 16px 7px 17px 20px;
|
||||
margin: 0 8px;
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-header .navbar-nav .domain_selector_domain:hover,
|
||||
.navbar-inverse .navbar-header .navbar-nav .domain_selector_domain:focus,
|
||||
.navbar-inverse .navbar-header .navbar-nav .domain_selector_domain:active {
|
||||
opacity: 1;
|
||||
-moz-opacity: 1;
|
||||
-khtml-opacity: 1;
|
||||
cursor: pointer;
|
||||
.navbar-inverse .navbar-toggle:hover,
|
||||
.navbar-inverse .navbar-toggle:focus,
|
||||
.navbar-inverse .navbar-toggle:active {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/* domain name: sm and larger */
|
||||
.navbar-inverse .navbar-collapse .navbar-nav > li > a.domain_selector_domain {
|
||||
<?php if ($_SESSION['theme']['domain_visible']['text'] != 'true') { ?>display: none;<?php } ?>
|
||||
white-space: nowrap;
|
||||
opacity: 0.8;
|
||||
-moz-opacity: 0.8;
|
||||
-khtml-opacity: 0.8;
|
||||
font-size: 9.5pt;
|
||||
color: <?php echo ($_SESSION['theme']['domain_color']['text'] != '') ? $_SESSION['theme']['domain_color']['text'] : '#fff'; ?>;
|
||||
.navbar-inverse .navbar-toggle .icon-bar {
|
||||
background: <?php echo ($_SESSION['theme']['menu_main_toggle_color']['text'] != '') ? $_SESSION['theme']['menu_main_toggle_color']['text'] : 'rgba(255,255,255,0.8)'; ?>;
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-collapse .navbar-nav > li > a.domain_selector_domain:hover,
|
||||
.navbar-inverse .navbar-collapse .navbar-nav > li > a.domain_selector_domain:focus,
|
||||
.navbar-inverse .navbar-collapse .navbar-nav > li > a.domain_selector_domain:active {
|
||||
opacity: 1;
|
||||
-moz-opacity: 1;
|
||||
-khtml-opacity: 1;
|
||||
cursor: pointer;
|
||||
.navbar-inverse .navbar-toggle:hover > .icon-bar {
|
||||
background: <?php echo ($_SESSION['theme']['menu_main_toggle_color_hover']['text'] != '') ? $_SESSION['theme']['menu_main_toggle_color_hover']['text'] : 'rgba(255,255,255,1.0)'; ?>;
|
||||
}
|
||||
|
||||
/* BUTTONS ********************************************************************/
|
||||
@@ -784,7 +756,6 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false;
|
||||
}
|
||||
|
||||
a {
|
||||
width: 100%;
|
||||
color: <?php echo ($_SESSION['theme']['text_link_color']['text'] != '') ? $_SESSION['theme']['text_link_color']['text'] : '#004083'; ?>;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
@@ -360,7 +360,7 @@
|
||||
default:
|
||||
$menu_position = ($menu_position != '') ? $menu_position : 'top';
|
||||
$menu_type = 'fixed-'.$menu_position;
|
||||
$menu_width = 'calc(90% - 40px)';
|
||||
$menu_width = 'calc(90% - 20px)';
|
||||
$menu_brand = true;
|
||||
}
|
||||
?>
|
||||
@@ -398,11 +398,9 @@
|
||||
echo "<div class='pull-left'><a class='navbar-brand' href=\"".$menu_brand_link."\">".$menu_brand_text."</a></div>\n";
|
||||
}
|
||||
}
|
||||
//domain name/selector
|
||||
//domain name/selector (xs)
|
||||
if ($_SESSION["username"] != '' && permission_exists("domain_select") && count($_SESSION['domains']) > 1) {
|
||||
echo "<ul class='nav navbar-nav pull-right visible-xs'>\n";
|
||||
echo "<li><a href='#' style='padding: 8px 4px 6px 0;' class='domain_selector_domain' title='".$text['theme-label-open_selector']."'>".$_SESSION['domain_name']."</a></li>\n";
|
||||
echo "</ul>\n";
|
||||
echo "<span class='pull-right visible-xs'><a href='#' class='domain_selector_domain' title='".$text['theme-label-open_selector']."'>".$_SESSION['domain_name']."</a></span>\n";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -461,20 +459,20 @@
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<?php
|
||||
//domain name/selector
|
||||
if ($_SESSION["username"] != '' && permission_exists("domain_select") && count($_SESSION['domains']) > 1) {
|
||||
echo "<li class='hidden-xs'><a href='#' class='domain_selector_domain' title='".$text['theme-label-open_selector']."'>".$_SESSION['domain_name']."</a></li>";
|
||||
}
|
||||
//logout icon
|
||||
if ($_SESSION['username'] != '' && $_SESSION['theme']['logout_icon_visible']['text'] == "true") {
|
||||
$username_full = $_SESSION['username'].((count($_SESSION['domains']) > 1) ? "@".$_SESSION["user_context"] : null);
|
||||
echo "<li class='hidden-xs'><a href='".PROJECT_PATH."/logout.php' title=\"".$text['theme-label-logout']."\" onclick=\"return confirm('".$text['theme-confirm-logout']."')\"><span class='glyphicon glyphicon-log-out'></span></a></li>";
|
||||
unset($username_full);
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?php
|
||||
echo "<span class='pull-right hidden-xs' style='white-space: nowrap;'>";
|
||||
//domain name/selector (sm+)
|
||||
if ($_SESSION["username"] != '' && permission_exists("domain_select") && count($_SESSION['domains']) > 1 && $_SESSION['theme']['domain_visible']['text'] == 'true') {
|
||||
echo "<a href='#' class='domain_selector_domain' title='".$text['theme-label-open_selector']."'>".$_SESSION['domain_name']."</a>";
|
||||
}
|
||||
//logout icon
|
||||
if ($_SESSION['username'] != '' && $_SESSION['theme']['logout_icon_visible']['text'] == "true") {
|
||||
$username_full = $_SESSION['username'].((count($_SESSION['domains']) > 1) ? "@".$_SESSION["user_context"] : null);
|
||||
echo "<a href='".PROJECT_PATH."/logout.php' class='logout_icon' title=\"".$text['theme-label-logout']."\" onclick=\"return confirm('".$text['theme-confirm-logout']."')\"><span class='glyphicon glyphicon-log-out'></span></a>";
|
||||
unset($username_full);
|
||||
}
|
||||
echo "</span>";
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user