Add utility functions for building drop-down library lists

A XUL one for the current use in Advanced Search and an HTML one for
future uses. Sets the value to libraryID and adds data attributes for
editable/filesEditable on the HTML one.
This commit is contained in:
Dan Stillman 2017-12-08 00:01:24 -05:00
parent 36436d0b43
commit 045f1fbb7e
3 changed files with 58 additions and 41 deletions

View file

@ -202,7 +202,7 @@ describe("Advanced Search", function () {
for (let i = 0; i < libraryMenu.itemCount; i++) {
let menuitem = libraryMenu.getItemAtIndex(i);
// Switch to group library
if (menuitem.getAttribute('libraryID') == groupLibraryID) {
if (menuitem.value == groupLibraryID) {
menuitem.click();
break;
}