mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 19:53:56 +00:00
Contact Times: Layout tweaks, link contact name on Timer to open contact edit.
This commit is contained in:
@@ -162,6 +162,15 @@ if (!permission_exists('contact_time_add')) { echo "access denied"; exit; }
|
||||
font-family: arial;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #004083;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #5082ca;
|
||||
}
|
||||
|
||||
form {
|
||||
margin: 0;
|
||||
}
|
||||
@@ -336,37 +345,37 @@ if (!permission_exists('contact_time_add')) { echo "access denied"; exit; }
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<img src='resources/images/icon_timer.png' style='width: 24px; height: 24px; border: none; margin-left: 15px;' alt="<?php echo $text['label-time_timer']; ?>" align='right'>
|
||||
<b><?php echo $text['label-time_timer']; ?></b>
|
||||
<br><br>
|
||||
<?php echo $text['description_timer']; ?>
|
||||
<br><br>
|
||||
<strong style='color: #000;'><?php echo $contact; ?></strong>
|
||||
<br><br>
|
||||
<div id='ajax_reponse' class='timer' <?php echo ($timer_state == 'stopped') ? "style='color: #888;'" : null; ?>>00:00:00</div>
|
||||
<br>
|
||||
<form name='frm' id='frm' method='post' action=''>
|
||||
<input type='hidden' name='domain_uuid' value="<?php echo $_SESSION['domain_uuid']; ?>">
|
||||
<input type='hidden' name='contact_time_uuid' value="<?php echo $contact_time_uuid; ?>">
|
||||
<input type='hidden' name='contact_uuid' value="<?php echo $contact_uuid; ?>">
|
||||
<input type='hidden' name='time_action' value="<?php echo $timer_action; ?>">
|
||||
<table cellpadding='0' cellspacing='0' border='0' style='width: 100%;'>
|
||||
<tr>
|
||||
<td class='vncell' style='text-align: center; padding: 10px;'>
|
||||
<?php echo $text['label-description']; ?>
|
||||
<textarea name='time_description' id='timer_description' class='formfld' style='width: 100%; height: 50px; margin-top: 5px;'><?php echo $time_description; ?></textarea>
|
||||
<? if ($timer_state == 'stopped') { ?><script>document.getElementById('timer_description').focus();</script><? } ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<center>
|
||||
<? if ($timer_state == 'running') { ?>
|
||||
<input type='submit' class='btn' value="<?php echo $text['button-stop']; ?>">
|
||||
<? } else if ($timer_state == 'stopped') { ?>
|
||||
<input type='submit' class='btn' value="<?php echo $text['button-start']; ?>">
|
||||
<? } ?>
|
||||
</center>
|
||||
</form>
|
||||
<img src='resources/images/icon_timer.png' style='width: 24px; height: 24px; border: none; margin-left: 15px;' alt="<?php echo $text['label-time_timer']; ?>" align='right'>
|
||||
<b><?php echo $text['label-time_timer']; ?></b>
|
||||
<br><br>
|
||||
<?php echo $text['description_timer']; ?>
|
||||
<br><br>
|
||||
<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>
|
||||
<div id='ajax_reponse' class='timer' <?php echo ($timer_state == 'stopped') ? "style='color: #888;'" : null; ?>>00:00:00</div>
|
||||
<br>
|
||||
<form name='frm' id='frm' method='post' action=''>
|
||||
<input type='hidden' name='domain_uuid' value="<?php echo $_SESSION['domain_uuid']; ?>">
|
||||
<input type='hidden' name='contact_time_uuid' value="<?php echo $contact_time_uuid; ?>">
|
||||
<input type='hidden' name='contact_uuid' value="<?php echo $contact_uuid; ?>">
|
||||
<input type='hidden' name='time_action' value="<?php echo $timer_action; ?>">
|
||||
<table cellpadding='0' cellspacing='0' border='0' style='width: 100%;'>
|
||||
<tr>
|
||||
<td class='vncell' style='text-align: center; padding: 10px;'>
|
||||
<?php echo $text['label-description']; ?>
|
||||
<textarea name='time_description' id='timer_description' class='formfld' style='width: 100%; height: 50px; margin-top: 5px;'><?php echo $time_description; ?></textarea>
|
||||
<? if ($timer_state == 'stopped') { ?><script>document.getElementById('timer_description').focus();</script><? } ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<center>
|
||||
<? if ($timer_state == 'running') { ?>
|
||||
<input type='submit' class='btn' value="<?php echo $text['button-stop']; ?>">
|
||||
<? } else if ($timer_state == 'stopped') { ?>
|
||||
<input type='submit' class='btn' value="<?php echo $text['button-start']; ?>">
|
||||
<? } ?>
|
||||
</center>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -62,7 +62,7 @@ else {
|
||||
|
||||
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\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_start']."</th>\n";
|
||||
echo "<th width='20%'>".$text['label-time_duration']."</th>\n";
|
||||
@@ -79,8 +79,8 @@ else {
|
||||
echo "</tr>\n";
|
||||
echo "</table>\n";
|
||||
|
||||
echo "<div id='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 "<div id='div_contact_times' style='width: 100%; overflow: auto; direction: rtl; text-align: right; margin-bottom: 23px;'>";
|
||||
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) {
|
||||
foreach($result as $row) {
|
||||
if (permission_exists('contact_time_edit')) {
|
||||
@@ -116,8 +116,9 @@ else {
|
||||
echo "</div>\n";
|
||||
|
||||
echo "<script>";
|
||||
echo " var div_times = document.getElementById('contact_times');";
|
||||
echo " var td_filler = document.getElementById('filler');";
|
||||
echo " var div_times = document.getElementById('div_contact_times');";
|
||||
echo " var table_times = document.getElementById('table_contact_times');";
|
||||
echo " var th_filler = document.getElementById('th_filler');";
|
||||
|
||||
echo " if (div_times.offsetHeight > 200) { ";
|
||||
echo " div_times.style.height = 200; ";
|
||||
@@ -127,10 +128,12 @@ else {
|
||||
echo " }";
|
||||
|
||||
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 " else {";
|
||||
echo " td_filler.style.display = 'none'; ";
|
||||
echo " th_filler.style.display = 'none'; ";
|
||||
echo " table_times.style.paddingLeft = 0;";
|
||||
echo " }";
|
||||
echo "</script>\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user