Commit b34817aa authored by haemmer's avatar haemmer

Preselect selected entry in drop down list

parent fd9ff949
......@@ -250,7 +250,15 @@ function getImageElement(sourceElement,iconPath) {
showList(listControl)
textControl.focus().select();
}
// Highlight selected item
var selectElement = getSelectControlFromOtherControl(listControl);
var selectedListElement = $("[savedValue='" + selectElement.val() + "']");
selectedListElement.addClass("idd_listItem_Hover");
// Scroll to proper list entry
listControl.scrollTop(selectedListElement.position().top + listControl.scrollTop() - 30);
event.stopPropagation();
return false;
});
......@@ -307,7 +315,7 @@ function populateList(existingSelectControl, newListControl,noMatchesText,noItem
var noItemsHeader = getListGroupItem(noItemsText,true).addClass('idd_message');
newListControl.append(noItemsHeader);
}
sourceListItems.each(
function () {
if (isOptGroup($(this))) {
......@@ -317,6 +325,7 @@ function populateList(existingSelectControl, newListControl,noMatchesText,noItem
populateListItem(newListControl, $(this));
}
});
}
function populateListGroupItem(newListControl, optionGroupItem) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment