Bug 24623: Phase out jquery.cookie.js: Advanced MARC editor
This patch changes cookie handling in the MARC editor templates so that the js-cookie plugin is used instead of jquery.cookie. To test, apply the patch and go to Cataloging. - Search for a title using the cataloging search in the header search form. - In the search results, choose "Edit record" from the "Actions" menu. - By default you should be taken to the "basic" MARC editor. - From the "Settings" menu button, choose "Switch to advanced editor." - Return to the cataloging home page and perform another search. - Now when you choose "Edit record" you should be taken directly to the advanced editor. - In the advanced editor, choose "Switch to basic editor" from the "Settings" menu. - The basic editor should now be saved as the default. - Test also with "Edit record" links in catalog search results. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
aeb55f4138
commit
bb954554b3
2 changed files with 2 additions and 2 deletions
|
@ -1207,7 +1207,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
|
|||
$( '#switch-editor' ).click( function() {
|
||||
if ( !confirm( _("Any changes will not be saved. Continue?") ) ) return;
|
||||
|
||||
$.cookie( 'catalogue_editor_[% logged_in_user.borrowernumber | html %]', 'basic', { expires: 365, path: '/' } );
|
||||
Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "basic", { expires: 365, path: '/' } );
|
||||
|
||||
if ( state.backend == 'catalog' ) {
|
||||
window.location = '/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=' + state.recordID;
|
||||
|
|
|
@ -247,7 +247,7 @@
|
|||
});
|
||||
|
||||
$("#useadvanced").click(function(){
|
||||
$.cookie( 'catalogue_editor_[% logged_in_user.borrowernumber | html %]', 'advanced', { expires: 365, path: '/' } );
|
||||
Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "advanced", { expires: 365, path: '/' } );
|
||||
return true;
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue