|
Lines 37-48
function addbiblioPopup(biblionumber) {
Link Here
|
| 37 |
window.open(destination,'AddBiblioPopup','width=1024,height=768,toolbar=no,scrollbars=yes'); |
37 |
window.open(destination,'AddBiblioPopup','width=1024,height=768,toolbar=no,scrollbars=yes'); |
| 38 |
} |
38 |
} |
| 39 |
|
39 |
|
| 40 |
function Plugin(f) |
40 |
function Plugin() |
| 41 |
{ |
41 |
{ |
| 42 |
window.open('subscription-bib-search.pl','FindABibIndex','width=800,height=400,toolbar=no,scrollbars=yes'); |
42 |
window.open('subscription-bib-search.pl','FindABibIndex','width=800,height=400,toolbar=no,scrollbars=yes'); |
| 43 |
} |
43 |
} |
| 44 |
|
44 |
|
| 45 |
function FindAcqui(f) |
45 |
function FindAcqui() |
| 46 |
{ |
46 |
{ |
| 47 |
window.open('acqui-search.pl','FindASupplier','width=800,height=400,toolbar=no,scrollbars=yes'); |
47 |
window.open('acqui-search.pl','FindASupplier','width=800,height=400,toolbar=no,scrollbars=yes'); |
| 48 |
} |
48 |
} |
|
Lines 192-201
function displaymoreoptions() {
Link Here
|
| 192 |
} |
192 |
} |
| 193 |
} |
193 |
} |
| 194 |
|
194 |
|
| 195 |
function toggleAdvancedPattern() { |
|
|
| 196 |
$("#advancedpredictionpattern").toggle(); |
| 197 |
} |
| 198 |
|
| 199 |
function modifyAdvancedPattern() { |
195 |
function modifyAdvancedPattern() { |
| 200 |
$("#patternname").prop('readOnly', false).val(''); |
196 |
$("#patternname").prop('readOnly', false).val(''); |
| 201 |
$("#numberingmethod").prop('readOnly', false); |
197 |
$("#numberingmethod").prop('readOnly', false); |
|
Lines 460-465
$(document).ready(function() {
Link Here
|
| 460 |
[% END %] |
456 |
[% END %] |
| 461 |
|
457 |
|
| 462 |
show_page_1(); |
458 |
show_page_1(); |
|
|
459 |
$("#subscription_add_form").on("submit",function(){ |
| 460 |
return Check_page2(); |
| 461 |
}); |
| 462 |
$("#vendor_search").on("click",function(e){ |
| 463 |
e.preventDefault(); |
| 464 |
FindAcqui(); |
| 465 |
}); |
| 466 |
$("#record_search").on("click",function(e){ |
| 467 |
e.preventDefault(); |
| 468 |
Plugin(); |
| 469 |
}); |
| 470 |
$("#biblio_add_edit").on("click",function(e){ |
| 471 |
e.preventDefault(); |
| 472 |
if( $(this).data("biblionumber") ){ |
| 473 |
addbiblioPopup( $(this).data("biblionumber") ); |
| 474 |
} else { |
| 475 |
addbiblioPopup(); |
| 476 |
} |
| 477 |
}); |
| 478 |
$("#subscription_add_next").on("click",function(){ |
| 479 |
if ( Check_page1() ){ |
| 480 |
show_page_2(); |
| 481 |
} |
| 482 |
}); |
| 483 |
$("#subscription_add_previous").on("click",function(){ |
| 484 |
show_page_1(); |
| 485 |
}); |
| 486 |
$(".toggle_advanced_pattern").on("click",function(e){ |
| 487 |
e.preventDefault(); |
| 488 |
$("#advancedpredictionpattern").toggle(); |
| 489 |
$(".toggle_advanced_pattern").toggle(); |
| 490 |
}); |
| 491 |
$("#modifyadvancedpatternbutton").on("click",function(e){ |
| 492 |
e.preventDefault(); |
| 493 |
modifyAdvancedPattern(); |
| 494 |
}); |
| 495 |
$("#restoreadvancedpatternbutton").on("click",function(e){ |
| 496 |
e.preventDefault(); |
| 497 |
restoreAdvancedPattern(); |
| 498 |
}); |
| 499 |
$("#saveadvancedpatternbutton").on("click",function(e){ |
| 500 |
e.preventDefault(); |
| 501 |
saveAdvancedPattern(); |
| 502 |
}); |
| 503 |
$("#testpatternbutton").on("click",function(e){ |
| 504 |
e.preventDefault(); |
| 505 |
testPredictionPattern(); |
| 506 |
}); |
| 463 |
}); |
507 |
}); |
| 464 |
//]]> |
508 |
//]]> |
| 465 |
</script> |
509 |
</script> |
|
Lines 474-480
$(document).ready(function() {
Link Here
|
| 474 |
<div id="bd"> |
518 |
<div id="bd"> |
| 475 |
<div class="yui-g"> |
519 |
<div class="yui-g"> |
| 476 |
<h1>[% IF ( modify ) %] Modify subscription for <i>[% bibliotitle |html %]</i>[% ELSE %]Add a new subscription[% END %] (<span id="page_number">1/2</span>)</h1> |
520 |
<h1>[% IF ( modify ) %] Modify subscription for <i>[% bibliotitle |html %]</i>[% ELSE %]Add a new subscription[% END %] (<span id="page_number">1/2</span>)</h1> |
| 477 |
<form method="post" name="f" action="/cgi-bin/koha/serials/subscription-add.pl" class="validated" onsubmit="return Check_page2();" > |
521 |
<form method="post" id="subscription_add_form" name="f" action="/cgi-bin/koha/serials/subscription-add.pl" class="validated"> |
| 478 |
[% IF ( modify ) %] |
522 |
[% IF ( modify ) %] |
| 479 |
<input type="hidden" name="op" value="modsubscription" /> |
523 |
<input type="hidden" name="op" value="modsubscription" /> |
| 480 |
<input type="hidden" name="subscriptionid" value="[% subscriptionid %]" /> |
524 |
<input type="hidden" name="subscriptionid" value="[% subscriptionid %]" /> |
|
Lines 494-511
$(document).ready(function() {
Link Here
|
| 494 |
[% END %] |
538 |
[% END %] |
| 495 |
<li> |
539 |
<li> |
| 496 |
<label for="aqbooksellerid">Vendor: </label> |
540 |
<label for="aqbooksellerid">Vendor: </label> |
| 497 |
<input type="text" name="aqbooksellerid" id="aqbooksellerid" value="[% aqbooksellerid %]" size="8" /> (<input type="text" name="aqbooksellername" id="aqbooksellername" value="[% aqbooksellername %]" disabled="disabled" readonly="readonly" />) <a href="#" onclick="FindAcqui(f)">Search for a vendor</a> |
541 |
<input type="text" name="aqbooksellerid" id="aqbooksellerid" value="[% aqbooksellerid %]" size="8" /> (<input type="text" name="aqbooksellername" id="aqbooksellername" value="[% aqbooksellername %]" disabled="disabled" readonly="readonly" />) <a href="#" id="vendor_search"><i class="fa fa-search"></i> Search for a vendor</a> |
| 498 |
</li> |
542 |
</li> |
| 499 |
<li> |
543 |
<li> |
| 500 |
<label for="biblionumber" class="required" title="Subscriptions must be associated with a bibliographic record">Record:</label> |
544 |
<label for="biblionumber" class="required" title="Subscriptions must be associated with a bibliographic record">Record:</label> |
| 501 |
<input type="text" name="biblionumber" id="biblionumber" value="[% bibnum %]" size="8" /> |
545 |
<input type="text" name="biblionumber" id="biblionumber" value="[% bibnum %]" size="8" /> |
| 502 |
(<input type="text" name="title" value="[% bibliotitle %]" disabled="disabled" readonly="readonly" />) <span class="required" title="Subscriptions must be associated with a bibliographic record">Required</span> |
546 |
(<input type="text" name="title" value="[% bibliotitle %]" disabled="disabled" readonly="readonly" />) <span class="required" title="Subscriptions must be associated with a bibliographic record">Required</span> |
| 503 |
<div class="inputnote"> <a href="#" onclick="Plugin(f)">Search for record</a> |
547 |
<div class="inputnote"> <a href="#" id="record_search"><i class="fa fa-search"></i> Search for record</a> |
| 504 |
[% IF ( CAN_user_editcatalogue ) %] |
548 |
[% IF ( CAN_user_editcatalogue ) %] |
| 505 |
[% IF ( modify ) %] |
549 |
[% IF ( modify ) %] |
| 506 |
| <a href="#" onclick="addbiblioPopup([% bibnum %]); return false;">Edit record</a> |
550 |
| <a href="#" id="biblio_add_edit" data-biblionumber="[% bibnum %]"><i class="fa fa-pencil"></i> Edit record</a> |
| 507 |
[% ELSE %] |
551 |
[% ELSE %] |
| 508 |
| <a href="#" onclick="addbiblioPopup(); return false;">Create record</a> |
552 |
| <a href="#" id="biblio_add_edit"><i class="fa fa-plus"></i> Create record</a> |
| 509 |
[% END %] |
553 |
[% END %] |
| 510 |
[% END %] |
554 |
[% END %] |
| 511 |
</div> |
555 |
</div> |
|
Lines 623-629
$(document).ready(function() {
Link Here
|
| 623 |
</ol> |
667 |
</ol> |
| 624 |
</fieldset> |
668 |
</fieldset> |
| 625 |
<fieldset class="action"> |
669 |
<fieldset class="action"> |
| 626 |
<input type="button" value="Next >>" onclick="if ( Check_page1() ) show_page_2();" style="float:right;" /> |
670 |
<input type="button" value="Next >>" id="subscription_add_next" style="float:right;" /> |
| 627 |
</fieldset> |
671 |
</fieldset> |
| 628 |
</div> |
672 |
</div> |
| 629 |
</div> |
673 |
</div> |
|
Lines 767-773
$(document).ready(function() {
Link Here
|
| 767 |
</tbody> |
811 |
</tbody> |
| 768 |
</table> |
812 |
</table> |
| 769 |
</li> |
813 |
</li> |
| 770 |
<li><a style="cursor:pointer" onclick="toggleAdvancedPattern();">Show/Hide advanced pattern</a></li> |
814 |
<li> |
|
|
815 |
<a href="#" class="toggle_advanced_pattern show_advanced_pattern"><i class="fa fa-plus-square"></i> Show advanced pattern</a> |
| 816 |
<a href="#" style="display:none;" class="toggle_advanced_pattern hide_advanced_pattern"><i class="fa fa-minus-square"></i> Hide advanced pattern</a> |
| 817 |
</li> |
| 771 |
<div id="advancedpredictionpattern" style="display:none"> |
818 |
<div id="advancedpredictionpattern" style="display:none"> |
| 772 |
<li> |
819 |
<li> |
| 773 |
<label for="patternname" class="required">Pattern name:</label> |
820 |
<label for="patternname" class="required">Pattern name:</label> |
|
Lines 851-859
$(document).ready(function() {
Link Here
|
| 851 |
</tr> |
898 |
</tr> |
| 852 |
</tbody> |
899 |
</tbody> |
| 853 |
</table> |
900 |
</table> |
| 854 |
<input id="modifyadvancedpatternbutton" type="button" value="Modify pattern" onclick="modifyAdvancedPattern();" /> |
901 |
<input id="modifyadvancedpatternbutton" type="button" value="Modify pattern" /> |
| 855 |
<input id="restoreadvancedpatternbutton" type="button" value="Cancel modifications" onclick="restoreAdvancedPattern();" style="display:none" /> |
902 |
<input id="restoreadvancedpatternbutton" type="button" value="Cancel modifications" style="display:none" /> |
| 856 |
<input id="saveadvancedpatternbutton" type="button" value="Save as new pattern" onclick="saveAdvancedPattern();" style="display:none" /> |
903 |
<input id="saveadvancedpatternbutton" type="button" value="Save as new pattern" style="display:none" /> |
| 857 |
</div> |
904 |
</div> |
| 858 |
</ol> |
905 |
</ol> |
| 859 |
</fieldset> |
906 |
</fieldset> |
|
Lines 892-899
$(document).ready(function() {
Link Here
|
| 892 |
[% END %] |
939 |
[% END %] |
| 893 |
|
940 |
|
| 894 |
<fieldset class="action"> |
941 |
<fieldset class="action"> |
| 895 |
<input type="button" value="<< Previous" onclick="show_page_1();" style="float:left;"/> |
942 |
<input type="button" id="subscription_add_previous" value="<< Previous" style="float:left;"/> |
| 896 |
<input id="testpatternbutton" type="button" value="Test prediction pattern" onclick="testPredictionPattern();" /> |
943 |
<input id="testpatternbutton" type="button" value="Test prediction pattern" /> |
| 897 |
<input type="submit" value="Save subscription" style="float:right;" accesskey="w" /> |
944 |
<input type="submit" value="Save subscription" style="float:right;" accesskey="w" /> |
| 898 |
</fieldset> |
945 |
</fieldset> |
| 899 |
</div> |
946 |
</div> |
| 900 |
- |
|
|