Usability Enhancement: Click on list rows to Edit items.

This commit is contained in:
Nate Jones
2014-06-21 07:04:04 +00:00
parent d1dcf1de90
commit 84a134a23d
16 changed files with 110 additions and 92 deletions
+7 -13
View File
@@ -140,7 +140,7 @@ else {
$row_style["0"] = "row_style0";
$row_style["1"] = "row_style1";
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>".$text['table-extension']."</th>\n";
echo "<th>".$text['table-tools']."</th>\n";
@@ -149,20 +149,14 @@ else {
if ($result_count > 0) {
foreach($result as $row) {
echo "<tr >\n";
$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;
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";
if (permission_exists('call_forward')) {
echo " <a href='".PROJECT_PATH."/app/calls/call_edit.php?id=".$row['extension_uuid']."&a=call_forward' alt='Call Forward'>".$text['label-call-forward']."</a> \n";
echo " &nbsp;&nbsp;\n";
}
if (permission_exists('follow_me')) {
echo " <a href='".PROJECT_PATH."/app/calls/call_edit.php?id=".$row['extension_uuid']."&a=follow_me' alt='Follow Me'>".$text['label-follow-me']."</a> \n";
echo " &nbsp;&nbsp;\n";
}
if (permission_exists('do_not_disturb')) {
echo " <a href='".PROJECT_PATH."/app/calls/call_edit.php?id=".$row['extension_uuid']."&a=do_not_disturb' alt='Do Not Disturb'>".$text['label-dnd']."</a> \n";
}
if (permission_exists('call_forward')) { echo "<a href='".$tr_url."'>".$text['label-call-forward']."</a>&nbsp;&nbsp;&nbsp;"; }
if (permission_exists('follow_me')) { echo "<a href='".$tr_url."'>".$text['label-follow-me']."</a>&nbsp;&nbsp;&nbsp;"; }
if (permission_exists('do_not_disturb')) { echo "<a href='".$tr_url."'>".$text['label-dnd']."</a>"; }
echo " </td>\n";
echo " <td valign='top' class='row_stylebg' width='40%'>".$row['description']."&nbsp;</td>\n";
echo "</tr>\n";
+3 -2
View File
@@ -90,7 +90,7 @@ $order = $_GET["order"];
$row_style["1"] = "row_style1";
echo "<div align='left'>\n";
echo "<table width='100%' border='0' cellpadding='2' cellspacing='0'>\n";
echo "<table class='tr_hover' width='100%' border='0' cellpadding='2' cellspacing='0'>\n";
echo "<tr>";
echo th_order_by('rss_title', $text['label-title'], $order_by, $order);
echo th_order_by('rss_link', $text['label-link'], $order_by, $order);
@@ -110,7 +110,8 @@ $order = $_GET["order"];
if ($result_count > 0) {
foreach($result as $row) {
//print_r( $row );
echo "<tr style='".$row_style[$c]."'>\n";
$tr_link = " onclick=\"document.location.href='rssupdate.php?rss_uuid=".$row[rss_uuid]."';\"";
echo "<tr style='".$row_style[$c]."' ".$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>";
+1 -1
View File
@@ -163,7 +163,7 @@ else {
}
echo "<div align='center'>";
echo "<table border='0' width='90%' cellpadding='0' cellspacing='0'>\n";
echo "<table border='0' width='100%' cellpadding='0' cellspacing='0'>\n";
echo "<tr class='border'>\n";
echo " <td align=\"left\" width='100%'>\n";
+3 -2
View File
@@ -135,7 +135,7 @@ 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('device_uuid', $text['label-device_uuid'], $order_by, $order);
echo th_order_by('device_mac_address', $text['label-device_mac_address'], $order_by, $order);
@@ -164,7 +164,8 @@ 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);
echo "<tr >\n";
$tr_link = (permission_exists('device_edit')) ? " onclick=\"document.location.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']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>";
if (permission_exists('device_edit')) {
+3 -3
View File
@@ -136,7 +136,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('extension', $text['label-extension'], $order_by, $order);
echo th_order_by('call_group', $text['label-call_group'], $order_by, $order);
@@ -152,7 +152,7 @@ require_once "resources/paging.php";
if ($result_count > 0) {
foreach($result as $row) {
$tr_link = (permission_exists('extension_edit')) ? "style='cursor: pointer;' onclick=\"document.location.href='extension_edit.php?id=".$row['extension_uuid']."';\"" : null;
$tr_link = (permission_exists('extension_edit')) ? " onclick=\"document.location.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 @@ require_once "resources/paging.php";
echo "</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_group']."&nbsp;</td>\n";
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['voicemail_mail_to']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['enabled']."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".ucwords($row['enabled'])."</td>\n";
echo " <td valign='top' class='row_stylebg' width='30%'>".$row['description']."&nbsp;</td>\n";
echo " <td class='list_control_icons'>";
if (permission_exists('extension_edit')) {
+3 -2
View File
@@ -144,7 +144,7 @@ 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('gateway', $text['label-gateway'], $order_by, $order);
echo th_order_by('context', $text['label-context'], $order_by, $order);
@@ -164,7 +164,8 @@ else {
if ($num_rows > 0) {
foreach($result as $row) {
echo "<tr >\n";
$tr_link = (permission_exists('gateway_edit')) ? " onclick=\"document.location.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')) {
echo "<a href='gateway_edit.php?id=".$row['gateway_uuid']."'>".$row["gateway"]."</a>";
+13 -15
View File
@@ -246,19 +246,18 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='module_enabled'>\n";
echo " <option value=''></option>\n";
if ($module_enabled == "true") {
echo " <option value='true' SELECTED >".$text['option-true']."</option>\n";
}
else {
echo " <option value='true'>".$text['option-true']."</option>\n";
}
if ($module_enabled == "false") {
echo " <option value='false' SELECTED >".$text['option-false']."</option>\n";
}
else {
echo " <option value='false'>".$text['option-false']."</option>\n";
}
if ($module_enabled == "true") {
echo " <option value='true' SELECTED >".$text['option-true']."</option>\n";
}
else {
echo " <option value='true'>".$text['option-true']."</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo "\n";
@@ -271,19 +270,18 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='module_default_enabled'>\n";
echo " <option value=''></option>\n";
if ($module_default_enabled == "true") {
echo " <option value='true' SELECTED >".$text['option-true']."</option>\n";
}
else {
echo " <option value='true'>".$text['option-true']."</option>\n";
}
if ($module_default_enabled == "false") {
echo " <option value='false' SELECTED >".$text['option-false']."</option>\n";
echo " <option value='false' selected='selected'>".$text['option-false']."</option>\n";
}
else {
echo " <option value='false'>".$text['option-false']."</option>\n";
}
if ($module_default_enabled == "true") {
echo " <option value='true' selected='selected'>".$text['option-true']."</option>\n";
}
else {
echo " <option value='true'>".$text['option-true']."</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo "\n";
+3 -2
View File
@@ -114,7 +114,7 @@ if (strlen($_GET["a"]) > 0) {
$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";
$tmp_module_header = "\n";
$tmp_module_header .= "<tr>\n";
$tmp_module_header .= "<th>".$text['label-label']."</th>\n";
@@ -156,7 +156,8 @@ if (strlen($_GET["a"]) > 0) {
echo $tmp_module_header;
}
echo "<tr >\n";
$tr_link = (permission_exists('module_edit')) ? " onclick=\"document.location.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')) {
echo "<a href='module_edit.php?id=".$row["module_uuid"]."'>".$row["module_label"]."</a>";
+3 -2
View File
@@ -81,7 +81,7 @@ 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";
$tmp_var_header = '';
$tmp_var_header .= "<tr>\n";
@@ -127,7 +127,8 @@ else {
echo $tmp_var_header;
}
echo "<tr >\n";
$tr_link = (permission_exists('var_edit')) ? " onclick=\"document.location.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')) {
echo "<a href='var_edit.php?id=".$row['var_uuid']."'>".substr($row['var_name'],0,32)."</a>";
+15 -5
View File
@@ -9,7 +9,7 @@
</table>
<br />
<table width='100%' border='0' cellpadding='0' cellspacing='0'>
<table class="tr_hover" width='100%' border='0' cellpadding='0' cellspacing='0'>
<tr>
<th><?php echo $text['label-profile_name']?></th>
<th><?php echo $text['label-context']?></th>
@@ -29,12 +29,22 @@ $row_style["0"] = "row_style0";
$row_style["1"] = "row_style1";
foreach($profiles_array as $profile){
?>
<tr>
<td class='<?php echo $row_style[$c]; ?>'><?php echo $profile['profile_name']; ?>&nbsp;</td>
$tr_link = (permission_exists('xmpp_edit')) ? " onclick=\"document.location.href='xmpp_profile_edit.php?id=".$profile['xmpp_profile_uuid']."';\"" : null;
?>
<tr <?php echo $tr_link; ?>>
<td class='<?php echo $row_style[$c]; ?>'>
<?php
if (permission_exists('xmpp_edit')) {
?><a href='xmpp_profile_edit.php?id=<?php echo $profile['xmpp_profile_uuid']; ?>'><?php echo $profile['profile_name']; ?></a><?php
}
else {
echo $profile['profile_name'];
}
?>
</td>
<td class='<?php echo $row_style[$c]; ?>'><?php echo $profile['context']; ?>&nbsp;</td>
<td class='<?php echo $row_style[$c]; ?>'><?php echo $profile['status']; ?>&nbsp;</td>
<td class='<?php echo $row_style[$c]; ?>'><?php echo $profile['enabled']; ?>&nbsp;</td>
<td class='<?php echo $row_style[$c]; ?>'><?php echo ucwords($profile['enabled']); ?>&nbsp;</td>
<td class='<?php echo $row_style[$c]; ?>'><?php echo $profile['description']; ?>&nbsp;</td>
<td class='list_control_icons'>
<?php