(Modified) Usability Enhancement: Click on list rows to Edit items. Now uses jQuery (instead of onclick) to avoid being redirected to Edit when canceling a Delete.

This commit is contained in:
Nate Jones
2014-06-21 08:52:47 +00:00
parent 3c2e32d197
commit 59687a4785
22 changed files with 51 additions and 33 deletions
+15 -6
View File
@@ -189,13 +189,13 @@ else {
$row_style["1"] = "row_style1";
echo "<div align='center'>\n";
echo "<table 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 th_order_by('dialplan_name', $text['label-name'], $order_by, $order, $app_uuid);
echo th_order_by('dialplan_number', $text['label-number'], $order_by, $order, $app_uuid);
echo th_order_by('dialplan_context', $text['label-context'], $order_by, $order, $app_uuid);
echo th_order_by('dialplan_order', $text['label-order'], $order_by, $order, $app_uuid);
echo th_order_by('dialplan_enabled', $text['label-enabled'], $order_by, $order, $app_uuid);
echo th_order_by('dialplan_order', $text['label-order'], $order_by, $order, $app_uuid, "style='text-align: center;'");
echo th_order_by('dialplan_enabled', $text['label-enabled'], $order_by, $order, $app_uuid, "style='text-align: center;'");
echo th_order_by('dialplan_description', $text['label-description'], $order_by, $order, $app_uuid);
echo "<td class='list_control_icons'>";
if ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4" && permission_exists('inbound_route_add')) {
@@ -244,7 +244,16 @@ else {
}
unset ($prep_statement);
}
echo "<tr >\n";
if (
($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4" && permission_exists('inbound_route_edit')) ||
($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3" && permission_exists('outbound_route_edit')) ||
($app_uuid == "16589224-c876-aeb3-f59f-523a1c0801f7" && permission_exists('fifo_edit')) ||
($app_uuid == "4b821450-926b-175a-af93-a03c441818b1" && permission_exists('time_condition_edit')) ||
permission_exists('dialplan_edit')
) {
$tr_link = "href='dialplan_edit.php?id=".$row['dialplan_uuid']."&app_uuid=".$app_uuid."'";
}
echo "<tr ".$tr_link.">\n";
echo " <td valign='top' class='".$row_style[$c]."'>";
if (
($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4" && permission_exists('inbound_route_edit')) ||
@@ -261,8 +270,8 @@ else {
echo " </td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".((strlen($row['dialplan_number']) > 0) ? $row['dialplan_number'] : "&nbsp;")."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['dialplan_context']."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['dialplan_order']."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".ucwords($row['dialplan_enabled'])."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."' style='text-align: center;'>".$row['dialplan_order']."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."' style='text-align: center;'>".ucwords($row['dialplan_enabled'])."</td>\n";
echo " <td valign='top' class='row_stylebg' width='30%'>".((strlen($row['dialplan_description']) > 0) ? $row['dialplan_description'] : "&nbsp;")."</td>\n";
echo " <td class='list_control_icons'>\n";
if (