CDR: Added View icon to right column.

CDR: List row Edit clicking disabled for Click-2-Call column cells. 
Themes: New style to accommodate width of single control icon (as currently used on CDR)
This commit is contained in:
Nate Jones 2014-06-22 02:18:58 +00:00
parent bf6306705a
commit 3412d12f79
7 changed files with 78 additions and 7 deletions

View File

@ -135,6 +135,11 @@
$text['button-search']['pt-pt'] = "Pesquisa"; $text['button-search']['pt-pt'] = "Pesquisa";
$text['button-search']['fr-fr'] = "Recherche"; $text['button-search']['fr-fr'] = "Recherche";
$text['button-view']['en-us'] = "View";
$text['button-view']['es-cl'] = "Ver";
$text['button-view']['pt-pt'] = "Vista";
$text['button-view']['fr-fr'] = "Voir";
$text['button-advanced_search']['en-us'] = "Advanced Search"; $text['button-advanced_search']['en-us'] = "Advanced Search";
$text['button-advanced_search']['es-cl'] = "Búsqueda Avanzada"; $text['button-advanced_search']['es-cl'] = "Búsqueda Avanzada";
$text['button-advanced_search']['pt-pt'] = "Pesquisa Avançada"; $text['button-advanced_search']['pt-pt'] = "Pesquisa Avançada";

View File

@ -282,7 +282,7 @@ else {
} }
//show the results //show the results
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n"; echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<th>&nbsp;</th>\n"; echo "<th>&nbsp;</th>\n";
//echo th_order_by('direction', 'Direction', $order_by, $order); //echo th_order_by('direction', 'Direction', $order_by, $order);
@ -303,6 +303,9 @@ else {
echo th_order_by('rtp_audio_in_mos', 'MOS', $order_by, $order); echo th_order_by('rtp_audio_in_mos', 'MOS', $order_by, $order);
} }
echo th_order_by('hangup_cause', $text['label-status'], $order_by, $order); echo th_order_by('hangup_cause', $text['label-status'], $order_by, $order);
if (if_group("admin") || if_group("superadmin")) {
echo "<td class='list_control_icon'>&nbsp;</td>\n";
}
echo "</tr>\n"; echo "</tr>\n";
if ($result_count > 0) { if ($result_count > 0) {
@ -339,7 +342,8 @@ else {
elseif (file_exists($tmp_dir.'/'.$row['uuid'].'_1.mp3')) { elseif (file_exists($tmp_dir.'/'.$row['uuid'].'_1.mp3')) {
$tmp_name = $row['uuid']."_1.mp3"; $tmp_name = $row['uuid']."_1.mp3";
} }
echo "<tr >\n"; $tr_link = (if_group("admin") || if_group("superadmin")) ? "href='xml_cdr_details.php?uuid=".$row['uuid']."'" : null;
echo "<tr ".$tr_link.">\n";
if ( if (
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound_missed.png") && file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound_missed.png") &&
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound_connected.png") && file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound_connected.png") &&
@ -382,7 +386,7 @@ else {
echo $row['caller_id_name'].' '; echo $row['caller_id_name'].' ';
echo " </td>\n"; echo " </td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>"; echo " <td valign='top' class='".$row_style[$c]." tr_link_void'>";
echo " <a href=\"javascript:void(0)\" onclick=\"send_cmd('".PROJECT_PATH."/app/click_to_call/click_to_call.php?src_cid_name=".urlencode($row['caller_id_name'])."&src_cid_number=".urlencode($row['caller_id_number'])."&dest_cid_name=".urlencode($_SESSION['user']['extension'][0]['outbound_caller_id_name'])."&dest_cid_number=".urlencode($_SESSION['user']['extension'][0]['outbound_caller_id_number'])."&src=".urlencode($_SESSION['user']['extension'][0]['user'])."&dest=".urlencode($row['caller_id_number'])."&rec=false&ringback=us-ring&auto_answer=true');\">\n"; echo " <a href=\"javascript:void(0)\" onclick=\"send_cmd('".PROJECT_PATH."/app/click_to_call/click_to_call.php?src_cid_name=".urlencode($row['caller_id_name'])."&src_cid_number=".urlencode($row['caller_id_number'])."&dest_cid_name=".urlencode($_SESSION['user']['extension'][0]['outbound_caller_id_name'])."&dest_cid_number=".urlencode($_SESSION['user']['extension'][0]['outbound_caller_id_number'])."&src=".urlencode($_SESSION['user']['extension'][0]['user'])."&dest=".urlencode($row['caller_id_number'])."&rec=false&ringback=us-ring&auto_answer=true');\">\n";
if (is_numeric($row['caller_id_number'])) { if (is_numeric($row['caller_id_number'])) {
echo " ".format_phone($row['caller_id_number']).' '; echo " ".format_phone($row['caller_id_number']).' ';
@ -393,7 +397,7 @@ else {
echo " </a>"; echo " </a>";
echo " </td>\n"; echo " </td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>"; echo " <td valign='top' class='".$row_style[$c]." tr_link_void'>";
echo " <a href=\"javascript:void(0)\" onclick=\"send_cmd('".PROJECT_PATH."/app/click_to_call/click_to_call.php?src_cid_name=".urlencode($row['destination_number'])."&src_cid_number=".urlencode($row['destination_number'])."&dest_cid_name=".urlencode($_SESSION['user']['extension'][0]['outbound_caller_id_name'])."&dest_cid_number=".urlencode($_SESSION['user']['extension'][0]['outbound_caller_id_number'])."&src=".urlencode($_SESSION['user']['extension'][0]['user'])."&dest=".urlencode($row['destination_number'])."&rec=false&ringback=us-ring&auto_answer=true');\">\n"; echo " <a href=\"javascript:void(0)\" onclick=\"send_cmd('".PROJECT_PATH."/app/click_to_call/click_to_call.php?src_cid_name=".urlencode($row['destination_number'])."&src_cid_number=".urlencode($row['destination_number'])."&dest_cid_name=".urlencode($_SESSION['user']['extension'][0]['outbound_caller_id_name'])."&dest_cid_number=".urlencode($_SESSION['user']['extension'][0]['outbound_caller_id_number'])."&src=".urlencode($_SESSION['user']['extension'][0]['user'])."&dest=".urlencode($row['destination_number'])."&rec=false&ringback=us-ring&auto_answer=true');\">\n";
if (is_numeric($row['destination_number'])) { if (is_numeric($row['destination_number'])) {
echo format_phone($row['destination_number'])."\n"; echo format_phone($row['destination_number'])."\n";
@ -432,11 +436,18 @@ else {
if (permission_exists("xml_cdr_mos")) { if (permission_exists("xml_cdr_mos")) {
echo " <td valign='top' class='".$row_style[$c]."' ".((strlen($row['rtp_audio_in_mos']) > 0) ? "title='".($row['rtp_audio_in_mos'] / 5 * 100)."%'" : null).">".((strlen($row['rtp_audio_in_mos']) > 0) ? $row['rtp_audio_in_mos'] : "&nbsp;")."</td>\n"; echo " <td valign='top' class='".$row_style[$c]."' ".((strlen($row['rtp_audio_in_mos']) > 0) ? "title='".($row['rtp_audio_in_mos'] / 5 * 100)."%'" : null).">".((strlen($row['rtp_audio_in_mos']) > 0) ? $row['rtp_audio_in_mos'] : "&nbsp;")."</td>\n";
} }
echo " <td valign='top' class='".$row_style[$c]."'>";
if (if_group("admin") || if_group("superadmin")) { if (if_group("admin") || if_group("superadmin")) {
echo " <td valign='top' class='".$row_style[$c]."'><a href='xml_cdr_details.php?uuid=".$row['uuid']."'>".$hangup_cause."</a></td>\n"; echo "<a href='xml_cdr_details.php?uuid=".$row['uuid']."'>".$hangup_cause."</a>";
} }
else { else {
echo " <td valign='top' class='".$row_style[$c]."'>".$hangup_cause."</td>\n"; echo $hangup_cause;
}
echo " </td>\n";
if (if_group("admin") || if_group("superadmin")) {
echo " <td class='list_control_icon' width='25px;'>";
echo " <a href='xml_cdr_details.php?uuid=".$row['uuid']."' alt='".$text['button-view']."'>$v_link_label_view</a>";
echo " </td>\n";
} }
echo "</tr>\n"; echo "</tr>\n";
if ($c==0) { $c=1; } else { $c=0; } if ($c==0) { $c=1; } else { $c=0; }

View File

@ -70,6 +70,7 @@ form {
} }
td.list_control_icons { td.list_control_icons {
/* multiple icons exist (horizontally) */
padding: none; padding: none;
padding-left: 3px; padding-left: 3px;
width: 50px; width: 50px;
@ -78,6 +79,16 @@ td.list_control_icons {
white-space: nowrap; white-space: nowrap;
} }
td.list_control_icon {
/* a single icon exists */
padding: none;
padding-left: 3px;
width: 25px;
text-align: right;
vertical-align: top;
white-space: nowrap;
}
INPUT.btn { INPUT.btn {
font-family: verdana; font-family: verdana;
font-size: 11px; font-size: 11px;

View File

@ -70,6 +70,7 @@ form {
} }
td.list_control_icons { td.list_control_icons {
/* multiple icons exist (horizontally) */
padding: none; padding: none;
padding-left: 3px; padding-left: 3px;
width: 50px; width: 50px;
@ -78,6 +79,16 @@ td.list_control_icons {
white-space: nowrap; white-space: nowrap;
} }
td.list_control_icon {
/* a single icon exists */
padding: none;
padding-left: 3px;
width: 25px;
text-align: right;
vertical-align: top;
white-space: nowrap;
}
INPUT.btn { INPUT.btn {
font-family: verdana; font-family: verdana;
font-size: 11px; font-size: 11px;

View File

@ -84,6 +84,7 @@ form {
} }
td.list_control_icons { td.list_control_icons {
/* multiple icons exist (horizontally) */
padding: none; padding: none;
padding-left: 3px; padding-left: 3px;
width: 50px; width: 50px;
@ -92,6 +93,16 @@ td.list_control_icons {
white-space: nowrap; white-space: nowrap;
} }
td.list_control_icon {
/* a single icon exists */
padding: none;
padding-left: 3px;
width: 25px;
text-align: right;
vertical-align: top;
white-space: nowrap;
}
INPUT.btn { INPUT.btn {
font-family: verdana; font-family: verdana;
font-size: 11px; font-size: 11px;

View File

@ -109,6 +109,7 @@ td {
} }
td.list_control_icons { td.list_control_icons {
/* multiple icons exist (horizontally) */
padding: none; padding: none;
padding-left: 3px; padding-left: 3px;
width: 50px; width: 50px;
@ -117,6 +118,16 @@ td.list_control_icons {
white-space: nowrap; white-space: nowrap;
} }
td.list_control_icon {
/* a single icon exists */
padding: none;
padding-left: 3px;
width: 25px;
text-align: right;
vertical-align: top;
white-space: nowrap;
}
img.list_control_icon { img.list_control_icon {
margin: 2px; margin: 2px;
width: 21px; width: 21px;
@ -804,7 +815,7 @@ legend {
// on a table with a class of 'tr_hover', according to the href // on a table with a class of 'tr_hover', according to the href
// attribute of the <tr> tag // attribute of the <tr> tag
$('.tr_hover tr').each(function(i,e) { $('.tr_hover tr').each(function(i,e) {
$(e).children('td:not(:last)').click(function() { $(e).children('td:not(.list_control_icon,.list_control_icons,.tr_link_void)').click(function() {
var href = $(this).closest("tr").attr("href"); var href = $(this).closest("tr").attr("href");
if (href) { window.location = href; } if (href) { window.location = href; }
}); });

View File

@ -103,6 +103,7 @@ form {
} }
td.list_control_icons { td.list_control_icons {
/* multiple icons exist (horizontally) */
padding: none; padding: none;
padding-left: 3px; padding-left: 3px;
width: 50px; width: 50px;
@ -111,6 +112,16 @@ td.list_control_icons {
white-space: nowrap; white-space: nowrap;
} }
td.list_control_icon {
/* a single icon exists */
padding: none;
padding-left: 3px;
width: 25px;
text-align: right;
vertical-align: top;
white-space: nowrap;
}
INPUT.btn { INPUT.btn {
font-family: verdana; font-family: verdana;
font-size: 11px; font-size: 11px;