Lines 33-51
Link Here
|
33 |
function confirmnotdup(){ |
33 |
function confirmnotdup(){ |
34 |
$("#confirm_not_duplicate").attr("value","1"); |
34 |
$("#confirm_not_duplicate").attr("value","1"); |
35 |
// alert(_("Not a duplicate confirmed. Please click on Add biblio to save the record")); |
35 |
// alert(_("Not a duplicate confirmed. Please click on Add biblio to save the record")); |
36 |
var checkform = $("#f"); |
36 |
Check(); |
37 |
Check(checkform); |
|
|
38 |
} |
37 |
} |
39 |
|
38 |
|
40 |
/** |
39 |
/** |
41 |
* |
40 |
* |
42 |
* |
41 |
* |
43 |
*/ |
42 |
*/ |
44 |
function Check(dest){ |
43 |
function Check(event){ |
45 |
var StrAlert = AreMandatoriesNotOk(); |
44 |
var StrAlert = AreMandatoriesNotOk(); |
46 |
if( ! StrAlert ){ |
45 |
if( ! StrAlert ){ |
47 |
document.f.submit(); |
46 |
if(event && event.keyCode == 13){ |
48 |
return true; |
47 |
return false; |
|
|
48 |
}else{ |
49 |
document.f.submit(); |
50 |
return true; |
51 |
} |
52 |
|
49 |
} else { |
53 |
} else { |
50 |
alert(StrAlert); |
54 |
alert(StrAlert); |
51 |
return false; |
55 |
return false; |
Lines 230-236
function GetZ3950Terms(){
Link Here
|
230 |
|
234 |
|
231 |
function Changefwk(FwkList) { |
235 |
function Changefwk(FwkList) { |
232 |
var fwk = FwkList.options[FwkList.selectedIndex].value; |
236 |
var fwk = FwkList.options[FwkList.selectedIndex].value; |
233 |
window.location = "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!--TMPL_VAR Name="biblionumber"-->&breedingid=<!-- TMPL_VAR name="breedingid" -->&frameworkcode="+fwk; |
237 |
window.location = "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!--TMPL_VAR Name="biblionumber"-->&breedingid=<!-- TMPL_VAR name="breedingid" -->&mode=<!-- TMPL_VAR name="popup" -->&frameworkcode="+fwk; |
234 |
|
238 |
|
235 |
} |
239 |
} |
236 |
|
240 |
|
Lines 466-476
function CloneSubfield(index){
Link Here
|
466 |
var clone = original.cloneNode(true); |
470 |
var clone = original.cloneNode(true); |
467 |
var new_key = CreateKey(); |
471 |
var new_key = CreateKey(); |
468 |
var new_id = original.getAttribute('id')+new_key; |
472 |
var new_id = original.getAttribute('id')+new_key; |
|
|
473 |
|
469 |
// set the attribute for the new 'div' subfields |
474 |
// set the attribute for the new 'div' subfields |
470 |
var inputs = clone.getElementsByTagName('input'); |
475 |
var inputs = clone.getElementsByTagName('input'); |
471 |
var selects = clone.getElementsByTagName('select'); |
476 |
var selects = clone.getElementsByTagName('select'); |
472 |
var textareas = clone.getElementsByTagName('textarea'); |
477 |
var textareas = clone.getElementsByTagName('textarea'); |
473 |
var linkid; |
|
|
474 |
|
478 |
|
475 |
// input |
479 |
// input |
476 |
var id_input = ""; |
480 |
var id_input = ""; |
Lines 478-484
function CloneSubfield(index){
Link Here
|
478 |
id_input = inputs[i].getAttribute('id')+new_key; |
482 |
id_input = inputs[i].getAttribute('id')+new_key; |
479 |
inputs[i].setAttribute('id',id_input); |
483 |
inputs[i].setAttribute('id',id_input); |
480 |
inputs[i].setAttribute('name',inputs[i].getAttribute('name')+new_key); |
484 |
inputs[i].setAttribute('name',inputs[i].getAttribute('name')+new_key); |
481 |
linkid = id_input; |
|
|
482 |
} |
485 |
} |
483 |
|
486 |
|
484 |
// select |
487 |
// select |
Lines 495-513
function CloneSubfield(index){
Link Here
|
495 |
textareas[i].setAttribute('name',textareas[i].getAttribute('name')+new_key); |
498 |
textareas[i].setAttribute('name',textareas[i].getAttribute('name')+new_key); |
496 |
} |
499 |
} |
497 |
|
500 |
|
498 |
// Changing the "..." link's onclick attribute for plugin callback |
|
|
499 |
var links = clone.getElementsByTagName('a'); |
500 |
var link = links[0]; |
501 |
var buttonDotOnClick = link.getAttribute('onclick'); |
502 |
if(buttonDotOnClick.match('Clictag')){ // -1- It s a plugin |
503 |
var re = /\('.*'\)/i; |
504 |
buttonDotOnClick = buttonDotOnClick.replace(re,"('"+linkid+"')"); |
505 |
if(buttonDotOnClick){ |
506 |
link.setAttribute('onclick',buttonDotOnClick); |
507 |
} |
508 |
} |
509 |
|
510 |
|
511 |
<!-- TMPL_UNLESS NAME='advancedMARCEditor' --> |
501 |
<!-- TMPL_UNLESS NAME='advancedMARCEditor' --> |
512 |
// when cloning a subfield, reset its label too. |
502 |
// when cloning a subfield, reset its label too. |
513 |
var label = clone.getElementsByTagName('label')[0]; |
503 |
var label = clone.getElementsByTagName('label')[0]; |
Lines 674-681
function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
Link Here
|
674 |
window.close(); |
664 |
window.close(); |
675 |
</script> |
665 |
</script> |
676 |
<!--TMPL_ELSE--> |
666 |
<!--TMPL_ELSE--> |
677 |
<form method="post" name="f" id="f" action="/cgi-bin/koha/cataloguing/addbiblio.pl" onsubmit="return Check();"> |
667 |
<form method="post" name="f" id="f" action="/cgi-bin/koha/cataloguing/addbiblio.pl"> |
678 |
<input type="hidden" value="" id="redirect" name="redirect" /> |
|
|
679 |
<input type="hidden" value="0" id="confirm_not_duplicate" name="confirm_not_duplicate" /> |
668 |
<input type="hidden" value="0" id="confirm_not_duplicate" name="confirm_not_duplicate" /> |
680 |
<!-- /TMPL_IF --> |
669 |
<!-- /TMPL_IF --> |
681 |
|
670 |
|
Lines 709-714
function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
Link Here
|
709 |
|
698 |
|
710 |
// YUI Toolbar Functions |
699 |
// YUI Toolbar Functions |
711 |
|
700 |
|
|
|
701 |
var onSaveClick = function (e){ |
702 |
return Check(e); |
703 |
} |
704 |
|
712 |
function yuiToolbar() { |
705 |
function yuiToolbar() { |
713 |
// new YAHOO.widget.Button("addbiblio"); |
706 |
// new YAHOO.widget.Button("addbiblio"); |
714 |
|
707 |
|
Lines 734-743
function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
Link Here
|
734 |
|
727 |
|
735 |
//]]> |
728 |
//]]> |
736 |
</script> |
729 |
</script> |
737 |
|
|
|
738 |
<ul class="toolbar"> |
730 |
<ul class="toolbar"> |
739 |
<li id="savebutton"><input id="addbiblio" type="submit" value="Save" /></li> |
731 |
<li id="savebutton"><input id="addbiblio" type="button" value="Save" onclick="return Check(event);" /></li> |
740 |
<li id="z3950searchc"><input type="button" id="z3950search" value="Z39.50 Search" onclick="PopupZ3950(); return false;" /></li> |
732 |
<li id="z3950searchc"><input type="button" id="z3950search" value="Z39.50 Search" onclick="PopupZ3950(); return false;" /></li> |
|
|
733 |
<!--TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue"--> |
741 |
<li id="changeframework"><label for="Frameworks">Change framework: </label> |
734 |
<li id="changeframework"><label for="Frameworks">Change framework: </label> |
742 |
<select name="Frameworks" id="Frameworks" onchange="Changefwk(this);"> |
735 |
<select name="Frameworks" id="Frameworks" onchange="Changefwk(this);"> |
743 |
<option value="Default">Default</option> |
736 |
<option value="Default">Default</option> |
Lines 746-751
function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
Link Here
|
746 |
<!-- TMPL_VAR NAME="frameworktext" --> |
739 |
<!-- TMPL_VAR NAME="frameworktext" --> |
747 |
</option> |
740 |
</option> |
748 |
<!-- /TMPL_LOOP --> |
741 |
<!-- /TMPL_LOOP --> |
|
|
742 |
<!--/TMPL_IF--> |
749 |
</select> |
743 |
</select> |
750 |
<input type="hidden" name="op" value="addbiblio" /></li> |
744 |
<input type="hidden" name="op" value="addbiblio" /></li> |
751 |
</ul> |
745 |
</ul> |
752 |
- |
|
|