From cb21c76c993ce32a4c93c7ae6fd4cfa0c1bb526b Mon Sep 17 00:00:00 2001 From: Nate Jones Date: Sat, 6 Dec 2014 01:54:30 +0000 Subject: [PATCH] Login (Enhanced & Minimized Themes): Login box should now stretch to fit its content. Added login_shadow_color Default Setting. Default Settings: When using Enabled toggle link, scrolls to previous position in setting list. --- .../default_settings/default_setting_edit.php | 1 + core/default_settings/default_settings.php | 5 +- themes/enhanced/app_defaults.php | 11 +++- themes/enhanced/template.php | 62 ++++-------------- themes/minimized/template.php | 64 +++++-------------- 5 files changed, 42 insertions(+), 101 deletions(-) diff --git a/core/default_settings/default_setting_edit.php b/core/default_settings/default_setting_edit.php index 696fd02e03..6c357ebfb8 100644 --- a/core/default_settings/default_setting_edit.php +++ b/core/default_settings/default_setting_edit.php @@ -415,6 +415,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { } elseif ( $category == "theme" && $subcategory == "background_color" && $name == "array" || + $category == "theme" && $subcategory == "login_shadow_color" && $name == "text" || $category == "theme" && $subcategory == "login_background_color" && $name == "text" || $category == "theme" && $subcategory == "domain_color" && $name == "text" || $category == "theme" && $subcategory == "domain_background_color" && $name == "text" || diff --git a/core/default_settings/default_settings.php b/core/default_settings/default_settings.php index 4101c3398a..5e0dc6e2d2 100644 --- a/core/default_settings/default_settings.php +++ b/core/default_settings/default_settings.php @@ -46,6 +46,7 @@ if (sizeof($_REQUEST) > 0) { $action = check_str($_REQUEST["action"]); $default_setting_uuids = $_REQUEST["id"]; $enabled = check_str($_REQUEST['enabled']); + $category = check_str($_REQUEST['category']); if (sizeof($default_setting_uuids) == 1 && $enabled != '') { $sql = "update v_default_settings set "; @@ -55,7 +56,7 @@ if (sizeof($_REQUEST) > 0) { unset($sql); $_SESSION["message"] = $text['message-update']; - header("Location: default_settings.php"); + header("Location: default_settings.php#".$category); exit; } @@ -428,7 +429,7 @@ if (permission_exists("domain_select") && permission_exists("domain_setting_add" echo "  \n"; echo " \n"; echo " \n"; - echo " ".ucwords($row['default_setting_enabled'])."\n"; + echo " ".ucwords($row['default_setting_enabled'])."\n"; echo " \n"; echo " ".$row['default_setting_description']." \n"; echo " "; diff --git a/themes/enhanced/app_defaults.php b/themes/enhanced/app_defaults.php index 93c063b191..15489c2094 100644 --- a/themes/enhanced/app_defaults.php +++ b/themes/enhanced/app_defaults.php @@ -36,11 +36,18 @@ if ($domains_processed == 1) { $array[$x]['default_setting_description'] = 'Set the opacity of the login box (decimal).'; $x++; $array[$x]['default_setting_category'] = 'theme'; + $array[$x]['default_setting_subcategory'] = 'login_shadow_color'; + $array[$x]['default_setting_name'] = 'text'; + $array[$x]['default_setting_value'] = '#888888'; + $array[$x]['default_setting_enabled'] = 'true'; + $array[$x]['default_setting_description'] = 'Set the shadow color (HTML compatible) of the login box.'; + $x++; + $array[$x]['default_setting_category'] = 'theme'; $array[$x]['default_setting_subcategory'] = 'login_background_color'; $array[$x]['default_setting_name'] = 'text'; $array[$x]['default_setting_value'] = '#ffffff'; $array[$x]['default_setting_enabled'] = 'true'; - $array[$x]['default_setting_description'] = 'Set the background color (HTML compatible) for the login box.'; + $array[$x]['default_setting_description'] = 'Set the background color (hexadecimal) for the login box.'; $x++; $array[$x]['default_setting_category'] = 'theme'; $array[$x]['default_setting_subcategory'] = 'domain_visible'; @@ -61,7 +68,7 @@ if ($domains_processed == 1) { $array[$x]['default_setting_name'] = 'text'; $array[$x]['default_setting_value'] = '#000000'; $array[$x]['default_setting_enabled'] = 'false'; - $array[$x]['default_setting_description'] = 'Set the background color (hexidecimal) for the domain name.'; + $array[$x]['default_setting_description'] = 'Set the background color (hexadecimal) for the domain name.'; $x++; $array[$x]['default_setting_category'] = 'theme'; $array[$x]['default_setting_subcategory'] = 'domain_background_opacity'; diff --git a/themes/enhanced/template.php b/themes/enhanced/template.php index bafffbd828..eef79f63f8 100644 --- a/themes/enhanced/template.php +++ b/themes/enhanced/template.php @@ -97,38 +97,24 @@ if ( ?> -DIV#default_login { - z-index: 1000; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - width: 100%; - height: 100%; -} - -#default_login_container { - display: block; - width: 300px; - height: ; +#default_login { + display: inline-block; + padding: 30px; + margin-bottom: 28px; - background-color: ; - opacity: ; - filter: alpha(opacity=); - -moz-opacity: ; - -khtml-opacity: ; + background-color: ; + background: rgba(, ); -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; - -webkit-box-shadow: 0 1px 20px #888; - -moz-box-shadow: 0 1px 20px #888; - box-shadow: 0 1px 20px #888; + -webkit-box-shadow: 0 1px 20px ; + -moz-box-shadow: 0 1px 20px ; + box-shadow: 0 1px 20px ; @@ -1434,13 +1420,16 @@ if (strlen($_SESSION['message']) > 0) { // default login being used else { + $logo = (isset($_SESSION['theme']['logo']['text'])) ? $_SESSION['theme']['logo']['text'] : PROJECT_PATH."/themes/enhanced/images/logo.png"; ?>
- -


+ +
+ +
@@ -1451,29 +1440,6 @@ if (strlen($_SESSION['message']) > 0) {
-
- - - - -
- -
- -


-
-
- fusionpbx.com. All rights reserved.\n"; echo "\n"; ?> diff --git a/themes/minimized/template.php b/themes/minimized/template.php index 6eca82d4b5..47f79a7c3c 100644 --- a/themes/minimized/template.php +++ b/themes/minimized/template.php @@ -97,38 +97,24 @@ if ( ?> -DIV#default_login { - z-index: 1000; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - width: 100%; - height: 100%; -} - -#default_login_container { - display: block; - width: 300px; - height: ; +#default_login { + display: inline-block; + padding: 30px; + margin-bottom: 28px; - background-color: ; - opacity: ; - filter: alpha(opacity=); - -moz-opacity: ; - -khtml-opacity: ; + background-color: ; + background: rgba(, ); -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; - -webkit-box-shadow: 0 1px 20px #888; - -moz-box-shadow: 0 1px 20px #888; - box-shadow: 0 1px 20px #888; + -webkit-box-shadow: 0 1px 20px ; + -moz-box-shadow: 0 1px 20px ; + box-shadow: 0 1px 20px ; @@ -1441,13 +1427,16 @@ legend { // default login being used else { + $logo = (isset($_SESSION['theme']['logo']['text'])) ? $_SESSION['theme']['logo']['text'] : PROJECT_PATH."/themes/enhanced/images/logo.png"; ?> -
+
- -


+ +
+ +
@@ -1458,29 +1447,6 @@ legend {
-
- - - - -
- -
- -


-
-
- fusionpbx.com. All rights reserved.\n"; echo "\n"; ?>