|
Lines 30-52
$(document).ready(function(){
Link Here
|
| 30 |
$(this).append("<span class=\"linktools\"><a href=\"/cgi-bin/koha/cataloguing/additem.pl?op=edititem&frameworkcode=[% frameworkcode %]&biblionumber=[% biblionumber %]&itemnumber="+num_rowid+"#edititem\">Edit Item</a> <a href=\"/cgi-bin/koha/cataloguing/additem.pl?op=delitem&frameworkcode=[% frameworkcode %]&biblionumber=[% biblionumber %]&itemnumber="+num_rowid+"\" onclick=\"confirm_deletion([% biblionumber %],"+num_rowid+"); return false;\">Delete Item</a></span>"); |
30 |
$(this).append("<span class=\"linktools\"><a href=\"/cgi-bin/koha/cataloguing/additem.pl?op=edititem&frameworkcode=[% frameworkcode %]&biblionumber=[% biblionumber %]&itemnumber="+num_rowid+"#edititem\">Edit Item</a> <a href=\"/cgi-bin/koha/cataloguing/additem.pl?op=delitem&frameworkcode=[% frameworkcode %]&biblionumber=[% biblionumber %]&itemnumber="+num_rowid+"\" onclick=\"confirm_deletion([% biblionumber %],"+num_rowid+"); return false;\">Delete Item</a></span>"); |
| 31 |
} |
31 |
} |
| 32 |
}); |
32 |
}); |
|
|
33 |
var multiCopyControl = $("#add_multiple_copies_span"); |
| 34 |
var addMultipleBlock = $("#addmultiple"); |
| 35 |
var addSingleBlock = $("#addsingle"); |
| 36 |
multiCopyControl.hide(); |
| 37 |
$("#add_multiple_copies").on("click",function(e){ |
| 38 |
e.preventDefault; |
| 39 |
addMultipleBlock.toggle(); |
| 40 |
addSingleBlock.toggle(); |
| 41 |
multiCopyControl.toggle(); |
| 42 |
}); |
| 43 |
$("#cancel_add_multiple").on("click",function(e){ |
| 44 |
e.preventDefault(); |
| 45 |
addMultipleBlock.toggle(); |
| 46 |
addSingleBlock.toggle(); |
| 47 |
multiCopyControl.toggle(); |
| 48 |
}); |
| 33 |
}); |
49 |
}); |
| 34 |
function active(numlayer) |
50 |
|
| 35 |
{ |
|
|
| 36 |
for (i=10; i < 11 ; i++ ) { |
| 37 |
ong = i+"XX"; |
| 38 |
link = "link"+i; |
| 39 |
if (numlayer==i) { |
| 40 |
document.getElementById(ong).style.visibility="visible"; |
| 41 |
document.getElementById(link).style.backgroundColor="#11AA11"; |
| 42 |
document.getElementById(link).style.backgroundImage="url([% themelang %]/images/background-mem.gif)"; |
| 43 |
} else { |
| 44 |
document.getElementById(ong).style.visibility="hidden"; |
| 45 |
document.getElementById(link).style.backgroundColor="#FFFFFF"; |
| 46 |
document.getElementById(link).style.backgroundImage=""; |
| 47 |
} |
| 48 |
} |
| 49 |
} |
| 50 |
function Check(f) { |
51 |
function Check(f) { |
| 51 |
var total_errors = CheckMandatorySubfields(f); |
52 |
var total_errors = CheckMandatorySubfields(f); |
| 52 |
if (total_errors > 0) { |
53 |
if (total_errors > 0) { |
|
Lines 208-221
$(document).ready(function() {
Link Here
|
| 208 |
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. |
209 |
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. |
| 209 |
It is a bit tricky, but necessary in the sake of UI correctness. |
210 |
It is a bit tricky, but necessary in the sake of UI correctness. |
| 210 |
--> |
211 |
--> |
| 211 |
|
212 |
<span id="addsingle"> |
| 212 |
<input type="submit" name="add_submit" value="Add item" onclick="return Check(this.form)" /> |
213 |
<input type="submit" name="add_submit" value="Add item" onclick="return Check(this.form)" /> |
| 213 |
<input type="submit" name="add_duplicate_submit" value="Add & duplicate" onclick="return Check(this.form)" /> |
214 |
<input type="submit" name="add_duplicate_submit" value="Add & duplicate" onclick="return Check(this.form)" /> |
| 214 |
<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"> |
215 |
</span> |
| 215 |
<label for="number_of_copies">Number of items to add : </label> |
216 |
<span id="addmultiple"> |
| 216 |
<input type="text" id="number_of_copies" name="number_of_copies" value="" size="2" /> |
217 |
<input type="button" name="add_multiple_copies" id="add_multiple_copies" value="Add multiple copies of this item" /> |
| 217 |
<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);" /> |
|
|
| 218 |
</span> |
218 |
</span> |
|
|
219 |
<fieldset id="add_multiple_copies_span"> |
| 220 |
<label for="number_of_copies">Number of additional copies of this item to add: </label> |
| 221 |
<input type="text" id="number_of_copies" name="number_of_copies" value="" size="2" /> |
| 222 |
<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> |
| 223 |
<div class="hint"><p>The barcode you enter will be incremented for each additional item.</p></div> |
| 224 |
</fieldset> |
| 219 |
|
225 |
|
| 220 |
[% ELSE %] |
226 |
[% ELSE %] |
| 221 |
<input type="hidden" name="tag" value="[% itemtagfield %]" /> |
227 |
<input type="hidden" name="tag" value="[% itemtagfield %]" /> |
| 222 |
- |
|
|