|
Lines 62-68
$(document).ready(function(){
Link Here
|
| 62 |
"bKohaColumnsUseNames": true |
62 |
"bKohaColumnsUseNames": true |
| 63 |
}, columns_settings); |
63 |
}, columns_settings); |
| 64 |
|
64 |
|
|
|
65 |
var multiCopyControl = $("#add_multiple_copies_span"); |
| 66 |
var addMultipleBlock = $("#addmultiple"); |
| 67 |
var addSingleBlock = $("#addsingle"); |
| 68 |
multiCopyControl.hide(); |
| 69 |
$("#add_multiple_copies").on("click",function(e){ |
| 70 |
e.preventDefault; |
| 71 |
addMultipleBlock.toggle(); |
| 72 |
addSingleBlock.toggle(); |
| 73 |
multiCopyControl.toggle(); |
| 74 |
}); |
| 75 |
$("#cancel_add_multiple").on("click",function(e){ |
| 76 |
e.preventDefault(); |
| 77 |
addMultipleBlock.toggle(); |
| 78 |
addSingleBlock.toggle(); |
| 79 |
multiCopyControl.toggle(); |
| 80 |
}); |
| 65 |
}); |
81 |
}); |
|
|
82 |
|
| 66 |
function Check(f) { |
83 |
function Check(f) { |
| 67 |
var total_errors = CheckMandatorySubfields(f); |
84 |
var total_errors = CheckMandatorySubfields(f); |
| 68 |
if (total_errors==0) { |
85 |
if (total_errors==0) { |
|
Lines 288-301
function confirm_deletion() {
Link Here
|
| 288 |
when pressing the enter key, while in fact it is the first submit button that is validated, in our case the "add (single) item" button. |
305 |
when pressing the enter key, while in fact it is the first submit button that is validated, in our case the "add (single) item" button. |
| 289 |
It is a bit tricky, but necessary in the sake of UI correctness. |
306 |
It is a bit tricky, but necessary in the sake of UI correctness. |
| 290 |
--> |
307 |
--> |
| 291 |
|
308 |
<span id="addsingle"> |
| 292 |
<input type="submit" name="add_submit" value="Add item" onclick="return Check(this.form)" /> |
309 |
<input type="submit" name="add_submit" value="Add item" onclick="return Check(this.form)" /> |
| 293 |
<input type="submit" name="add_duplicate_submit" value="Add & duplicate" onclick="return Check(this.form)" /> |
310 |
<input type="submit" name="add_duplicate_submit" value="Add & duplicate" onclick="return Check(this.form)" /> |
| 294 |
<input type="submit" name="add_multiple_copies" value="Add multiple items" onclick="javascript:this.nextSibling.style.visibility='visible';document.f.number_of_copies.focus(); return false;" /><span id="add_multiple_copies_span" style="visibility:hidden"> |
|
|
| 295 |
<label for="number_of_copies">Number of items to add : </label> |
| 296 |
<input type="text" id="number_of_copies" name="number_of_copies" value="" /> |
| 297 |
<input type="submit" id="add_multiple_copies_submit" name="add_multiple_copies_submit" value="Add" onclick="javascript:return Check(this.form) && CheckMultipleAdd(this.form.number_of_copies.value);" /> |
| 298 |
</span> |
311 |
</span> |
|
|
312 |
<span id="addmultiple"> |
| 313 |
<input type="button" name="add_multiple_copies" id="add_multiple_copies" value="Add multiple copies of this item" /> |
| 314 |
</span> |
| 315 |
<fieldset id="add_multiple_copies_span"> |
| 316 |
<label for="number_of_copies">Number of copies of this item to add: </label> |
| 317 |
<input type="text" id="number_of_copies" name="number_of_copies" value="" size="2" /> |
| 318 |
<input type="submit" id="add_multiple_copies_submit" name="add_multiple_copies_submit" value="Add" onclick="javascript:return Check(this.form) && CheckMultipleAdd(this.form.number_of_copies.value);" /> <a href="#" id="cancel_add_multiple" class="cancel">Cancel</a> |
| 319 |
<div class="hint"><p>The barcode you enter will be incremented for each additional item.</p></div> |
| 320 |
</fieldset> |
| 299 |
|
321 |
|
| 300 |
[% ELSE %] |
322 |
[% ELSE %] |
| 301 |
<input type="hidden" name="tag" value="[% itemtagfield %]" /> |
323 |
<input type="hidden" name="tag" value="[% itemtagfield %]" /> |
| 302 |
- |
|
|