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