|
Lines 52-67
function cartList(){
Link Here
|
| 52 |
return false; |
52 |
return false; |
| 53 |
} |
53 |
} |
| 54 |
} |
54 |
} |
| 55 |
$(window).load(function() { |
|
|
| 56 |
new YAHOO.widget.Button("cartsubmit", { onclick: { fn: cartList }}); |
| 57 |
}); |
| 58 |
$(document).ready(function() { |
55 |
$(document).ready(function() { |
| 59 |
$("#placeholdc").empty(); |
56 |
$("#cartsubmit").click(function(){ |
|
|
57 |
cartList(); |
| 58 |
return false; |
| 59 |
}); |
| 60 |
$("#z3950submit").click(function(){ |
| 61 |
PopupZ3950(); |
| 62 |
return false; |
| 63 |
}); |
| 64 |
|
| 65 |
$("#searchheader").on("click",".placehold", function(){ |
| 66 |
placeHold(); |
| 67 |
$(".btn-group").removeClass("open"); |
| 68 |
return false; |
| 69 |
}); |
| 70 |
$(".placeholdfor").click(function(){ |
| 71 |
holdForPatron(); |
| 72 |
$(".btn-group").removeClass("open"); |
| 73 |
return false; |
| 74 |
}); |
| 75 |
$("#forgetholdfor").click(function(){ |
| 76 |
forgetPatron(); |
| 77 |
$(".btn-group").removeClass("open"); |
| 78 |
return false; |
| 79 |
}); |
| 60 |
$('#sortbyform').find("input:submit").hide(); |
80 |
$('#sortbyform').find("input:submit").hide(); |
| 61 |
$('#sort_by').change(function() { |
81 |
$('#sort_by').change(function() { |
| 62 |
$('#sortbyform').submit(); |
82 |
$('#sortbyform').submit(); |
| 63 |
}); |
83 |
}); |
| 64 |
$(".addtocart").show(); |
|
|
| 65 |
var param1 = "<label for=\"addto\">"+_("Add to:")+"<\/label><select name=\"addto\" id=\"addto\"><option value=\"\"><\/option>"; |
84 |
var param1 = "<label for=\"addto\">"+_("Add to:")+"<\/label><select name=\"addto\" id=\"addto\"><option value=\"\"><\/option>"; |
| 66 |
[% IF ( intranetbookbag ) %] param1 += "<option value=\"addtocart\">"+_("Cart")+"<\/option>"; [% END %] |
85 |
[% IF ( intranetbookbag ) %] param1 += "<option value=\"addtocart\">"+_("Cart")+"<\/option>"; [% END %] |
| 67 |
[% IF ( virtualshelves ) %][% IF ( addbarshelves ) %] |
86 |
[% IF ( virtualshelves ) %][% IF ( addbarshelves ) %] |
|
Lines 154-167
function placeHold () {
Link Here
|
| 154 |
function forgetPatron(){ |
173 |
function forgetPatron(){ |
| 155 |
$.cookie("holdfor",null, { path: "/", expires: 0 }); |
174 |
$.cookie("holdfor",null, { path: "/", expires: 0 }); |
| 156 |
$(".holdforlink").remove(); |
175 |
$(".holdforlink").remove(); |
| 157 |
$("#placeholdc").empty(); |
176 |
$("#placeholdc").html("<a class=\"btn btn-mini placehold\" href=\"#\"><i class=\"icon-hold\"></i> "+_("Place hold")+"</a>"); |
| 158 |
new YAHOO.widget.Button({ |
|
|
| 159 |
id: "placehold", |
| 160 |
type: "button", |
| 161 |
label: _("Place hold"), |
| 162 |
container: "placeholdc", |
| 163 |
onclick: { fn: placeHold } |
| 164 |
}); |
| 165 |
} |
177 |
} |
| 166 |
|
178 |
|
| 167 |
function addToList () { |
179 |
function addToList () { |
|
Lines 196-235
function GetZ3950Terms(){
Link Here
|
| 196 |
return strQuery; |
208 |
return strQuery; |
| 197 |
} |
209 |
} |
| 198 |
|
210 |
|
| 199 |
YAHOO.util.Event.onContentReady("searchheader", function () { |
211 |
var holdFor = function (){ |
| 200 |
new YAHOO.widget.Button( "z3950submit", { onclick: { fn: PopupZ3950 }}); |
212 |
$("#holdFor").val(""); |
| 201 |
[% IF ( holdfor ) %] |
213 |
placeHold(); |
| 202 |
var holdFor = function (){ |
214 |
} |
| 203 |
$("#holdFor").val(""); |
215 |
var holdForPatron = function () { |
| 204 |
placeHold(); |
216 |
$("#holdFor").val("[% holdfor_cardnumber %]"); |
| 205 |
} |
217 |
placeHold(); |
| 206 |
var holdForPatron = function () { |
218 |
} |
| 207 |
$("#holdFor").val("[% holdfor_cardnumber %]"); |
|
|
| 208 |
placeHold(); |
| 209 |
} |
| 210 |
var HoldForButtonMenu = [ |
| 211 |
{ text: _("Place hold"), onclick: { fn: holdFor }}, |
| 212 |
{ text: _("Place hold for") + " [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", onclick: { fn: holdForPatron }}, |
| 213 |
{ text: _("Forget") + " [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", onclick: { fn: forgetPatron }}]; |
| 214 |
|
| 215 |
var HoldForButton = new YAHOO.widget.Button({ |
| 216 |
type: "split", |
| 217 |
label: _("Place hold"), |
| 218 |
name: "holdfor", |
| 219 |
menu: HoldForButtonMenu, |
| 220 |
container: "placeholdc", |
| 221 |
onclick: { fn: holdFor } |
| 222 |
}); |
| 223 |
[% ELSE %] |
| 224 |
new YAHOO.widget.Button({ |
| 225 |
id: "placehold", |
| 226 |
type: "button", |
| 227 |
label: _("Place hold"), |
| 228 |
container: "placeholdc", |
| 229 |
onclick: { fn: placeHold } |
| 230 |
}); |
| 231 |
[% END %] |
| 232 |
}); // YAHOO onContentReady |
| 233 |
//]]> |
219 |
//]]> |
| 234 |
</script> |
220 |
</script> |
| 235 |
</head> |
221 |
</head> |
|
Lines 296-308
YAHOO.util.Event.onContentReady("searchheader", function () {
Link Here
|
| 296 |
<a href="#" class="highlight_toggle" id="highlight_toggle_on">Highlight</a> |
282 |
<a href="#" class="highlight_toggle" id="highlight_toggle_on">Highlight</a> |
| 297 |
| |
283 |
| |
| 298 |
<span class="addto"></span> |
284 |
<span class="addto"></span> |
| 299 |
[% IF ( CAN_user_reserveforothers ) %] |
285 |
[% IF ( CAN_user_reserveforothers && DisplayMultiPlaceHold ) %] |
| 300 |
[% IF ( DisplayMultiPlaceHold ) %] |
286 |
[% IF ( holdfor ) %] |
| 301 |
| <span id="placeholdc"><input type="button" id="placehold" onclick="placeHold(); return false;" value="Place Hold"/></span> |
287 |
<div id="placeholdc" class="btn-group"> |
| 302 |
[% END %] |
288 |
<button class="btn btn-mini placehold"><i class="icon-hold"></i> Place hold</button> |
|
|
289 |
<button class="btn btn-mini dropdown-toggle" data-toggle="dropdown"> |
| 290 |
<span class="caret"></span> |
| 291 |
</button> |
| 292 |
<ul class="dropdown-menu"> |
| 293 |
<li><a href="#" class="placehold">Place hold</a></li> |
| 294 |
<li><a href="#" class="placeholdfor">Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></li> |
| 295 |
<li class="divider"></li> |
| 296 |
<li><a href="#" id="forgetholdfor">Forget [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></li> |
| 297 |
</ul> |
| 298 |
</div> |
| 299 |
[% ELSE %] |
| 300 |
<div id="placeholdc" class="btn-group"><a class="btn btn-mini placehold" href="#"><i class="icon-hold"></i> Place hold</a></div> |
| 301 |
[% END %] |
| 303 |
[% END %] |
302 |
[% END %] |
| 304 |
|
303 |
|
| 305 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %] | <input type="button" id="z3950submit" onclick="PopupZ3950(); return false;" value="Z39.50 Search"/>[% END %] |
304 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %] <div class="btn-group"><a class="btn btn-mini" id="z3950submit" href="#"><i class="icon-search"></i> Z39.50 search</a></div>[% END %] |
| 306 |
</div> |
305 |
</div> |
| 307 |
</div> |
306 |
</div> |
| 308 |
[% IF ( stopwords_removed ) %]<div><p class="tip">Ignored the following common words: "[% stopwords_removed %]"<p></div>[% END %] |
307 |
[% IF ( stopwords_removed ) %]<div><p class="tip">Ignored the following common words: "[% stopwords_removed %]"<p></div>[% END %] |
| 309 |
- |
|
|