From e204bb95d91713bfc76bcc222eaf5bdb9affd82f Mon Sep 17 00:00:00 2001 From: Jesse Weaver Date: Thu, 22 Oct 2015 16:53:11 -0600 Subject: [PATCH] Bug 11559: (QA followup) fix pagination bar, add Ctrl-D to macro editor Also, fix incredibly silly mistake with keyboard shortcuts popup. Signed-off-by: Katrin Fischer --- .../intranet-tmpl/lib/koha/cateditor/marc-editor.js | 2 -- .../intranet-tmpl/prog/en/includes/cateditor-ui.inc | 9 ++++++++- .../intranet-tmpl/prog/en/modules/cataloguing/editor.tt | 6 +++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js index 91a286d9a7..1fe5e375eb 100644 --- a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js +++ b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js @@ -204,8 +204,6 @@ define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], 'Ctrl-D': function( cm ) { // Insert subfield delimiter - // This will be extended later to allow either a configurable subfield delimiter or just - // make it be the double cross. var cur = cm.getCursor(); cm.replaceRange( "‡", cur, null ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc index 310ca4545e..4cc594fb61 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc @@ -531,7 +531,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr pages.push( '
  • ' + _("Next") + ' »
  • ' ); } - if ( pages.length > 1 ) $( '#search-top-pages, #search-bottom-pages' ).find( '.pagination' ).html( ''); + $( '#search-top-pages, #search-bottom-pages' ).find( '.pagination' ).html( pages.length > 1 ? ( '' ) : '' ); var $overlay = $('#search-overlay'); $overlay.find('span').text(_("Loading")); @@ -778,6 +778,13 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr macroEditor = CodeMirror( $('#macro-editor')[0], { + extraKeys: { + 'Ctrl-D': function( cm ) { + var cur = cm.getCursor(); + + cm.replaceRange( "‡", cur, null ); + }, + }, mode: 'null', lineNumbers: true, } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt index aa69ca0d46..e4e0cdaa4f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt @@ -229,7 +229,9 @@ -
    +
    + + - - [% PROCESS 'cateditor-ui.inc' %] [% INCLUDE 'intranet-bottom.inc' %] -- 2.39.5