|
Lines 26-71
Link Here
|
| 26 |
$('#addbibliotabs').selectTabByID("#[% tab %]"); |
26 |
$('#addbibliotabs').selectTabByID("#[% tab %]"); |
| 27 |
[% END %] |
27 |
[% END %] |
| 28 |
|
28 |
|
| 29 |
/* check cookie to hide/show marcdocs*/ |
|
|
| 30 |
if($.cookie("marcdocs_[% borrowernumber %]") == 'false'){ |
| 31 |
hideMARCdocLinks(); |
| 32 |
$("#marcDocsSelect").removeAttr('checked'); |
| 33 |
} else { |
| 34 |
/* reset cookie expire date */ |
| 35 |
$.cookie("marcdocs_[% borrowernumber %]",'true', |
| 36 |
{ path: "/", expires: 365 }); |
| 37 |
} |
| 38 |
$('#toolbar').fixFloat(); |
29 |
$('#toolbar').fixFloat(); |
|
|
30 |
|
| 31 |
/* check cookie to hide/show marcdocs*/ |
| 32 |
if($.cookie("marcdocs_[% borrowernumber %]") == 'hide'){ |
| 33 |
toggleMARCdocLinks(false); |
| 34 |
} else { |
| 35 |
toggleMARCdocLinks(true); |
| 36 |
} |
| 37 |
|
| 39 |
$("#marcDocsSelect").click(function(){ |
38 |
$("#marcDocsSelect").click(function(){ |
| 40 |
if($(this).attr("checked")){ |
39 |
if($.cookie("marcdocs_[% borrowernumber %]") == 'hide'){ |
| 41 |
showMARCdocLinks(); |
40 |
toggleMARCdocLinks(true); |
| 42 |
} else { |
41 |
} else { |
| 43 |
hideMARCdocLinks(); |
42 |
toggleMARCdocLinks(false); |
| 44 |
} |
43 |
} |
| 45 |
}); |
44 |
}); |
| 46 |
|
45 |
|
| 47 |
/* check cookie to hide/show marc tags*/ |
46 |
/* check cookie to hide/show marc tags*/ |
| 48 |
var marctags_cookie = $.cookie("marctags_[% borrowernumber %]"); |
47 |
var marctags_cookie = $.cookie("marctags_[% borrowernumber %]"); |
| 49 |
if( marctags_cookie == 'false'){ |
48 |
if( marctags_cookie == 'hide'){ |
| 50 |
hideMARCTagLinks(); |
49 |
toggleMARCTagLinks(false); |
| 51 |
$("#marcTagsSelect").removeAttr('checked'); |
50 |
} else if( marctags_cookie == 'show'){ |
| 52 |
} else if( marctags_cookie == 'true'){ |
51 |
toggleMARCTagLinks(true) |
| 53 |
showMARCTagLinks(); |
|
|
| 54 |
$("#marcTagsSelect").attr('checked', 'checked'); |
| 55 |
} else { |
52 |
} else { |
| 56 |
[% UNLESS Koha.Preference("hide_marc") %] |
53 |
[% UNLESS Koha.Preference("hide_marc") %] |
| 57 |
showMARCTagLinks(); |
54 |
toggleMARCTagLinks(true) |
| 58 |
$("#marcTagsSelect").attr('checked', 'checked'); |
|
|
| 59 |
[% ELSE %] |
55 |
[% ELSE %] |
| 60 |
hideMARCTagLinks(); |
56 |
toggleMARCTagLinks(false); |
| 61 |
$("#marcTagsSelect").removeAttr('checked'); |
|
|
| 62 |
[% END %] |
57 |
[% END %] |
| 63 |
} |
58 |
} |
|
|
59 |
|
| 64 |
$("#marcTagsSelect").click(function(){ |
60 |
$("#marcTagsSelect").click(function(){ |
| 65 |
if($(this).attr("checked")){ |
61 |
if( $.cookie("marctags_[% borrowernumber %]") == 'hide'){ |
| 66 |
showMARCTagLinks(); |
62 |
toggleMARCTagLinks(true) |
| 67 |
} else { |
63 |
} else { |
| 68 |
hideMARCTagLinks(); |
64 |
toggleMARCTagLinks(false); |
| 69 |
} |
65 |
} |
| 70 |
}); |
66 |
}); |
| 71 |
|
67 |
|
|
Lines 84-90
Link Here
|
| 84 |
$(".btn-group").removeClass("open"); |
80 |
$(".btn-group").removeClass("open"); |
| 85 |
onOption(); |
81 |
onOption(); |
| 86 |
return false; |
82 |
return false; |
| 87 |
}) |
83 |
}); |
| 88 |
|
84 |
|
| 89 |
$("#saveandview").click(function(){ |
85 |
$("#saveandview").click(function(){ |
| 90 |
$(".btn-group").removeClass("open"); |
86 |
$(".btn-group").removeClass("open"); |
|
Lines 123-129
Link Here
|
| 123 |
|
119 |
|
| 124 |
return false; |
120 |
return false; |
| 125 |
} ); |
121 |
} ); |
| 126 |
|
122 |
$(".change-framework").on("click", function(){ |
|
|
123 |
var frameworkcode = $(this).data("frameworkcode"); |
| 124 |
$("#frameworkcode").val( frameworkcode ); |
| 125 |
Changefwk( frameworkcode ); |
| 126 |
}); |
| 127 |
}); |
127 |
}); |
| 128 |
|
128 |
|
| 129 |
function redirect(dest){ |
129 |
function redirect(dest){ |
|
Lines 199-239
function _UNIMARCFieldDoc(field) {
Link Here
|
| 199 |
/* |
199 |
/* |
| 200 |
* Functions to hide/show marc docs and tags links |
200 |
* Functions to hide/show marc docs and tags links |
| 201 |
*/ |
201 |
*/ |
| 202 |
function hideMARCdocLinks() { |
|
|
| 203 |
$(".marcdocs").hide(); |
| 204 |
$.cookie("marcdocs_[% borrowernumber %]",'false', { path: "/", expires: 365 }); |
| 205 |
} |
| 206 |
|
202 |
|
| 207 |
function showMARCdocLinks() { |
203 |
function toggleMARCdocLinks(flag){ |
| 208 |
$(".marcdocs").show(); |
204 |
if( flag === true ){ |
| 209 |
$.cookie("marcdocs_[% borrowernumber %]",'true', { path: "/", expires: 365 }); |
205 |
$(".marcdocs").show(); |
|
|
206 |
$.cookie("marcdocs_[% borrowernumber %]",'show', { path: "/", expires: 365 }); |
| 207 |
$("#marcDocsSelect i").addClass('fa-check-square-o').removeClass('fa-square-o'); |
| 208 |
} else { |
| 209 |
$(".marcdocs").hide(); |
| 210 |
$.cookie("marcdocs_[% borrowernumber %]",'hide', { path: "/", expires: 365 }); |
| 211 |
$("#marcDocsSelect i").removeClass('fa-check-square-o').addClass('fa-square-o'); |
| 212 |
} |
| 210 |
} |
213 |
} |
| 211 |
|
214 |
|
| 212 |
function hideMARCTagLinks() { |
215 |
function toggleMARCTagLinks(flag){ |
| 213 |
$(".tagnum").hide(); |
216 |
if( flag === true ){ |
| 214 |
$(".subfieldcode").hide(); |
217 |
$(".tagnum").show(); |
| 215 |
$.cookie("marctags_[% borrowernumber %]",'false', { path: "/", expires: 365 }); |
218 |
$(".subfieldcode").show(); |
| 216 |
} |
219 |
$.cookie("marctags_[% borrowernumber %]",'show', { path: "/", expires: 365 }); |
| 217 |
function showMARCTagLinks() { |
220 |
$("#marcTagsSelect i").addClass('fa-check-square-o').removeClass('fa-square-o'); |
| 218 |
$(".tagnum").show(); |
221 |
} else { |
| 219 |
$(".subfieldcode").show(); |
222 |
$(".tagnum").hide(); |
| 220 |
$.cookie("marctags_[% borrowernumber %]",'true', { path: "/", expires: 365 }); |
223 |
$(".subfieldcode").hide(); |
|
|
224 |
$.cookie("marctags_[% borrowernumber %]",'hide', { path: "/", expires: 365 }); |
| 225 |
$("#marcTagsSelect i").removeClass('fa-check-square-o').addClass('fa-square-o'); |
| 226 |
} |
| 221 |
} |
227 |
} |
| 222 |
[% IF hide_marc %] |
|
|
| 223 |
var hide = false; |
| 224 |
[% ELSE %] |
| 225 |
var hide = true; |
| 226 |
[% END %] |
| 227 |
$("#show_tags").change( function(){ |
| 228 |
if ( $(this).is(':checked') ) { |
| 229 |
$(".tagnum").show(); |
| 230 |
$(".subfieldcode").show(); |
| 231 |
} else { |
| 232 |
} |
| 233 |
} ); |
| 234 |
$("#show_tags").attr("checked", !hide) |
| 235 |
$("#show_tags").change(); |
| 236 |
|
| 237 |
|
228 |
|
| 238 |
/** |
229 |
/** |
| 239 |
* check if mandatory subfields are written |
230 |
* check if mandatory subfields are written |
|
Lines 415-427
function Changefwk(FwkList) {
Link Here
|
| 415 |
[% END %] |
406 |
[% END %] |
| 416 |
</h1> |
407 |
</h1> |
| 417 |
|
408 |
|
| 418 |
[% IF marcflavour != 'NORMARC' AND NOT advancedMARCEditor %] |
|
|
| 419 |
<div> |
| 420 |
<label><input type="checkbox" name="marcDocsSelect" id="marcDocsSelect" checked="true" /> Show MARC tag documentation links</label> |
| 421 |
<label><input type="checkbox" name="marcTagsSelect" id="marcTagsSelect" style="margin-left: 5px;" /> Show tags</label> |
| 422 |
</div> |
| 423 |
[% END %] |
| 424 |
|
| 425 |
[% UNLESS ( number ) %] |
409 |
[% UNLESS ( number ) %] |
| 426 |
<!-- show duplicate warning on tab 0 only --> |
410 |
<!-- show duplicate warning on tab 0 only --> |
| 427 |
[% IF ( duplicatebiblionumber ) %] |
411 |
[% IF ( duplicatebiblionumber ) %] |
|
Lines 481-489
function Changefwk(FwkList) {
Link Here
|
| 481 |
|
465 |
|
| 482 |
[% UNLESS (circborrowernumber) %][%# Hide in fast cataloging %] |
466 |
[% UNLESS (circborrowernumber) %][%# Hide in fast cataloging %] |
| 483 |
<div class="btn-group"><a class="btn btn-small" href="#" id="z3950search"><i class="fa fa-search"></i> Z39.50/SRU search</a></div> |
467 |
<div class="btn-group"><a class="btn btn-small" href="#" id="z3950search"><i class="fa fa-search"></i> Z39.50/SRU search</a></div> |
| 484 |
[% IF Koha.Preference( 'EnableAdvancedCatalogingEditor' ) == 1 %] |
468 |
[% END %] |
| 485 |
<div class="btn-group"><a href="#" id="switcheditor" class="btn btn-small">Switch to advanced editor</a></div> |
469 |
|
| 486 |
[% END %] |
470 |
<div class="btn-group"> |
|
|
471 |
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-cog"></i> Settings <span class="caret"></span></button> |
| 472 |
<ul id="settings-menu" class="dropdown-menu"> |
| 473 |
[% IF Koha.Preference( 'EnableAdvancedCatalogingEditor' ) == 1 %] |
| 474 |
<li><a href="#" id="switcheditor">Switch to advanced editor</a></li> |
| 475 |
[% END %] |
| 476 |
[% IF marcflavour != 'NORMARC' AND NOT advancedMARCEditor %] |
| 477 |
<li> |
| 478 |
<a href="#" id="marcDocsSelect"><i class="fa fa-check-square-o"></i> Show MARC tag documentation links</a> |
| 479 |
<li> |
| 480 |
<a href="#" id="marcTagsSelect"><i class="fa fa-check-square-o"></i> Show tags</a> |
| 481 |
</li> |
| 482 |
[% END %] |
| 483 |
<li class="divider"></li> |
| 484 |
<li class="nav-header">Change framework</li> |
| 485 |
<li> |
| 486 |
<a href="#" class="change-framework" data-frameworkcode=""> |
| 487 |
[% IF ( frameworkcode ) %] |
| 488 |
<i class="fa fa-fw"> </i> |
| 489 |
[% ELSE %] |
| 490 |
<i class="fa fa-fw fa-check"></i> |
| 491 |
[% END %] |
| 492 |
Default |
| 493 |
</a> |
| 494 |
</li> |
| 495 |
[% FOREACH frameworkcodeloo IN frameworkcodeloop %] |
| 496 |
<li> |
| 497 |
<a href="#" class="change-framework" data-frameworkcode="[% frameworkcodeloo.value %]"> |
| 498 |
[% IF ( frameworkcodeloo.selected ) %] |
| 499 |
<i class="fa fa-fw fa-check"></i> |
| 500 |
[% ELSE %] |
| 501 |
<i class="fa fa-fw"> </i> |
| 502 |
[% END %] |
| 503 |
[% frameworkcodeloo.frameworktext %] |
| 504 |
</a> |
| 505 |
</li> |
| 506 |
[% END %] |
| 507 |
</ul> |
| 508 |
</div> |
| 509 |
[% UNLESS (circborrowernumber) %][%# Hide in fast cataloging %] |
| 487 |
[% IF (biblionumber) %] |
510 |
[% IF (biblionumber) %] |
| 488 |
[% IF ( BiblioDefaultViewmarc ) %] |
511 |
[% IF ( BiblioDefaultViewmarc ) %] |
| 489 |
<div class="btn-group"> |
512 |
<div class="btn-group"> |
|
Lines 506-533
function Changefwk(FwkList) {
Link Here
|
| 506 |
<a class="btn btn-small" id="cancel" href="/cgi-bin/koha/cataloguing/addbooks.pl">Cancel</a> |
529 |
<a class="btn btn-small" id="cancel" href="/cgi-bin/koha/cataloguing/addbooks.pl">Cancel</a> |
| 507 |
[% END %] |
530 |
[% END %] |
| 508 |
[% END %] |
531 |
[% END %] |
| 509 |
<div class="btn-group"> |
|
|
| 510 |
<label for="Frameworks">Change framework: </label> |
| 511 |
<select name="frameworkcode" id="Frameworks" onchange="Changefwk(this);"> |
| 512 |
<option value="Default">Default</option> |
| 513 |
[% FOREACH frameworkcodeloo IN frameworkcodeloop %] |
| 514 |
[% IF ( frameworkcodeloo.selected ) %] |
| 515 |
<option value="[% frameworkcodeloo.value %]" selected="selected"> |
| 516 |
[% ELSE %] |
| 517 |
<option value="[% frameworkcodeloo.value %]"> |
| 518 |
[% END %] |
| 519 |
[% frameworkcodeloo.frameworktext %] |
| 520 |
</option> |
| 521 |
[% END %] |
| 522 |
</select> |
| 523 |
</div> |
| 524 |
</div> |
532 |
</div> |
| 525 |
|
533 |
|
| 526 |
[% IF ( popup ) %] |
534 |
[% IF ( popup ) %] |
| 527 |
<input type="hidden" name="mode" value="popup" /> |
535 |
<input type="hidden" name="mode" value="popup" /> |
| 528 |
[% END %] |
536 |
[% END %] |
| 529 |
<input type="hidden" name="op" value="addbiblio" /> |
537 |
<input type="hidden" name="op" value="addbiblio" /> |
| 530 |
<input type="hidden" name="frameworkcode" value="[% frameworkcode %]" /> |
538 |
<input type="hidden" id="frameworkcode" name="frameworkcode" value="[% frameworkcode %]" /> |
| 531 |
<input type="hidden" name="biblionumber" value="[% biblionumber %]" /> |
539 |
<input type="hidden" name="biblionumber" value="[% biblionumber %]" /> |
| 532 |
<input type="hidden" name="breedingid" value="[% breedingid %]" /> |
540 |
<input type="hidden" name="breedingid" value="[% breedingid %]" /> |
| 533 |
<input type="hidden" name="changed_framework" value="" /> |
541 |
<input type="hidden" name="changed_framework" value="" /> |
| 534 |
- |
|
|