|
Lines 26-31
Link Here
|
| 26 |
$("#loading").hide(); |
26 |
$("#loading").hide(); |
| 27 |
}); |
27 |
}); |
| 28 |
var Sticky; |
28 |
var Sticky; |
|
|
29 |
|
| 30 |
function changeEditor() { |
| 31 |
|
| 32 |
var breedingid = [% breedingid || "null" | html %]; |
| 33 |
|
| 34 |
if ( !confirm( breedingid ? _("This record cannot be transferred to the advanced editor. Continue?") : _("Any changes will not be saved. Continue?") ) ) return false; |
| 35 |
|
| 36 |
Cookies.set( 'catalogue_editor_[% logged_in_user.borrowernumber | html %]', 'advanced', { expires: 365, path: '/', sameSite: 'Lax' } ); |
| 37 |
|
| 38 |
var biblionumber = [% biblionumber || "null" | html %]; |
| 39 |
|
| 40 |
if ( biblionumber ) { |
| 41 |
window.location = '/cgi-bin/koha/cataloguing/editor.pl#catalog/' + biblionumber; |
| 42 |
} else { |
| 43 |
window.location = '/cgi-bin/koha/cataloguing/editor.pl'; |
| 44 |
} |
| 45 |
|
| 46 |
return false; |
| 47 |
} |
| 48 |
|
| 29 |
$(document).ready(function() { |
49 |
$(document).ready(function() { |
| 30 |
|
50 |
|
| 31 |
[% IF bib_doesnt_exist %] |
51 |
[% IF bib_doesnt_exist %] |
|
Lines 138-160
Link Here
|
| 138 |
return false; |
158 |
return false; |
| 139 |
}); |
159 |
}); |
| 140 |
|
160 |
|
| 141 |
$( '#switcheditor' ).click( function() { |
161 |
$( '#toggleEditor' ).change( function() { |
| 142 |
var breedingid = [% breedingid || "null" | html %]; |
162 |
changeEditor(); |
| 143 |
|
163 |
} ); |
| 144 |
if ( !confirm( breedingid ? _("This record cannot be transferred to the advanced editor. Continue?") : _("Any changes will not be saved. Continue?") ) ) return false; |
|
|
| 145 |
|
| 146 |
Cookies.set( 'catalogue_editor_[% logged_in_user.borrowernumber | html %]', 'advanced', { expires: 365, path: '/', sameSite: 'Lax' } ); |
| 147 |
|
| 148 |
var biblionumber = [% biblionumber || "null" | html %]; |
| 149 |
|
| 150 |
if ( biblionumber ) { |
| 151 |
window.location = '/cgi-bin/koha/cataloguing/editor.pl#catalog/' + biblionumber; |
| 152 |
} else { |
| 153 |
window.location = '/cgi-bin/koha/cataloguing/editor.pl'; |
| 154 |
} |
| 155 |
|
164 |
|
| 156 |
return false; |
165 |
$( '#switcheditor' ).click( function() { |
|
|
166 |
changeEditor(); |
| 157 |
} ); |
167 |
} ); |
|
|
168 |
|
| 158 |
$(".change-framework").on("click", function(){ |
169 |
$(".change-framework").on("click", function(){ |
| 159 |
var frameworkcode = $(this).data("frameworkcode"); |
170 |
var frameworkcode = $(this).data("frameworkcode"); |
| 160 |
$("#frameworkcode").val( frameworkcode ); |
171 |
$("#frameworkcode").val( frameworkcode ); |
|
Lines 816-821
function PopupMARCFieldDoc(field) {
Link Here
|
| 816 |
<div class="row"> |
827 |
<div class="row"> |
| 817 |
<div class="col-md-10 col-md-offset-1"> |
828 |
<div class="col-md-10 col-md-offset-1"> |
| 818 |
|
829 |
|
|
|
830 |
[% IF Koha.Preference('EnableAdvancedCatalogingEditor') %] |
| 831 |
<div id="toggle-editor"> |
| 832 |
<label for="toggle-editor">Editor: </label> |
| 833 |
<label class="switch"> |
| 834 |
<input id="toggleEditor" type="checkbox"> |
| 835 |
<span class="slider" data-editor="Basic"></span> |
| 836 |
</label> |
| 837 |
</div> |
| 838 |
[% END %] |
| 839 |
|
| 819 |
<div id="check_errors"></div> |
840 |
<div id="check_errors"></div> |
| 820 |
|
841 |
|
| 821 |
<h1> |
842 |
<h1> |