Updating the enter key handler so that the user is redirected to the url of the last link (Edit link) in the related element instead of the first link.

When hitting enter, the expected behavior is to go and edit the content type or part that occurs first in the list.
This commit is contained in:
Sipke Schoorstra 2013-09-07 19:37:06 -07:00
parent 0ee1e23fa7
commit ad6abdc6a6

View File

@ -6,7 +6,7 @@
if (e.keyCode == 13) {
var visibleRows = $("[data-record-text]:visible");
if (visibleRows.length > 0) {
var editLink = $("a", visibleRows[0]);
var editLink = $(".related a:last", visibleRows[0]);
location.href = editLink.attr("href");
} else {
var primaryButton = $("#layout-main .manage .primaryAction");