Lines 36-41
Link Here
|
36 |
$("#loading").hide(); |
36 |
$("#loading").hide(); |
37 |
}); |
37 |
}); |
38 |
var Sticky; |
38 |
var Sticky; |
|
|
39 |
|
40 |
function changeEditor() { |
41 |
|
42 |
var breedingid = [% breedingid || "null" | html %]; |
43 |
|
44 |
if ( !confirm( breedingid ? _("This record cannot be transferred to the advanced editor. Continue?") : _("Any changes will not be saved. Continue?") ) ) return false; |
45 |
|
46 |
Cookies.set( 'catalogue_editor_[% logged_in_user.borrowernumber | html %]', 'advanced', { expires: 365, path: '/', sameSite: 'Lax' } ); |
47 |
|
48 |
var biblionumber = [% biblionumber || "null" | html %]; |
49 |
|
50 |
if ( biblionumber ) { |
51 |
window.location = '/cgi-bin/koha/cataloguing/editor.pl#catalog/' + biblionumber; |
52 |
} else { |
53 |
window.location = '/cgi-bin/koha/cataloguing/editor.pl'; |
54 |
} |
55 |
|
56 |
return false; |
57 |
} |
58 |
|
39 |
$(document).ready(function() { |
59 |
$(document).ready(function() { |
40 |
|
60 |
|
41 |
[% IF bib_doesnt_exist %] |
61 |
[% IF bib_doesnt_exist %] |
Lines 151-173
Link Here
|
151 |
return false; |
171 |
return false; |
152 |
}); |
172 |
}); |
153 |
|
173 |
|
154 |
$( '#switcheditor' ).click( function() { |
174 |
$( '#toggleEditor' ).change( function() { |
155 |
var breedingid = [% breedingid || "null" | html %]; |
175 |
changeEditor(); |
156 |
|
176 |
} ); |
157 |
if ( !confirm( breedingid ? _("This record cannot be transferred to the advanced editor. Continue?") : _("Any changes will not be saved. Continue?") ) ) return false; |
|
|
158 |
|
159 |
Cookies.set( 'catalogue_editor_[% logged_in_user.borrowernumber | html %]', 'advanced', { expires: 365, path: '/', sameSite: 'Lax' } ); |
160 |
|
161 |
var biblionumber = [% biblionumber || "null" | html %]; |
162 |
|
163 |
if ( biblionumber ) { |
164 |
window.location = '/cgi-bin/koha/cataloguing/editor.pl#catalog/' + biblionumber; |
165 |
} else { |
166 |
window.location = '/cgi-bin/koha/cataloguing/editor.pl'; |
167 |
} |
168 |
|
177 |
|
169 |
return false; |
178 |
$( '#switcheditor' ).click( function() { |
|
|
179 |
changeEditor(); |
170 |
} ); |
180 |
} ); |
|
|
181 |
|
171 |
$(".change-framework").on("click", function(){ |
182 |
$(".change-framework").on("click", function(){ |
172 |
var frameworkcode = $(this).data("frameworkcode"); |
183 |
var frameworkcode = $(this).data("frameworkcode"); |
173 |
$("#frameworkcode").val( frameworkcode ); |
184 |
$("#frameworkcode").val( frameworkcode ); |
Lines 841-846
$(document).ready(function(){
Link Here
|
841 |
<div class="row"> |
852 |
<div class="row"> |
842 |
<div class="col-md-10 col-md-offset-1"> |
853 |
<div class="col-md-10 col-md-offset-1"> |
843 |
|
854 |
|
|
|
855 |
[% IF Koha.Preference('EnableAdvancedCatalogingEditor') %] |
856 |
<div id="toggle-editor"> |
857 |
<label for="toggle-editor">Advanced editor: </label> |
858 |
<label class="switch"> |
859 |
<input id="toggleEditor" type="checkbox"> |
860 |
<span class="slider"></span> |
861 |
</label> |
862 |
</div> |
863 |
[% END %] |
864 |
|
844 |
<div id="check_errors"></div> |
865 |
<div id="check_errors"></div> |
845 |
|
866 |
|
846 |
<h1> |
867 |
<h1> |