From 7672363189f7d2827aa667ace3722f43bc85e440 Mon Sep 17 00:00:00 2001 From: Jesse Weaver Date: Thu, 22 Oct 2015 16:53:11 -0600 Subject: [PATCH] [PASSED QA] 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 --- koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js | 2 -- koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc | 9 ++++++++- koha-tmpl/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 91a286d..1fe5e37 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 310ca45..4cc594f 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 aa69ca0..e4e0cda 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' %] -- 1.9.1