text-decoration : none;
padding-left : 33px;
}
+
/* Search results place hold link */
#placehold input.submit {
background-image: url("../../images/sprite.png"); /* Place hold */
.actions a.addtocart,
.actions a.addtoshelf,
.actions a.addtolist,
-.actions a.tag_add {
+.actions a.tag_add,
+.actions a.removefromlist {
margin-left : 1em;
text-decoration : none;
}
display : none;
}
+/* List contents remove from list link */
+.removefromlist {
+ background-image : url("../../images/sprite.png"); /* Delete */
+ background-position : -8px -690px;
+ background-repeat: no-repeat;
+ text-decoration : none;
+ padding-left : 15px;
+ display : none;
+}
+
/* Search results rows save to lists */
.actions a.addtoshelf {
background-image : url("../../images/sprite.png"); /* MARC view */
<script type="text/javascript">
//<![CDATA[
var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
+var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from the list?");
var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
[% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %]
});
[% END %]
[% IF ( loggedinusername && allowremovingitems ) %]
+ var removeFromListLinks = $(".removefromlist");
+ removeFromListLinks.show();
+ // "remove from list" appearing on each line of the list output
+ removeFromListLinks.on("click",function(){
+ $(".checkboxed").unCheckCheckboxes();
+ var listitem = $("input[name="+this.id+"]");
+ listitem.prop("checked",true);
+ $("#myform").submit();
+ });
$("#myform").submit(function(){
var checkedBoxes = $(".checkboxed input:checkbox:checked");
- if ($(checkedBoxes).size()) {
- return confirmDelete(MSG_REMOVE_FROM_LIST);
+ var numchecked = $(checkedBoxes).size();
+ if (numchecked) {
+ if( numchecked > 1 ){
+ return confirmDelete(MSG_REMOVE_FROM_LIST);
+ } else {
+ return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
+ }
} else {
alert(MSG_NO_RECORD_SELECTED);
return false;
[% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( virtualshelves ) %]<a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% itemsloo.biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% itemsloo.biblionumber %]'); return false;">Save to another list</a>
[% END %][% END %][% END %]
+
+ [% IF ( allowremovingitems ) %]
+ <a class="removefromlist" id="REM-[% itemsloo.biblionumber %]" href="#">Remove from this list</a>
+ [% END %]
+
[% IF ( opacbookbag ) %]
[% IF ( itemsloo.incart ) %]
<a class="addtocart cart[% itemsloo.biblionumber %]" href="#" onclick="addRecord('[% itemsloo.biblionumber %]'); return false;">In your cart</a> <a class="cartRemove cartR[% itemsloo.biblionumber %]" href="#" onclick="delSingleRecord('[% itemsloo.biblionumber %]'); return false;">(remove)</a>