(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:
+1
-1
@@ -150,7 +150,7 @@ else {
|
||||
if ($result_count > 0) {
|
||||
foreach($result as $row) {
|
||||
$tr_url = PROJECT_PATH."/app/calls/call_edit.php?id=".$row['extension_uuid'];
|
||||
$tr_link = (permission_exists('call_forward') || permission_exists('follow_me') || permission_exists('do_not_disturb')) ? " onclick=\"document.location.href='".$tr_url."';\"" : null;
|
||||
$tr_link = (permission_exists('call_forward') || permission_exists('follow_me') || permission_exists('do_not_disturb')) ? "href='".$tr_url."'" : null;
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['extension']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>\n";
|
||||
|
||||
@@ -96,7 +96,7 @@ $order = $_GET["order"];
|
||||
echo th_order_by('rss_link', $text['label-link'], $order_by, $order);
|
||||
//echo th_order_by('rss_sub_category', 'Template', $order_by, $order);
|
||||
echo th_order_by('rss_group', $text['label-group'], $order_by, $order);
|
||||
echo th_order_by('rss_order', $text['label-order'], $order_by, $order);
|
||||
echo th_order_by('rss_order', $text['label-order'], $order_by, $order, '', "style='text-align: center;'");
|
||||
if ($result_count == 0) { //no results
|
||||
echo "<td class='list_control_icons'>\n";
|
||||
}
|
||||
@@ -110,8 +110,8 @@ $order = $_GET["order"];
|
||||
if ($result_count > 0) {
|
||||
foreach($result as $row) {
|
||||
//print_r( $row );
|
||||
$tr_link = " onclick=\"document.location.href='rssupdate.php?rss_uuid=".$row[rss_uuid]."';\"";
|
||||
echo "<tr style='".$row_style[$c]."' ".$tr_link.">\n";
|
||||
$tr_link = "href='rssupdate.php?rss_uuid=".$row[rss_uuid]."'";
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
//echo "<td valign='top'><a href='rssupdate.php?rss_uuid=".$row[rss_uuid]."'>".$row[rss_uuid]."</a></td>";
|
||||
//echo "<td valign='top'>".$row[rss_category]."</td>";
|
||||
|
||||
@@ -141,7 +141,7 @@ $order = $_GET["order"];
|
||||
//echo "<td valign='top'>".$row[rss_optional_3]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_optional_4]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_optional_5]."</td>";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$row[rss_order]."</td>";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' style='text-align: center;'>".$row[rss_order]."</td>";
|
||||
|
||||
//echo "<td valign='top' align='center'>";
|
||||
//echo " <input type='button' class='btn' name='' onclick=\"window.location='rssmoveup.php?menuparentid=".$row[menuparentid]."&rss_uuid=".$row[rss_uuid]."&rss_order=".$row[rss_order]."'\" value='<' title='".$row[rss_order].". Move Up'>";
|
||||
|
||||
@@ -134,7 +134,7 @@ require_once "resources/paging.php";
|
||||
$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('destination_type', $text['label-destination_type'], $order_by, $order);
|
||||
echo th_order_by('destination_number', $text['label-destination_number'], $order_by, $order);
|
||||
@@ -144,10 +144,10 @@ require_once "resources/paging.php";
|
||||
echo "<td class='list_control_icons'>";
|
||||
echo "<a href='destination_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
echo "</td>\n";
|
||||
echo "<tr>\n";
|
||||
if ($result_count > 0) {
|
||||
foreach($result as $row) {
|
||||
echo "<tr >\n";
|
||||
$tr_link = "href='destination_edit.php?id=".$row['destination_uuid']."'";
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".ucwords($row['destination_type'])."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'><a href='destination_edit.php?id=".$row['destination_uuid']."'>".$row['destination_number']."</a></td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['destination_context']."</td>\n";
|
||||
|
||||
@@ -164,7 +164,7 @@ else {
|
||||
$device_mac_address = $row[device_mac_address];
|
||||
$device_mac_address = substr($device_mac_address, 0,2).'-'.substr($device_mac_address, 2,2).'-'.substr($device_mac_address, 4,2).'-'.substr($device_mac_address, 6,2).'-'.substr($device_mac_address, 8,2).'-'.substr($device_mac_address, 10,2);
|
||||
|
||||
$tr_link = (permission_exists('device_edit')) ? " onclick=\"document.location.href='device_edit.php?id=".$row['device_uuid']."';\"" : null;
|
||||
$tr_link = (permission_exists('device_edit')) ? "href='device_edit.php?id=".$row['device_uuid']."'" : null;
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['device_uuid']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
|
||||
@@ -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'] : " ")."</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'] : " ")."</td>\n";
|
||||
echo " <td class='list_control_icons'>\n";
|
||||
if (
|
||||
|
||||
@@ -152,7 +152,7 @@ require_once "resources/paging.php";
|
||||
|
||||
if ($result_count > 0) {
|
||||
foreach($result as $row) {
|
||||
$tr_link = (permission_exists('extension_edit')) ? " onclick=\"document.location.href='extension_edit.php?id=".$row['extension_uuid']."';\"" : null;
|
||||
$tr_link = (permission_exists('extension_edit')) ? " href='extension_edit.php?id=".$row['extension_uuid']."'" : null;
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if (permission_exists('extension_edit')) {
|
||||
|
||||
@@ -164,7 +164,7 @@ else {
|
||||
|
||||
if ($num_rows > 0) {
|
||||
foreach($result as $row) {
|
||||
$tr_link = (permission_exists('gateway_edit')) ? " onclick=\"document.location.href='gateway_edit.php?id=".$row['gateway_uuid']."';\"" : null;
|
||||
$tr_link = (permission_exists('gateway_edit')) ? "href='gateway_edit.php?id=".$row['gateway_uuid']."'" : null;
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if (permission_exists('gateway_edit')) {
|
||||
|
||||
@@ -156,7 +156,7 @@ if (strlen($_GET["a"]) > 0) {
|
||||
echo $tmp_module_header;
|
||||
}
|
||||
|
||||
$tr_link = (permission_exists('module_edit')) ? " onclick=\"document.location.href='module_edit.php?id=".$row["module_uuid"]."';\"" : null;
|
||||
$tr_link = (permission_exists('module_edit')) ? "href='module_edit.php?id=".$row["module_uuid"]."'" : null;
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if (permission_exists('module_edit')) {
|
||||
|
||||
@@ -106,7 +106,7 @@ require_once "resources/paging.php";
|
||||
echo "</td>\n";
|
||||
if ($num_rows > 0) {
|
||||
foreach($result as $row) {
|
||||
$tr_link = (permission_exists('sip_profile_setting_edit')) ? " onclick=\"document.location.href='sip_profile_setting_edit.php?sip_profile_uuid=".$row['sip_profile_uuid']."&id=".$row['sip_profile_setting_uuid']."';\"" : null;
|
||||
$tr_link = (permission_exists('sip_profile_setting_edit')) ? "href='sip_profile_setting_edit.php?sip_profile_uuid=".$row['sip_profile_uuid']."&id=".$row['sip_profile_setting_uuid']."'" : null;
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if (permission_exists('sip_profile_setting_edit')) {
|
||||
|
||||
@@ -123,7 +123,7 @@ require_once "resources/paging.php";
|
||||
|
||||
if ($result_count > 0) {
|
||||
foreach($result as $row) {
|
||||
$tr_link = (permission_exists('sip_profile_edit')) ? " onclick=\"document.location.href='sip_profile_edit.php?id=".$row['sip_profile_uuid']."';\"" : null;
|
||||
$tr_link = (permission_exists('sip_profile_edit')) ? "href='sip_profile_edit.php?id=".$row['sip_profile_uuid']."'" : null;
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if (permission_exists('sip_profile_edit')) {
|
||||
|
||||
+1
-1
@@ -127,7 +127,7 @@ else {
|
||||
echo $tmp_var_header;
|
||||
}
|
||||
|
||||
$tr_link = (permission_exists('var_edit')) ? " onclick=\"document.location.href='var_edit.php?id=".$row['var_uuid']."';\"" : null;
|
||||
$tr_link = (permission_exists('var_edit')) ? "href='var_edit.php?id=".$row['var_uuid']."'" : null;
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
echo " <td valign='top' align='left' class='".$row_style[$c]."'>";
|
||||
if (permission_exists('var_edit')) {
|
||||
|
||||
@@ -29,7 +29,7 @@ $row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
||||
foreach($profiles_array as $profile){
|
||||
$tr_link = (permission_exists('xmpp_edit')) ? " onclick=\"document.location.href='xmpp_profile_edit.php?id=".$profile['xmpp_profile_uuid']."';\"" : null;
|
||||
$tr_link = (permission_exists('xmpp_edit')) ? "href='xmpp_profile_edit.php?id=".$profile['xmpp_profile_uuid']."'" : null;
|
||||
?>
|
||||
<tr <?php echo $tr_link; ?>>
|
||||
<td class='<?php echo $row_style[$c]; ?>'>
|
||||
|
||||
Reference in New Issue
Block a user