bug 94590, remove dup entries from wallet preview dialog, r=law, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@103861 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -56,7 +56,20 @@ function Startup() {
|
||||
menuItem.setAttribute("selected", "true");
|
||||
}
|
||||
menuItem.setAttribute("label", prefillList[i+2]);
|
||||
menuPopup.appendChild(menuItem);
|
||||
|
||||
/* avoid making duplicate entries in the same menulist */
|
||||
var child = menuPopup.firstChild;
|
||||
var alreadyThere = false;
|
||||
while (child) {
|
||||
if (child.getAttribute("label") == prefillList[i+2]) {
|
||||
alreadyThere = true;
|
||||
break;
|
||||
}
|
||||
child = child.nextSibling;
|
||||
}
|
||||
if (!alreadyThere) {
|
||||
menuPopup.appendChild(menuItem);
|
||||
}
|
||||
|
||||
if(count == 0) {
|
||||
var menuList = document.createElement("menulist");
|
||||
|
||||
Reference in New Issue
Block a user