Fixing "check all" function in search results; Using javascript to generate book bag and list buttons, since those functions depend on javascript being enabled.Also adding help.css, missing from yesterday's help file commits.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Owen Leonard 2008-01-27 13:17:32 -06:00 committed by Joshua Ferraro
parent 5ccfb0963c
commit 07e4359b52
4 changed files with 65 additions and 27 deletions

View file

@ -0,0 +1,5 @@
/* help.css For inclusion on help pages */
body#help {
padding : 1em;
}

View file

@ -242,8 +242,10 @@ input[type=submit]:active, input[type=button], input[type=reset] {
border: 1px inset #666666;
}
p.searchresults {
td.resultscontrol {
background-color : #EFF1DC;
vertical-align : middle;
padding : 3px 3px 5px 5px;
}
table {
@ -695,11 +697,12 @@ a.cancel {
margin-right : .1em;
}
.searchresults input, .searchresults label, .searchresults select {
.resultscontrol input, .resultscontrol label, .resultscontrol select {
font-size: 90%;
margin-top : 4px;
}
.searchresults label {
.resort {
float : right;
margin-top : 5px;
}
@ -714,19 +717,11 @@ a.cancel {
padding-top : .6em;
}
.searchresults p img {
td.resultscontrol img {
vertical-align: middle;
}
.searchresults table td {
vertical-align: top;
}
p.searchresults {
background-color : #EFF1DC;
margin-top : -5px;
vertical-align : middle;
padding : 3px 3px 5px 5px;
}
.searchresults table {

View file

@ -5,11 +5,46 @@
<!-- TMPL_ELSE -->
You did not specify any search criteria
<!-- /TMPL_IF -->
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<link rel="alternate" type="application/rss+xml" title="Koha - RSS"
href="/cgi-bin/koha/opac-rss.pl?<!-- TMPL_VAR name="query_cgi"--><!-- TMPL_VAR NAME="limit_cgi" -->">
href="/cgi-bin/koha/opac-rss.pl?<!-- TMPL_VAR name="query_cgi"--><!-- TMPL_VAR NAME="limit_cgi" -->" />
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.checkboxes.pack.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#sortsubmit').hide();
$('#sort_by').change(function() {
$('#bookbag_form').submit();
});
$("span.bookbag").html("<input type=\"button\" class=\"icon shelf\" value=\"Add checked items to book bag\" id=\"addMultiple\" />");
$('#addMultiple').click(function(){
addMultiple();
return false;
})
$("span.lists").html("<input type=\"button\" class=\"icon shelf\" value=\"Add Checked Items to Lists\" id=\"addtoList\" />");
$('#addtoList').click(function(){
<!-- TMPL_IF NAME="loggedinusername" -->if (vShelfAdd()) {
Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?' + vShelfAdd());
}<!-- TMPL_ELSE --> alert('You must be logged in to create or add to Lists'); <!-- /TMPL_IF -->
return false;
});
$("span.clearall").html("<input type=\"reset\" value=\"Clear All\" class=\"icon shelf\" />");
$("span.checkall").html("<a href=\"#\" id=\"CheckAll\"><img src=\"/opac-tmpl/prog/images/checkall.gif\" alt=\"Check All\" border=\"0\" /></a><a href=\"#\" id=\"CheckNone\"><img src=\"/opac-tmpl/prog/images/checknone.gif\" alt=\"Check None\" border=\"0\" /></a>");
$('#CheckNone').hide();
$("#CheckAll").click(function(){
$("#bookbag_form").checkCheckboxes();
$('#CheckAll').hide();
$('#CheckNone').show();
return false;
});
$("#CheckNone").click(function(){
$("#bookbag_form").unCheckCheckboxes();
$('#CheckAll').show();
$('#CheckNone').hide();
return false;
});
});</script>
</head>
<body>
<!--TMPL_INCLUDE NAME="masthead.inc" -->
@ -80,7 +115,11 @@ href="/cgi-bin/koha/opac-rss.pl?<!-- TMPL_VAR name="query_cgi"--><!-- TMPL_VAR N
<th>Count</th>
</tr>
<!-- TMPL_LOOP NAME="SEARCH_RESULTS" -->
<tr<!-- TMPL_IF name="even" --> class="highlight"<!-- /TMPL_IF -->>
<!-- TMPL_IF name="even" -->
<tr class="highlight">
<!-- TMPL_ELSE -->
<tr>
<!-- /TMPL_IF -->
<td>
<a href="/cgi-bin/koha/opac-search.pl?q=<!-- TMPL_VAR NAME="scan_use" escape="url" -->&quot;<!-- TMPL_VAR NAME="title" -->&quot;"><!-- TMPL_VAR NAME="title" --></a>
</td>
@ -106,14 +145,13 @@ href="/cgi-bin/koha/opac-rss.pl?<!-- TMPL_VAR name="query_cgi"--><!-- TMPL_VAR N
<!-- TABLE RESULTS START -->
<table>
<tr><td colspan="3"><p class="searchresults">
<!-- RE-SORT START --> <label><select id="sort_by" name="sort_by" onchange="document.bookbag_form.submit();"> <!--TMPL_INCLUDE Name="resort_form.inc"--> </select></label> <!-- RESORT END -->
<!-- TMPL_IF name="opacbookbag" --><a href="#" onclick="SelectAll()"><img src="/opac-tmpl/prog/images/checkall.gif" alt="Check All" border="0" /></a>
<input type="button" class="icon shelf" value="Add checked items to book bag" onclick="addMultiple(); return false;" />
<!-- TMPL_IF NAME="virtualshelves" --><input type="button" class="icon shelf" value="Add Checked Items to Lists" onclick="<!-- TMPL_IF NAME="loggedinusername" -->if (vShelfAdd()) {Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?' + vShelfAdd());} <!-- TMPL_ELSE --> alert('You must be logged in to create or add to Lists'); <!-- /TMPL_IF --> return false;" /><!-- /TMPL_IF -->
<input type="reset" value="Clear All" class="icon shelf" />
<!-- /TMPL_IF --></p></td></tr>
<tr><td colspan="3" class="resultscontrol">
<div class="resort"> <select id="sort_by" name="sort_by"> <!--TMPL_INCLUDE Name="resort_form.inc"--> </select> <input type="submit" class="submit clearfix" id="sortsubmit" value="Go" /></div>
<!-- TMPL_IF EXPR="opacbookbag || virtualshelves" --><span class="checkall"></span>
<!-- TMPL_IF name="opacbookbag" --><span class="bookbag"></span><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="virtualshelves" --><span class="lists"></span><!-- /TMPL_IF -->
<span class="clearall"></span><!-- /TMPL_IF -->
</td></tr>
<!-- Actual Search Results -->
<!-- TMPL_LOOP NAME="SEARCH_RESULTS" -->
<!-- TMPL_IF name="even" -->
@ -132,8 +170,8 @@ href="/cgi-bin/koha/opac-rss.pl?<!-- TMPL_VAR name="query_cgi"--><!-- TMPL_VAR N
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
</td>
<td><!-- TMPL_VAR NAME="result_number" -->. <!-- TMPL_IF name="BiblioDefaultViewmarc" --><a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" --></a><!-- TMPL_ELSE --><!-- TMPL_IF name="BiblioDefaultViewisbd" --><a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" --></a><!-- TMPL_ELSE --><a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" --></a><!-- /TMPL_IF --><!-- /TMPL_IF --> <!-- TMPL_IF NAME="author" -->by <a href="/cgi-bin/koha/opac-search.pl?q=au:<!-- TMPL_VAR NAME="author_nospan" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="author" --></a><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF -->
<p class="details"> <!-- TMPL_IF name="publicationyear" --> - <!-- TMPL_VAR name="publicationyear" --><!-- /TMPL_IF -->
<td><!-- TMPL_VAR NAME="result_number" -->. <!-- TMPL_IF name="BiblioDefaultViewmarc" --><a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" title="View details for this title"><!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" --></a><!-- TMPL_ELSE --><!-- TMPL_IF name="BiblioDefaultViewisbd" --><a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" title="View details for this title"><!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" --></a><!-- TMPL_ELSE --><a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" title="View details for this title"><!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" --></a><!-- /TMPL_IF --><!-- /TMPL_IF --> <!-- TMPL_IF NAME="author" -->by <a href="/cgi-bin/koha/opac-search.pl?q=au:<!-- TMPL_VAR NAME="author_nospan" ESCAPE="URL" -->" title="Search for works by this author"><!-- TMPL_VAR NAME="author" --></a><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF -->
<p> <!-- TMPL_IF name="publicationyear" --> - <!-- TMPL_VAR name="publicationyear" --><!-- /TMPL_IF -->
<!-- TMPL_IF name="publishercode" -->- <!-- TMPL_VAR name="publishercode" --><!-- /TMPL_IF -->
<!-- TMPL_IF name="place" --> ; <!-- TMPL_VAR name="place" --><!-- /TMPL_IF -->
<!-- TMPL_IF name="pages" --> - <!-- TMPL_VAR name="pages" --><!-- /TMPL_IF -->
@ -166,7 +204,7 @@ href="/cgi-bin/koha/opac-rss.pl?<!-- TMPL_VAR name="query_cgi"--><!-- TMPL_VAR N
</span>
</p>
<p><!-- TMPL_UNLESS NAME="norequests" --><!-- TMPL_IF NAME="opacuserlogin" --><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Place Reserve</a><!-- /TMPL_IF --><!-- /TMPL_UNLESS --> <!--TMPL_IF NAME="opacbookbag" --><input type="checkbox" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" title="Click to add to book bag" /> <label for="bib<!-- TMPL_VAR NAME="biblionumber" -->"><!-- /TMPL_IF --><img src="<!-- TMPL_VAR NAME="themelang" -->/images/<!-- TMPL_VAR NAME="itemtype" -->.gif" alt="<!-- TMPL_VAR NAME="ccode" -->" title="<!-- TMPL_VAR NAME="ccode" -->" /><!--TMPL_IF NAME="opacbookbag" --></label><!-- /TMPL_IF --> <!-- TMPL_IF name="classification" -->
<p><!-- TMPL_UNLESS NAME="norequests" --><!-- TMPL_IF NAME="opacuserlogin" --><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Place Hold</a><!-- /TMPL_IF --><!-- /TMPL_UNLESS --> <!--TMPL_IF EXPR="opacbookbag || virtualshelves" --><input type="checkbox" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" title="Click to add to book bag" /> <label for="bib<!-- TMPL_VAR NAME="biblionumber" -->"><!-- /TMPL_IF --><img src="<!-- TMPL_VAR NAME="themelang" -->/images/<!-- TMPL_VAR NAME="itemtype" -->.gif" alt="<!-- TMPL_VAR NAME="ccode" -->" title="<!-- TMPL_VAR NAME="ccode" -->" /><!--TMPL_IF EXPR="opacbookbag || virtualshelves" --></label><!-- /TMPL_IF --> <!-- TMPL_IF name="classification" -->
<a href="/cgi-bin/koha/opac-search.pl?q=callnum:<!-- TMPL_VAR NAME="classification" ESCAPE="URL" -->">
<!-- TMPL_VAR NAME="classification" -->
</a>

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B