Active Calls responsive design update
This commit is contained in:
parent
f0bc1cfe33
commit
e1cfb7931e
|
|
@ -468,8 +468,8 @@ $text['label-domain']['zh-cn'] = "领域";
|
|||
$text['label-domain']['ja-jp'] = "ドメイン";
|
||||
$text['label-domain']['ko-kr'] = "도메인";
|
||||
|
||||
$text['label-destination']['en-us'] = "Dest";
|
||||
$text['label-destination']['en-gb'] = "Dest";
|
||||
$text['label-destination']['en-us'] = "Destination";
|
||||
$text['label-destination']['en-gb'] = "Destination";
|
||||
$text['label-destination']['ar-eg'] = "الوجهة";
|
||||
$text['label-destination']['de-at'] = "Ziel";
|
||||
$text['label-destination']['de-ch'] = "Ziel";
|
||||
|
|
@ -546,8 +546,8 @@ $text['label-codec']['zh-cn'] = "读/写编解码器";
|
|||
$text['label-codec']['ja-jp'] = "読み取り/書き込みコーデック";
|
||||
$text['label-codec']['ko-kr'] = "읽기/쓰기 코덱";
|
||||
|
||||
$text['label-cid-number']['en-us'] = "CID Number";
|
||||
$text['label-cid-number']['en-gb'] = "CID Number";
|
||||
$text['label-cid-number']['en-us'] = "Caller Number";
|
||||
$text['label-cid-number']['en-gb'] = "Caller Number";
|
||||
$text['label-cid-number']['ar-eg'] = "رقم CID";
|
||||
$text['label-cid-number']['de-at'] = "Anrufer Nummer";
|
||||
$text['label-cid-number']['de-ch'] = "Anrufer Nummer";
|
||||
|
|
@ -572,8 +572,8 @@ $text['label-cid-number']['zh-cn'] = "来电号码";
|
|||
$text['label-cid-number']['ja-jp'] = "CID番号";
|
||||
$text['label-cid-number']['ko-kr'] = "CID 번호";
|
||||
|
||||
$text['label-cid-name']['en-us'] = "CID Name";
|
||||
$text['label-cid-name']['en-gb'] = "CID Name";
|
||||
$text['label-cid-name']['en-us'] = "Caller Name";
|
||||
$text['label-cid-name']['en-gb'] = "Caller Name";
|
||||
$text['label-cid-name']['ar-eg'] = "اسم CID";
|
||||
$text['label-cid-name']['de-at'] = "Anrufer Name";
|
||||
$text['label-cid-name']['de-ch'] = "Anrufer Name";
|
||||
|
|
|
|||
|
|
@ -88,10 +88,8 @@
|
|||
}
|
||||
$num_rows = @sizeof($rows);
|
||||
|
||||
|
||||
//if the connnection is available then run it and return the results
|
||||
if (!$event_socket) {
|
||||
|
||||
$msg = "<div align='center'>".$text['confirm-socket']."<br /></div>";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table width='40%'>\n";
|
||||
|
|
@ -103,15 +101,32 @@
|
|||
echo "</tr>\n";
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
return;
|
||||
}
|
||||
else {
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create('/app/calls_active/calls_active_inc.php');
|
||||
|
||||
//show content
|
||||
//add the style
|
||||
echo "<style>\n";
|
||||
echo " /* Small screens: Hide columns with class 'hide-small' */\n";
|
||||
echo " @media (max-width: 600px) {\n";
|
||||
echo " .hide-small {\n";
|
||||
echo " display: none;\n";
|
||||
echo " }\n";
|
||||
echo " }\n";
|
||||
echo "\n";
|
||||
echo " /* Medium screens: Hide columns with class 'hide-medium' */\n";
|
||||
echo "@media (max-width: 1023px) and (min-width: 601px) {\n";
|
||||
echo " .hide-medium {\n";
|
||||
echo " display: none;\n";
|
||||
echo " }\n";
|
||||
echo " }\n";
|
||||
echo "\n";
|
||||
echo "</style>\n";
|
||||
|
||||
//show the content
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['title']."</b><div class='count'>".number_format($num_rows)."</div></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
|
|
@ -168,19 +183,19 @@
|
|||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='if (this.checked) { refresh_stop(); } else { refresh_start(); } list_all_toggle();' ".(empty($rows) ? "style='visibility: hidden;'" : null).">\n";
|
||||
echo " </th>\n";
|
||||
}
|
||||
echo " <th>".$text['label-profile']."</th>\n";
|
||||
echo " <th>".$text['label-created']."</th>\n";
|
||||
echo " <th class='hide-small'>".$text['label-profile']."</th>\n";
|
||||
//echo" <th>".$text['label-created']."</th>\n";
|
||||
echo " <th>".$text['label-duration']."</th>\n";
|
||||
if ($show == 'all') {
|
||||
echo " <th>".$text['label-domain']."</th>\n";
|
||||
}
|
||||
echo " <th>".$text['label-number']."</th>\n";
|
||||
echo " <th>".$text['label-cid-name']."</th>\n";
|
||||
//echo " <th>".$text['label-number']."</th>\n";
|
||||
echo " <th class='hide-small'>".$text['label-cid-name']."</th>\n";
|
||||
echo " <th>".$text['label-cid-number']."</th>\n";
|
||||
echo " <th>".$text['label-destination']."</th>\n";
|
||||
echo " <th>".$text['label-app']."</th>\n";
|
||||
echo " <th>".$text['label-codec']."</th>\n";
|
||||
echo " <th>".$text['label-secure']."</th>\n";
|
||||
echo " <th class='hide-small hide-medium'>".$text['label-app']."</th>\n";
|
||||
echo " <th class='hide-small hide-medium'>".$text['label-codec']."</th>\n";
|
||||
echo " <th class='hide-small hide-medium'>".$text['label-secure']."</th>\n";
|
||||
if (permission_exists('call_active_eavesdrop') || permission_exists('call_active_hangup')) {
|
||||
echo " <th> </th>\n";
|
||||
}
|
||||
|
|
@ -201,9 +216,9 @@
|
|||
$sip_uri = $name_array[2];
|
||||
|
||||
//get the number
|
||||
$temp_array = explode("@", $sip_uri);
|
||||
$tmp_number = $temp_array[0];
|
||||
$tmp_number = str_replace("sip:", "", $tmp_number);
|
||||
//$temp_array = explode("@", $sip_uri);
|
||||
//$tmp_number = $temp_array[0];
|
||||
//$tmp_number = str_replace("sip:", "", $tmp_number);
|
||||
|
||||
//remove the '+' because it breaks the call recording
|
||||
$cid_num = str_replace("+", "", $cid_num);
|
||||
|
|
@ -215,9 +230,26 @@
|
|||
}
|
||||
}
|
||||
|
||||
//convert $created to a UNIX timestamp
|
||||
$created_timestamp = strtotime($created);
|
||||
|
||||
//get the current timestamp
|
||||
$now = time();
|
||||
|
||||
//calculate elapsed seconds
|
||||
$elapsed_seconds = $now - $created_timestamp;
|
||||
|
||||
//convert seconds to hours, minutes, and seconds
|
||||
$hours = floor($elapsed_seconds / 3600);
|
||||
$minutes = floor(($elapsed_seconds % 3600) / 60);
|
||||
$seconds = $elapsed_seconds % 60;
|
||||
|
||||
//format the elapsed time as HH:MM:SS
|
||||
$elapsed_time = sprintf('%02d:%02d:%02d', $hours, $minutes, $seconds);
|
||||
|
||||
//reduce too long app data
|
||||
if(strlen($application_data) > 512) {
|
||||
$application_data = substr($application_data, 0, 512) . '...';
|
||||
if(strlen($application_data) > 80) {
|
||||
$application_data = substr($application_data, 0, 80) . '...';
|
||||
}
|
||||
|
||||
//send the html
|
||||
|
|
@ -228,36 +260,19 @@
|
|||
echo " <input type='hidden' name='calls[$x][uuid]' value='".escape($uuid)."' />\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo " <td>".escape($sip_profile)." </td>\n";
|
||||
echo " <td>".escape($created)." </td>\n";
|
||||
// Convert $created to a UNIX timestamp
|
||||
$created_timestamp = strtotime($created);
|
||||
|
||||
// Get the current timestamp
|
||||
$now = time();
|
||||
|
||||
// Calculate elapsed seconds
|
||||
$elapsed_seconds = $now - $created_timestamp;
|
||||
|
||||
// Convert seconds to hours, minutes, and seconds
|
||||
$hours = floor($elapsed_seconds / 3600);
|
||||
$minutes = floor(($elapsed_seconds % 3600) / 60);
|
||||
$seconds = $elapsed_seconds % 60;
|
||||
|
||||
// Format the elapsed time as HH:MM:SS
|
||||
$elapsed_time = sprintf('%02d:%02d:%02d', $hours, $minutes, $seconds);
|
||||
|
||||
echo " <td class='hide-small'>".escape($sip_profile)." </td>\n";
|
||||
//echo " <td>".escape($created)." </td>\n";
|
||||
echo " <td>".escape($elapsed_time)."</td>\n";
|
||||
if ($show == 'all') {
|
||||
echo " <td>".escape($domain_name)." </td>\n";
|
||||
}
|
||||
echo " <td>".escape($tmp_number)." </td>\n";
|
||||
echo " <td>".escape($cid_name)." </td>\n";
|
||||
//echo " <td>".escape($tmp_number)." </td>\n";
|
||||
echo " <td class='hide-small'>".escape($cid_name)." </td>\n";
|
||||
echo " <td>".escape($cid_num)." </td>\n";
|
||||
echo " <td>".escape($dest)." </td>\n";
|
||||
echo " <td>".(!empty($application) ? escape($application).":".escape($application_data) : null)." </td>\n";
|
||||
echo " <td>".escape($read_codec).":".escape($read_rate)." / ".escape($write_codec).":".escape($write_rate)." </td>\n";
|
||||
echo " <td>".escape($secure)." </td>\n";
|
||||
echo " <td class='hide-small hide-medium' style='max-width: 200px; word-wrap: break-word;'>".(!empty($application) ? escape($application).":".escape($application_data) : null)." </td>\n";
|
||||
echo " <td class='hide-small hide-medium'>".escape($read_codec).":".escape($read_rate)." / ".escape($write_codec).":".escape($write_rate)." </td>\n";
|
||||
echo " <td class='hide-small hide-medium'>".escape($secure)." </td>\n";
|
||||
if (permission_exists('call_active_eavesdrop') || permission_exists('call_active_hangup')) {
|
||||
echo " <td class='button right' style='padding-right: 0;'>\n";
|
||||
//eavesdrop
|
||||
|
|
@ -278,16 +293,11 @@
|
|||
//increment counter
|
||||
$x++;
|
||||
}
|
||||
unset($rows);
|
||||
}
|
||||
|
||||
echo " </table>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
|
||||
echo "</form>\n";
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue