From 4a4517a5ab9e6f51824e740d1c52f776013ae30c Mon Sep 17 00:00:00 2001 From: reliberate Date: Fri, 1 Apr 2016 19:44:26 -0600 Subject: [PATCH] Functions: Enhance img_spacer() function. Dialplan Edit: Integrate img_spacer() to fix row divider. Default/Domain/User Settings: Use img_spacer() function for color swatches. Contact Times: Adjust for recent changes on img_spacer() function. --- app/contacts/contact_times.php | 6 +++--- app/dialplan/dialplan_edit.php | 2 +- core/default_settings/default_settings.php | 2 +- core/domain_settings/domain_settings.php | 21 +++++++++------------ core/users/user_settings.php | 17 +++++++---------- resources/functions.php | 4 ++-- 6 files changed, 23 insertions(+), 29 deletions(-) diff --git a/app/contacts/contact_times.php b/app/contacts/contact_times.php index 619cfc454c..d3336cdb3e 100644 --- a/app/contacts/contact_times.php +++ b/app/contacts/contact_times.php @@ -61,18 +61,18 @@ else { echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/app/dialplan/dialplan_edit.php b/app/dialplan/dialplan_edit.php index eb0a117c9a..25b3b7082a 100644 --- a/app/dialplan/dialplan_edit.php +++ b/app/dialplan/dialplan_edit.php @@ -760,7 +760,7 @@ else { //end the row echo "\n"; if ($index != 999) { - echo ""; + echo ""; } //increment the value $x++; diff --git a/core/default_settings/default_settings.php b/core/default_settings/default_settings.php index d1a1b75a54..3a29169321 100644 --- a/core/default_settings/default_settings.php +++ b/core/default_settings/default_settings.php @@ -427,7 +427,7 @@ else { } else { if ($category == "theme" && substr_count($subcategory, "_color") > 0 && ($name == "text" || $name == 'array')) { - echo " "; + echo " ".(img_spacer('15px', '15px', 'background: '.$row['default_setting_value'].'; margin-right: 4px; vertical-align: middle; border: 1px solid '.(color_adjust($row['default_setting_value'], -0.18)).'; padding: -1px;')); echo "".htmlspecialchars($row['default_setting_value'])."\n"; } else { diff --git a/core/domain_settings/domain_settings.php b/core/domain_settings/domain_settings.php index 1a3cb87425..1765018fdb 100644 --- a/core/domain_settings/domain_settings.php +++ b/core/domain_settings/domain_settings.php @@ -224,13 +224,13 @@ if (sizeof($_REQUEST) > 1) { echo $sub_row["menu_language"]." - ".$sub_row["menu_name"]."\n"; } } - elseif ($category == "domain" && $subcategory == "template" && $name == "name" ) { + else if ($category == "domain" && $subcategory == "template" && $name == "name" ) { echo " ".ucwords($row['domain_setting_value']); } else if ($category == "domain" && $subcategory == "time_format" && $name == "text" ) { - switch ($row['domain_setting_value'] == '12h') { - case '12h': echo " ".$text['label-12-hour']; break; - case '24h': echo " ".$text['label-24-hour']; break; + switch ($row['domain_setting_value']) { + case '12h': echo $text['label-12-hour']; break; + case '24h': echo $text['label-24-hour']; break; } } else if ( @@ -247,16 +247,13 @@ if (sizeof($_REQUEST) > 1) { } else { if ($category == "theme" && substr_count($subcategory, "_color") > 0 && ($name == "text" || $name == 'array')) { - $border = ( - substr_count(strtolower($row['domain_setting_value']), '#fff') > 0 || - substr_count(strtolower($row['domain_setting_value']), '#ffffff') > 0 || - substr_count(str_replace(' ','',strtolower($row['domain_setting_value'])), '255,255,255,') > 0 - ) ? "border: 1px solid #ccc; padding: -1px;" : null; - echo " "; + echo " ".(img_spacer('15px', '15px', 'background: '.$row['domain_setting_value'].'; margin-right: 4px; vertical-align: middle; border: 1px solid '.(color_adjust($row['domain_setting_value'], -0.18)).'; padding: -1px;')); + echo "".htmlspecialchars($row['domain_setting_value'])."\n"; + } + else { + echo " ".htmlspecialchars($row['domain_setting_value'])."\n"; } - echo " ".htmlspecialchars($row['domain_setting_value']); } - echo "  \n"; echo " \n"; echo " \n"; echo "
".$text['label-time_user']."".$text['label-time_start']."".$text['label-time_duration']."".$text['label-time_description'].""; - echo img_spacer('25px', '1px', 'none'); + echo img_spacer('25px', '1px'); if (permission_exists('contact_time_add')) { echo "$v_link_label_add"; } else { - echo img_spacer('25px', '1px', 'none'); + echo img_spacer('25px', '1px'); } echo "
".(img_spacer('100%', '1px', 'border-bottom: 1px solid #e5e9f0; margin: 0; padding: 0; display: block;'))."