Contact Times: Layout tweaks, link contact name on Timer to open contact edit.

This commit is contained in:
Nate Jones
2015-05-17 06:40:37 +00:00
parent 3d3cdff6c8
commit 6a184d6989
2 changed files with 51 additions and 39 deletions
+10 -1
View File
@@ -162,6 +162,15 @@ if (!permission_exists('contact_time_add')) { echo "access denied"; exit; }
font-family: arial; font-family: arial;
} }
a {
color: #004083;
width: 100%;
}
a:hover {
color: #5082ca;
}
form { form {
margin: 0; margin: 0;
} }
@@ -341,7 +350,7 @@ if (!permission_exists('contact_time_add')) { echo "access denied"; exit; }
<br><br> <br><br>
<?php echo $text['description_timer']; ?> <?php echo $text['description_timer']; ?>
<br><br> <br><br>
<strong style='color: #000;'><?php echo $contact; ?></strong> <strong><a href="javascript:void(0);" onclick="window.opener.location.href='contact_edit.php?id=<?php echo $contact_uuid; ?>';"><?php echo $contact; ?></a></strong>
<br><br> <br><br>
<div id='ajax_reponse' class='timer' <?php echo ($timer_state == 'stopped') ? "style='color: #888;'" : null; ?>>00:00:00</div> <div id='ajax_reponse' class='timer' <?php echo ($timer_state == 'stopped') ? "style='color: #888;'" : null; ?>>00:00:00</div>
<br> <br>
+10 -7
View File
@@ -62,7 +62,7 @@ else {
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<th id='filler' style='display: none; padding: 0px;'>".img_spacer('21px', '1px', 'none')."</th>\n"; echo "<th id='th_filler' style='display: none; padding: 0px;'>".img_spacer('21px', '1px', 'none')."</th>\n";
echo "<th width='20%'>".$text['label-time_user']."</th>\n"; echo "<th width='20%'>".$text['label-time_user']."</th>\n";
echo "<th width='20%'>".$text['label-time_start']."</th>\n"; echo "<th width='20%'>".$text['label-time_start']."</th>\n";
echo "<th width='20%'>".$text['label-time_duration']."</th>\n"; echo "<th width='20%'>".$text['label-time_duration']."</th>\n";
@@ -79,8 +79,8 @@ else {
echo "</tr>\n"; echo "</tr>\n";
echo "</table>\n"; echo "</table>\n";
echo "<div id='contact_times' style='width: 100%; overflow: auto; direction: rtl; text-align: right; margin-bottom: 23px;'>"; echo "<div id='div_contact_times' style='width: 100%; overflow: auto; direction: rtl; text-align: right; margin-bottom: 23px;'>";
echo "<table class='tr_hover' style='width: 100%; direction: ltr; padding-left: 1px' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<table id='table_contact_times' class='tr_hover' style='width: 100%; direction: ltr;' border='0' cellpadding='0' cellspacing='0'>\n";
if ($result_count > 0) { if ($result_count > 0) {
foreach($result as $row) { foreach($result as $row) {
if (permission_exists('contact_time_edit')) { if (permission_exists('contact_time_edit')) {
@@ -116,8 +116,9 @@ else {
echo "</div>\n"; echo "</div>\n";
echo "<script>"; echo "<script>";
echo " var div_times = document.getElementById('contact_times');"; echo " var div_times = document.getElementById('div_contact_times');";
echo " var td_filler = document.getElementById('filler');"; echo " var table_times = document.getElementById('table_contact_times');";
echo " var th_filler = document.getElementById('th_filler');";
echo " if (div_times.offsetHeight > 200) { "; echo " if (div_times.offsetHeight > 200) { ";
echo " div_times.style.height = 200; "; echo " div_times.style.height = 200; ";
@@ -127,10 +128,12 @@ else {
echo " }"; echo " }";
echo " if (div_times.scrollHeight > div_times.clientHeight) {"; echo " if (div_times.scrollHeight > div_times.clientHeight) {";
echo " td_filler.style.display = ''; "; echo " th_filler.style.display = ''; ";
echo " table_times.style.paddingLeft = 1;";
echo " }"; echo " }";
echo " else {"; echo " else {";
echo " td_filler.style.display = 'none'; "; echo " th_filler.style.display = 'none'; ";
echo " table_times.style.paddingLeft = 0;";
echo " }"; echo " }";
echo "</script>\n"; echo "</script>\n";