A few minor changes: Tweaking amazon image js to try to fix spotty behavior (not very successfully), adding "renew all" button to opac-user, though it doesn't actually work yet.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Owen Leonard 2007-11-26 14:59:56 -06:00 committed by Joshua Ferraro
parent aee15ef86f
commit 71578b5dcf
5 changed files with 31 additions and 40 deletions

View File

@ -9,7 +9,6 @@ a, a:visited {
}
a:hover {
text-decoration : none;
color : #990033;
}
@ -516,31 +515,12 @@ em {
font-style : italic;
}
#catalogue_detail_biblio {
font-size : 90%;
clear : left;
margin: .9em 0 0 0;
padding: 0;
width: 100%;
}
#catalogue_detail_biblio p span.label {
float: left;
font-weight : bold;
width: 11em;
margin-right: 1em;
}
#catalogue_detail_biblio p {
float : left;
clear : left;
padding-bottom: .3em;
list-style-type: none;
width: 100%;
}
#catalogue_detail_biblio p span.biblionotes {
margin-left : 6em;
padding-bottom: .6em;
}
.toptabs {
@ -596,9 +576,13 @@ em {
}
#bookcover {
padding : 1em;
margin : 0 1em 1em 0;
float : left;
margin : 0;
padding : 0;
}
#bookcover img {
margin : 0 1em 1em 0;
}
fieldset.brief {

View File

@ -15,6 +15,7 @@
<script type="text/javascript" language="javascript" src="../..<!-- TMPL_VAR NAME="themelang" -->/js/script.js"></script>
<script type="text/javascript" language="javascript" src="../..<!-- TMPL_VAR NAME="themelang" -->/js/basket.js"></script>
<script type="text/javascript" language="javascript">
//<![CDATA[
function _(s) { return s } // dummy function for gettext
var MSG_BASKET_EMPTY = _("You book bag is currently empty");
var MSG_RECORD_IN_BASKET = _("This item is already in your book bag");
@ -23,10 +24,10 @@
var MSG_NRECORDS_IN_BASKET = _("already in the bag");
var MSG_NO_RECORD_SELECTED = _("No item was selected");
var MSG_NO_RECORD_ADDED = _("No item was added to your book bag");
<!-- TMPL_IF NAME="AmazonContent" --> $(document).ready(function() {
//verify_images();
});
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="AmazonContent" -->$(document).ready(function() {
verify_images();
});<!-- /TMPL_IF -->
//]]>
</script>
<!-- TMPL_IF NAME="opacuserjs" -->
<script language="JavaScript" type="text/javascript">

View File

@ -1,15 +1,14 @@
// http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
function verify_images() {
for (var i = 0; i < document.images.length; i++) {
img = document.images[i];
if ((img.src.indexOf('images.amazon.com') >= 0) || (img.src.indexOf('g-images.amazon.com') >=0)) {
w = img.width;
h = img.height;
$("img").each(function(i){
if ((this.src.indexOf('images.amazon.com') >= 0) || (this.src.indexOf('g-images.amazon.com') >=0)) {
w = this.width;
h = this.height;
if ((w == 1) || (h == 1)) {
img.src = 'http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
} else if ((img.complete != null) && (!img.complete)) {
img.src = 'http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
this.src = 'http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
} else if ((this.complete != null) && (!this.complete)) {
this.src = 'http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
}
}
}
}
});
}

View File

@ -118,8 +118,7 @@
<tr>
<!-- /TMPL_IF -->
<td><!-- TMPL_IF NAME="AmazonContent" -->
<a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
<img src="<!-- TMPL_IF NAME="isbn" -->http://images.amazon.com/images/P/<!-- TMPL_VAR name="isbn" -->.01.TZZZZZZZ.jpg<!-- TMPL_ELSE -->http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif<!-- /TMPL_IF -->" alt="image" class="thumbnail" />
<a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_IF NAME="isbn" --><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR name="isbn" -->.01.TZZZZZZZ.jpg" alt="" class="thumbnail" /><!-- TMPL_ELSE --><img src="http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif" alt="" class="thumbnail" /><!-- /TMPL_IF -->
</a>
<!-- TMPL_ELSE -->
<!-- TMPL_IF name="imageurl" -->
@ -139,7 +138,7 @@
<!-- TMPL_IF name="timestamp" --> <i>(modified on <!-- TMPL_VAR name="timestamp" -->)</i><!-- /TMPL_IF --></p>
<p class="availability">
<!-- TMPL_IF NAME="items_loop" -->
<span class="available"><strong><!-- TMPL_IF NAME="items_count" --><!-- TMPL_VAR NAME="items_count" --><!-- /TMPL_IF --> copies available at:</strong> <!-- TMPL_LOOP NAME="items_loop" --><!-- <!-- TMPL_VAR NAME="branchcode" --> --><!-- TMPL_VAR NAME="branchname" --><!-- TMPL_IF name="cn_class" -->[<a href="/cgi-bin/koha/opac-search.pl?q=callnum:<!-- TMPL_VAR NAME="cn_class" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="cn_class" --></a>]<!-- /TMPL_IF -->(<!-- TMPL_VAR NAME="count" -->),<!-- /TMPL_LOOP --></span>
<span class="available"><strong><!-- TMPL_IF NAME="items_count" --><!-- TMPL_VAR NAME="items_count" --><!-- /TMPL_IF --> copies available at:</strong> <!-- TMPL_LOOP NAME="items_loop" --><!-- <!-- TMPL_VAR NAME="branchcode" --> --><!-- TMPL_VAR NAME="branchname" --><!-- TMPL_IF name="cn_class" -->[<a href="/cgi-bin/koha/opac-search.pl?q=callnum:<!-- TMPL_VAR NAME="cn_class" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="cn_class" --></a>]<!-- /TMPL_IF -->(<!-- TMPL_VAR NAME="count" -->), <!-- /TMPL_LOOP --></span>
<!-- TMPL_ELSE -->
<span class="unavailable">No copies available: </span>
<!-- /TMPL_IF -->

View File

@ -171,6 +171,14 @@
</tr>
<!-- /TMPL_LOOP -->
</table>
<form action="/cgi-bin/koha/opac-renew.pl" method="post">
<input type="hidden" name="from" value="opac_user" />
<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
<!-- TMPL_LOOP NAME="ISSUES" -->
<input type="hidden" name="item" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
<!-- /TMPL_LOOP -->
<input type="submit" value="Renew All" />
</form>
<!-- TMPL_ELSE -->
<table>
<caption>Issues</caption>