Lines 48-54
KOHA.OpenLibrary = new function() {
Link Here
|
48 |
if (is_opacdetail) { |
48 |
if (is_opacdetail) { |
49 |
img.src = book.cover.medium; |
49 |
img.src = book.cover.medium; |
50 |
$(this).empty().append(img); |
50 |
$(this).empty().append(img); |
51 |
$(this).append('<div class="results_summary">' + '<a href="' + book.url + '">' + OL_PREVIEW + '</a></div>'); |
|
|
52 |
} else { |
51 |
} else { |
53 |
img.src = book.cover.medium; |
52 |
img.src = book.cover.medium; |
54 |
img.height = '110'; |
53 |
img.height = '110'; |
Lines 150-160
function create_query() {
Link Here
|
150 |
function make_read_button(bookdata) { |
149 |
function make_read_button(bookdata) { |
151 |
buttons = { |
150 |
buttons = { |
152 |
'full access': |
151 |
'full access': |
153 |
"http://openlibrary.org/images/button-read-open-library.png", |
152 |
"https://openlibrary.org/images/button-read-open-library.png", |
154 |
'lendable': |
153 |
'lendable': |
155 |
"http://openlibrary.org/images/button-borrow-open-library.png", |
154 |
"https://openlibrary.org/images/button-borrow-open-library.png", |
156 |
'checked out': |
155 |
'checked out': |
157 |
"http://openlibrary.org/images/button-checked-out-open-library.png" |
156 |
"https://openlibrary.org/images/button-checked-out-open-library.png" |
158 |
}; |
157 |
}; |
159 |
if (bookdata.items.length == 0) { |
158 |
if (bookdata.items.length == 0) { |
160 |
return false; |
159 |
return false; |
Lines 163-171
function make_read_button(bookdata) {
Link Here
|
163 |
if (!(first.status in buttons)) { |
162 |
if (!(first.status in buttons)) { |
164 |
return false; |
163 |
return false; |
165 |
} |
164 |
} |
166 |
result = '<a href="' + first.itemURL + '">' + |
165 |
result = '<a target="_blank" href="' + first.itemURL + '">' + |
167 |
'<img class="' + ol_button_classname + |
166 |
'<img class="' + ol_button_classname + |
168 |
'" src="' + buttons[first.status] + '"/></a>'; |
167 |
'" src="' + buttons[first.status] + '"/></a>'; |
|
|
168 |
console.log( result ); |
169 |
return result; |
169 |
return result; |
170 |
} |
170 |
} |
171 |
|
171 |
|
Lines 179-186
function default_decorate_el_fn(el, bookdata) {
Link Here
|
179 |
} |
179 |
} |
180 |
if (decoration) { |
180 |
if (decoration) { |
181 |
el.innerHTML += decoration; |
181 |
el.innerHTML += decoration; |
|
|
182 |
el.style.display = 'block' |
182 |
} else { |
183 |
} else { |
183 |
el.style.visibility = 'hidden'; |
184 |
el.style.display = 'none'; |
184 |
} |
185 |
} |
185 |
} |
186 |
} |
186 |
|
187 |
|
187 |
- |
|
|