Check the values returned from OverDrive API. If number of copies owned is greater than 9000 display "Always available" instead of using the large numbers
dojo.create("li", { innerHTML: f }, formats_ul);
});
var status_node = dojo.byId(ebook.rec_id + '_status');
- var status_str = holdings.copies_available + ' of ' + holdings.copies_owned + ' available';
+ if ( holdings.copies_owned > 9000) {
+ var status_str = "Always available";
+ }
+ else {
+ var status_str = holdings.copies_available + ' of ' + holdings.copies_owned + ' available';
+ }
status_node.innerHTML = status_str;
dojo.removeClass(ebook.rec_id + '_ebook_holdings', "hidden");
}