diff --git a/add/data/locale/edirom-lang-de.xml b/add/data/locale/edirom-lang-de.xml
index 1ca78817d..a2b739723 100644
--- a/add/data/locale/edirom-lang-de.xml
+++ b/add/data/locale/edirom-lang-de.xml
@@ -178,6 +178,7 @@
+
diff --git a/add/data/locale/edirom-lang-en.xml b/add/data/locale/edirom-lang-en.xml
index 0bbdddbb1..8ac413a0a 100644
--- a/add/data/locale/edirom-lang-en.xml
+++ b/add/data/locale/edirom-lang-en.xml
@@ -177,6 +177,7 @@
+
diff --git a/add/data/prefs/edirom-prefs.xml b/add/data/prefs/edirom-prefs.xml
index 4e4a5df70..ddc8c28d1 100644
--- a/add/data/prefs/edirom-prefs.xml
+++ b/add/data/prefs/edirom-prefs.xml
@@ -28,5 +28,6 @@
+
diff --git a/add/data/xql/getAnnotationInfos.xql b/add/data/xql/getAnnotationInfos.xql
index 337a60fef..2485537ac 100644
--- a/add/data/xql/getAnnotationInfos.xql
+++ b/add/data/xql/getAnnotationInfos.xql
@@ -7,34 +7,28 @@ xquery version "3.1";
(: IMPORTS ================================================================= :)
import module namespace annotation = "http://www.edirom.de/xquery/annotation" at "../xqm/annotation.xqm";
-
+import module namespace edition = "http://www.edirom.de/xquery/edition" at "../xqm/edition.xqm";
import module namespace eutil = "http://www.edirom.de/xquery/eutil" at "../xqm/eutil.xqm";
(: NAMESPACE DECLARATIONS ================================================== :)
declare namespace mei = "http://www.music-encoding.org/ns/mei";
-
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
-
declare namespace request = "http://exist-db.org/xquery/request";
(: OPTION DECLARATIONS ===================================================== :)
declare option output:method "json";
-
declare option output:media-type "application/json";
(: VARIABLE DECLARATIONS =================================================== :)
declare variable $uri := request:get-parameter('uri', '');
-
declare variable $edition := request:get-parameter('edition', '');
-declare variable $edition_path := eutil:getPreference('edition_path', $edition);
-
(: FUNCTION DECLARATIONS =================================================== :)
@@ -89,13 +83,13 @@ declare function local:getDistinctPriorities($annots as element()*) as xs:string
(: QUERY BODY ============================================================== :)
-let $mei := doc($uri)/root()
-
-let $annots := collection($edition_path)//mei:annot[matches(@plist, $uri)] | $mei//mei:annot
+let $mei := doc($uri)
+let $editionCollection := edition:collection($edition)
+let $annots := $editionCollection//mei:annot[matches(@plist, $uri)] | $mei//mei:annot
let $categories :=
for $category in local:getDistinctCategories($annots)
- let $categoryElement := (collection($edition_path)/id($category)[mei:label or mei:name])[1]
+ let $categoryElement := ($editionCollection/id($category)[mei:label or mei:name])[1]
let $name := annotation:category_getName($categoryElement, eutil:getLanguage($edition))
order by $name
return
@@ -106,7 +100,7 @@ let $categories :=
let $prios :=
for $priority in local:getDistinctPriorities($annots)
- let $name := annotation:getPriorityLabel((collection($edition_path)//id($priority)[mei:label or mei:name])[1])
+ let $name := annotation:getPriorityLabel(($editionCollection/id($priority)[mei:label or mei:name])[1])
order by $name
return
map {
diff --git a/add/data/xql/getAnnotationsOnPage.xql b/add/data/xql/getAnnotationsOnPage.xql
index 7209dfd75..4018676ce 100644
--- a/add/data/xql/getAnnotationsOnPage.xql
+++ b/add/data/xql/getAnnotationsOnPage.xql
@@ -15,30 +15,24 @@ xquery version "3.1";
import module namespace functx = "http://www.functx.com";
+import module namespace edition = "http://www.edirom.de/xquery/edition" at "../xqm/edition.xqm";
import module namespace eutil = "http://www.edirom.de/xquery/eutil" at "../xqm/eutil.xqm";
(: NAMESPACE DECLARATIONS ================================================== :)
declare namespace ft = "http://exist-db.org/xquery/lucene";
-
declare namespace mei = "http://www.music-encoding.org/ns/mei";
-
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
-
declare namespace request = "http://exist-db.org/xquery/request";
-
declare namespace svg = "http://www.w3.org/2000/svg";
-
declare namespace xlink = "http://www.w3.org/1999/xlink";
-
declare namespace xmldb = "http://exist-db.org/xquery/xmldb";
(: OPTION DECLARATIONS ===================================================== :)
declare option output:method "json";
-
declare option output:media-type "application/json";
@@ -108,7 +102,7 @@ declare function local:findAnnotations($edition as xs:string, $uri as xs:string,
(: TODO: search in other documents and in other collections :)
(: TODO: check if annotations hold URIs or IDRefs :)
- let $annots := collection(eutil:getPreference('edition_path', $edition))//mei:annot
+ let $annots := edition:collection($edition)//mei:annot
let $ret :=
for $id in $elemIds
diff --git a/add/data/xql/getMovements.xql b/add/data/xql/getMovements.xql
index 9c9679318..44a2058c4 100644
--- a/add/data/xql/getMovements.xql
+++ b/add/data/xql/getMovements.xql
@@ -27,7 +27,16 @@ let $movements as array(*)* :=
return
map {
'id': $movement/string(@xml:id),
- 'name': $movement/string(@label)
+ 'name': $movement/string(@label),
+ 'parts': array {
+ for $part in $movement//mei:part
+ return
+ map {
+ 'id': $part/string(@xml:id),
+ 'name': $part/string(@label)
+ }
+ }
+
}
}
diff --git a/add/data/xqm/annotation.xqm b/add/data/xqm/annotation.xqm
index 8cd306432..644b1201c 100644
--- a/add/data/xqm/annotation.xqm
+++ b/add/data/xqm/annotation.xqm
@@ -100,7 +100,7 @@ declare function annotation:toJSON($anno as element(), $edition as xs:string) as
if(doc-available($p)) then
(doc($p))
else
- (collection(eutil:getPreference('edition_path', $edition))//id($p)/root())
+ edition:collection($edition)/id($p)/root()
return
if ($pDoc//mei:sourceDesc/mei:source/mei:identifier[@type = 'siglum']) then
($pDoc//mei:sourceDesc/mei:source/mei:identifier[@type = 'siglum']/text())
diff --git a/add/help/help_de.xml b/add/help/help_de.xml
index 8dddc0f2c..ef7030b7a 100644
--- a/add/help/help_de.xml
+++ b/add/help/help_de.xml
@@ -131,7 +131,7 @@
-
Die Takte von Faksimiles und Noteneditionen sind meistens mit Taktnummern versehen, diese können mit dem vierten Button von links für alle geöffneten Fenster mit musikalischem Inhalt ein- und ausgeblendet werden.
+
Die e von Faksimiles und Noteneditionen sind meistens mit Nummern versehen, diese können mit dem vierten Button von links für alle geöffneten Fenster mit musikalischem Inhalt ein- und ausgeblendet werden.
Unter der Schiebeleiste befindet sich der Knopf .
- Dieser muss geklickt werden, um den ausgewählten Takt in allen offenen Quellen des Desktops zu öffnen.
- Es kann auch vor- bzw. rückwärts auf Taktebene innerhalb der Quellen navigiert werden, indem die Pfeile rechts und links des -Knopfs verwendet werden.
- Sollte der ausgewählte Takt aber in anderen Quellen vorkommen, die aktuell nicht geöffnet sind, erscheint unten rechts ein Knopf, der alle weiteren Quellen öffnet und die Fenster neu ordnet.
+ Dieser muss geklickt werden, um den ausgewählten in allen offenen Quellen des Desktops zu öffnen.
+ Es kann auch vor- bzw. rückwärts auf -Ebene innerhalb der Quellen navigiert werden, indem die Pfeile rechts und links des -Knopfs verwendet werden.
+ Sollte der ausgewählte aber in anderen Quellen vorkommen, die aktuell nicht geöffnet sind, erscheint unten rechts ein Knopf, der alle weiteren Quellen öffnet und die Fenster neu ordnet.
@@ -220,8 +220,8 @@
- Die Option unterstützt die Kontrolle der Einblendung von Taktnumern der vorliegenden Quelle.
- Taktnummern erscheinen in der Mitte des jeweiligen Taktes.
+ Die Option unterstützt die Kontrolle der Einblendung von -Nummern der vorliegenden Quelle.
+ -Nummern erscheinen in der Mitte vom jeweiligen .
@@ -267,7 +267,7 @@
- Die Option öffnet einen Dialog, in den gewünschte Satz- und Takt-Nummern eingetragen werden können.
+ Die Option öffnet einen Dialog, in den gewünschte Satz- und -Nummern eingetragen werden können.
@@ -287,11 +287,11 @@
-
The bars of facsimiles and editions are usually provided with bar numbers; these can be shown and hidden for all open windows with musical content using the fourth button from the left.
+
The s of facsimiles and editions are usually provided with numbers; these can be shown and hidden for all open windows with musical content using the fourth button from the left.
@@ -191,16 +191,16 @@
with and without additional drop-down menu.
Below the slider is the button .
- This must be clicked to open the selected measure in all open sources on the desktop.
- You can also navigate forward or backward at the measure level within the sources using the arrows to the right and left of the button.
- However, if the selected measure occurs in other sources that are not currently open, a button will appear at the bottom right that opens all other sources and rearranges the windows
+ This must be clicked to open the selected in all open sources on the desktop.
+ You can also navigate forward or backward at the level within the sources using the arrows to the right and left of the button.
+ However, if the selected occurs in other sources that are not currently open, a button will appear at the bottom right that opens all other sources and rearranges the windows
Content windows
At the top of a window with content there is a line that shows the title of the open object.
- Under the title bar, each window has a .
+ Under the title, each window has a .
On the left in the is the , with which you can switch between different of the currently open window, e.g. , , .
Depending on the view selected, the may be displayed at the bottom of the window, which provides different tools for manipulating the various objects.
@@ -236,8 +236,8 @@
- The option supports the control of the display of measure numbers from the current source.
- Measure numbers appear in the middle of each measure.
+ The option supports the control of the display of numbers from the current source.
+ In the middle of each the number is shown.
@@ -283,7 +283,7 @@
- The option opens a dialog in which the desired division and measure number can be entered.
+ The option opens a dialog in which the desired division and number can be entered.
@@ -303,11 +303,11 @@
- : switches to measure-based navigation of the source. When this view is activated, the following three additional tools appear in the .
+ : switches to -based navigation of the source. When this view is activated, the following three additional tools appear in the .
- , : The movement whose measures should be displayed can be selected.
+ , : The movement whose s should be displayed can be selected.
@@ -315,7 +315,7 @@
- , : Enter a measure range through which you want to scroll.
+ , : Enter a range through which you want to scroll.
@@ -328,8 +328,8 @@
or
-
The number in the number field shows the current page number () or measure number ().
- Switching to another page or measure is possible by clicking on the arrow heads or entering a number in the number field.
+
The number in the number field shows the current page number () or number ().
+ Switching to another page or is possible by clicking on the arrow heads or entering a number in the number field.
The possible numbers correspond to the source, so they do not always start with 1 and can also contain alphanumeric characters.
diff --git a/add/index.xql b/add/index.xql
index cb834ba36..71ec1e354 100644
--- a/add/index.xql
+++ b/add/index.xql
@@ -82,9 +82,8 @@ let $eoIndexPage :=
then
else (),
- ,
- ,
- )
+
+ )
}
diff --git a/app/controller/window/source/SourceView.js b/app/controller/window/source/SourceView.js
index 02b3242b0..369319d33 100644
--- a/app/controller/window/source/SourceView.js
+++ b/app/controller/window/source/SourceView.js
@@ -69,7 +69,7 @@ Ext.define('EdiromOnline.controller.window.source.SourceView', {
var data = response.responseText;
var movements = Ext.create('Ext.data.Store', {
- fields: ['id', 'name'],
+ fields: ['id', 'name', 'parts'],
data: Ext.JSON.decode(data)
});
diff --git a/app/view/window/source/SourceView.js b/app/view/window/source/SourceView.js
index 86c18d4ad..fe8271e0b 100644
--- a/app/view/window/source/SourceView.js
+++ b/app/view/window/source/SourceView.js
@@ -238,6 +238,9 @@ Ext.define('EdiromOnline.view.window.source.SourceView', {
setMovements: function(movements) {
var me = this;
+
+ // get preference for movement / part - order
+ var gotomenu_display = getPreference('gotomenu_display');
// set me.movements to submitted JSON array
me.movements = movements;
@@ -245,19 +248,69 @@ Ext.define('EdiromOnline.view.window.source.SourceView', {
// set meovements for measureBaseView
me.measureBasedView.setMovements(movements);
- // initialize movementItems variable
+ // initialize movementItems, partList, partNames variables
var movementItems = [];
-
+ var partList = [];
+ var partNames =[];
+
// iterate over submitted movements and push them to movementItems variable
- movements.each(function(movement) {
- movementItems.push({
- text: movement.get('name'),
- handler: Ext.bind(me.gotoMovement, me, movement.get('id'), true)
- });
+ movements.data.each(function(movement) {
+ // check if parts exist and if they have ids
+ if(movement.data.parts.length === 0 || movement.data.parts[0].id === null || movement.data.parts[0].id === "") {
+ movementItems.push({
+ text: movement.get('name'),
+ handler: Ext.bind(me.gotoMovement, me, movement.get('id'), true)
+ });
+ } else {
+ if(gotomenu_display == 'partwise') {
+ movement.data.parts.forEach(function(part) {
+ var exists = partNames.indexOf(part.name);
+ var obj = {
+ text: part.name,
+ menu: []
+ };
+ if (exists === -1) {
+ partNames.push(part.name);
+ partList.push(obj);
+ exists = partNames.length - 1;
+ }
+ var menu_mov = {
+ text: movement.get('name'),
+ handler: Ext.bind(me.gotoMovement, me, part.id, true)
+ }
+
+ partList[exists].menu.push(menu_mov);
+ });
+ } else {
+ var parts = [];
+ movement.data.parts.forEach(function(part){
+ parts.push(part);
+ });
+
+ var partItems = [];
+ parts.forEach(function(part){
+ partItems.push({
+ text: part.name,
+ handler: Ext.bind(me.gotoMovement, me, part.id, true)
+ });
+ });
+
+ movementItems.push({
+ text: movement.get('name'),
+ menu: partItems
+ });
+ }
+ }
});
+ if(gotomenu_display == 'partwise') {
+ partList.forEach(function(item) {
+ movementItems.push(item);
+ });
+ }
+
// 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({