The Action used
// Show all entries as buttons (no action on click)
(function() {
var entries = lib().entries() || [];
var layout = [];
entries.forEach(function(e) {
layout.push(
ui().button(
e.name) // Display the entry name on the button
.width(600)
.font({ size: 14, style: "bold" })
.action(function() { return true; }) // Does nothing when clicked
);
layout.push(ui().text("").height(6)); // Space between buttons
});
if (layout.length === 0) {
layout.push(ui().text("No entries found").font({ size: 14, style: "bold" }));
}
dialog()
.title("All Library Entries")
.view(ui().layout(layout, "vertical"))
.positiveButton("Close", function() { return true; })
.show();
})();