|
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 136-158
Link Here
|
| 136 |
return false; |
156 |
return false; |
| 137 |
}); |
157 |
}); |
| 138 |
|
158 |
|
| 139 |
$( '#switcheditor' ).click( function() { |
159 |
$( '#toggleEditor' ).change( function() { |
| 140 |
var breedingid = [% breedingid || "null" | html %]; |
160 |
changeEditor(); |
| 141 |
|
161 |
} ); |
| 142 |
if ( !confirm( breedingid ? _("This record cannot be transferred to the advanced editor. Continue?") : _("Any changes will not be saved. Continue?") ) ) return false; |
|
|
| 143 |
|
| 144 |
Cookies.set( 'catalogue_editor_[% logged_in_user.borrowernumber | html %]', 'advanced', { expires: 365, path: '/', sameSite: 'Lax' } ); |
| 145 |
|
| 146 |
var biblionumber = [% biblionumber || "null" | html %]; |
| 147 |
|
| 148 |
if ( biblionumber ) { |
| 149 |
window.location = '/cgi-bin/koha/cataloguing/editor.pl#catalog/' + biblionumber; |
| 150 |
} else { |
| 151 |
window.location = '/cgi-bin/koha/cataloguing/editor.pl'; |
| 152 |
} |
| 153 |
|
162 |
|
| 154 |
return false; |
163 |
$( '#switcheditor' ).click( function() { |
|
|
164 |
changeEditor(); |
| 155 |
} ); |
165 |
} ); |
|
|
166 |
|
| 156 |
$(".change-framework").on("click", function(){ |
167 |
$(".change-framework").on("click", function(){ |
| 157 |
var frameworkcode = $(this).data("frameworkcode"); |
168 |
var frameworkcode = $(this).data("frameworkcode"); |
| 158 |
$("#frameworkcode").val( frameworkcode ); |
169 |
$("#frameworkcode").val( frameworkcode ); |
|
Lines 823-828
function PopupMARCFieldDoc(field) {
Link Here
|
| 823 |
<div class="row"> |
834 |
<div class="row"> |
| 824 |
<div class="col-md-10 col-md-offset-1"> |
835 |
<div class="col-md-10 col-md-offset-1"> |
| 825 |
|
836 |
|
|
|
837 |
[% IF Koha.Preference('EnableAdvancedCatalogingEditor') %] |
| 838 |
<div id="toggle-editor"> |
| 839 |
<label for="toggle-editor">Editor: </label> |
| 840 |
<label class="switch"> |
| 841 |
<input id="toggleEditor" type="checkbox"> |
| 842 |
<span class="slider" data-editor="Basic"></span> |
| 843 |
</label> |
| 844 |
</div> |
| 845 |
[% END %] |
| 846 |
|
| 826 |
<div id="check_errors"></div> |
847 |
<div id="check_errors"></div> |
| 827 |
|
848 |
|
| 828 |
<h1> |
849 |
<h1> |