(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
+1 -1
View File
@@ -117,7 +117,7 @@ require_once "resources/paging.php";
if ($result_count > 0) {
foreach($result as $row) {
$tr_link = " onclick=\"document.location.href='menu_edit.php?id=".$row['menu_uuid']."';\"";
$tr_link = "href='menu_edit.php?id=".$row['menu_uuid']."'";
echo "<tr ".$tr_link.">\n";
echo " <td valign='top' class='".$row_style[$c]."'><a href='menu_edit.php?id=".$row['menu_uuid']."'>".$row['menu_name']."</a></td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['menu_language']."</td>\n";
+2 -2
View File
@@ -101,7 +101,7 @@ function build_db_child_menu_list ($db, $menu_item_level, $menu_item_uuid, $c) {
}
//display the content of the list
$tr_link = (permission_exists('menu_edit')) ? " onclick=\"document.location.href='menu_item_edit.php?id=".$menu_uuid."&menu_item_uuid=".$row2['menu_item_uuid']."&menu_item_parent_uuid=".$row2['menu_item_parent_uuid']."';\"" : null;
$tr_link = (permission_exists('menu_edit')) ? "href='menu_item_edit.php?id=".$menu_uuid."&menu_item_uuid=".$row2['menu_item_uuid']."&menu_item_parent_uuid=".$row2['menu_item_parent_uuid']."'" : null;
echo "<tr ".$tr_link.">\n";
echo "<td valign='top' class='".$row_style[$c]."'>";
echo " <table cellpadding='0' cellspacing='0' border='0'>";
@@ -269,7 +269,7 @@ $order = $_GET["order"];
}
//display the content of the list
$tr_link = (permission_exists('menu_edit')) ? " onclick=\"document.location.href='menu_item_edit.php?id=".$menu_uuid."&menu_item_uuid=".$row['menu_item_uuid']."&menu_uuid=".$menu_uuid."';\"" : null;
$tr_link = (permission_exists('menu_edit')) ? "href='menu_item_edit.php?id=".$menu_uuid."&menu_item_uuid=".$row['menu_item_uuid']."&menu_uuid=".$menu_uuid."'" : null;
echo "<tr style='".$row_style[$c]."' ".$tr_link.">\n";
echo "<td valign='top' class='".$row_style[$c]."'>".$menu_item_title."&nbsp;</td>";
echo "<td valign='top' class='".$row_style[$c]."'>".$group_list."&nbsp;</td>";