2 var Links = new function() {
5 self.href = function(view, par) {
9 self.button = function(view, par, text, offset) {
11 var html = "<div class='button button-"+view+"' onclick='History.visit(\"" +
12 self.href(view, par).replace(/["']/g, "\\$&") + "\", "+offset+");'>";
14 if (icon != 'Book' && icon != 'Bookmarks' && icon != 'BookText' &&
15 icon != 'Last' && icon != 'Tag') {
18 html += "<img src='img/icon-" + icon + ".png' />";
19 html += "<div class='label'>" + text + "</div>";
20 html += "<div class='clr'></div>";
25 self.bookLink = function(book) {
30 // this assumes that either book has a html XOR it has children
32 note = "<div class='note'>";
36 note += book.pretty_size;
41 return self.button(target, book.id,
42 "<div class='sub'>" + book.authors + "</div>" +
46 self.deleteButton = function(id) {
47 return "<div class='delete' onClick='History.deleteBookmark(\""+id+"\");'>x</div>";