Bug 1859: Do not display <<>> if an entry without value is selected

For instance there are ---TABLES--- to delimite fields' tables, if
selected we do not want to add "<<>>" to the letter.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2016-05-13 22:03:08 +01:00 committed by Kyle M Hall
parent 9b99d78101
commit 2c332513ff
1 changed files with 1 additions and 1 deletions

View File

@ -134,7 +134,7 @@ $(document).ready(function() {
if($(myListBox).find('option').length > 0) {
$(myListBox).find('option').each( function (){
if ( $(this).attr('selected') ) {
if ( $(this).attr('selected') && $(this).val().length > 0 ) {
$(myQuery).insertAtCaret("<<" + $(this).val() + ">>");
}
});