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 <katrin.fischer.83@web.de>
This commit is contained in:
Jesse Weaver 2015-10-22 16:53:11 -06:00 committed by Tomas Cohen Arazi
parent 3b2d66cec8
commit e204bb95d9
3 changed files with 11 additions and 6 deletions

View File

@ -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 );

View File

@ -531,7 +531,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
pages.push( ' <li><a class="search-nav" href="#" data-offset="' + (data.offset + data.page_size) + '">' + _("Next") + ' &raquo;</a></li>' );
}
if ( pages.length > 1 ) $( '#search-top-pages, #search-bottom-pages' ).find( '.pagination' ).html( '<ul>' + pages.join( '' ) + '</ul>');
$( '#search-top-pages, #search-bottom-pages' ).find( '.pagination' ).html( pages.length > 1 ? ( '<ul>' + pages.join( '' ) + '</ul>' ) : '' );
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,
}

View File

@ -229,7 +229,9 @@
</div>
</div>
<div id="shortcuts-contents">
</div>
<div id="shortcuts-contents" style="display: none">
<table class="table table-condensed">
<thead>
<tr>
@ -278,8 +280,6 @@
</table>
</div>
</div>
[% PROCESS 'cateditor-ui.inc' %]
[% INCLUDE 'intranet-bottom.inc' %]