From 10ba464888586e128e21c0c1bdd461ae92caa6f3 Mon Sep 17 00:00:00 2001 From: Tobias Bachmann Date: Mon, 9 Dec 2024 22:15:03 +0100 Subject: [PATCH] ftr/PartsInGoToMenu: wrap parts in array and fix indent --- add/data/xql/getMovements.xql | 14 ++++++++------ app/view/window/source/SourceView.js | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/add/data/xql/getMovements.xql b/add/data/xql/getMovements.xql index 4b82b6388..44a2058c4 100644 --- a/add/data/xql/getMovements.xql +++ b/add/data/xql/getMovements.xql @@ -28,12 +28,14 @@ let $movements as array(*)* := map { 'id': $movement/string(@xml:id), 'name': $movement/string(@label), - 'parts': for $part in $movement//mei:part - return - map { - 'id': $part/string(@xml:id), - 'name': $part/string(@label) - } + 'parts': array { + for $part in $movement//mei:part + return + map { + 'id': $part/string(@xml:id), + 'name': $part/string(@label) + } + } } } diff --git a/app/view/window/source/SourceView.js b/app/view/window/source/SourceView.js index 0c731db3d..c03fbef24 100644 --- a/app/view/window/source/SourceView.js +++ b/app/view/window/source/SourceView.js @@ -310,7 +310,7 @@ Ext.define('EdiromOnline.view.window.source.SourceView', { // check if contains more than one item and save to variable as boolean - var isDisabled = ((movementItems.length <= 1) ? true : false); + var isDisabled = ((movementItems.length < 1) ? true : false); // add gotoMovement entry to goto menu me.gotoMenu.menu.add({