Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
0cb0a84
update getHelp
fmacca Jun 8, 2026
41b8bfa
Merge pull request #209 from Edirom/update-getHelp
fmacca Jun 17, 2026
198abe1
Incorporating edirom-dom web component (for TEI rendering) (#148)
daniel-jettka Jun 17, 2026
af83917
Bump actions/add-to-project from 1.0.2 to 2.0.0 (#198)
dependabot[bot] Jun 22, 2026
7999149
Bump actions/checkout from 6 to 7 (#218)
dependabot[bot] Jun 22, 2026
a5224cd
refactor: remove unused iconify script tag (#206)
bwbohl Jun 22, 2026
80bc310
avoid prepending `backendURL` to URLs (#199)
bwbohl Jun 22, 2026
0cf4aa1
AnnotationView: mark TODO
bwbohl Sep 11, 2025
77ae40f
AnnotationView: use calculated store fields instead of model
bwbohl Sep 11, 2025
dbd77b5
AnnotationView: add method for calculating columns
bwbohl Sep 11, 2025
1b53016
AnnotationView: remove predefined me.list
bwbohl Sep 11, 2025
d264f0b
AnnotationView: add method for creating list and store
bwbohl Sep 11, 2025
5a45aa8
AnnotationView: add method for loading Annotations and creating compo…
bwbohl Sep 11, 2025
70a4af9
AnnotationView: create method for initializing independent components
bwbohl Sep 11, 2025
358a673
AnnotationView: add event and property annotationsLoaded
bwbohl Sep 11, 2025
5ed293a
AnnotationView: call loadAnnotationsAndCreateComponents afterrender
bwbohl Sep 11, 2025
65461a9
AnnotationView: remove forgotten event listener
bwbohl Sep 11, 2025
89f4bb9
AnnotationsView: load list store only if defined
bwbohl Sep 11, 2025
570b525
AnnotationView: showList add check if me.list available
bwbohl Sep 11, 2025
40d1356
Delete Annotation.js
bwbohl Sep 11, 2025
02ca089
AnnotationView: rework column definitions to hide empty columns
bwbohl Sep 12, 2025
c213c7c
AnnotationView: getLangString for column headers
bwbohl Sep 12, 2025
ea8293c
AnnotationView: add default column definition for `id`
bwbohl Sep 12, 2025
5e5d34a
AnnotationView: readd default column definition for title
bwbohl Sep 12, 2025
765b621
AnnotationView: improve styling of pos column
bwbohl Sep 12, 2025
44494a0
AnnotationView controller: remove unneeded AJAXRequest parameters
bwbohl Sep 12, 2025
6945f97
AnnotationView: improve MVC separation of view and controller
bwbohl Sep 15, 2025
d22be06
AnnotationView: do not set column visible if already hidden in defaul…
bwbohl Sep 16, 2025
60a2014
AnnotationView controller: add debug log
bwbohl Sep 18, 2025
6338b29
AnnotationView: handle undefined emptyFields
bwbohl Sep 18, 2025
49a4c23
AnnotationView: handle annotation entries/fields with dots in their …
bwbohl Sep 18, 2025
e19e68d
annotation.scss: apply text-align tight to .annotationList .pos desce…
bwbohl Sep 19, 2025
71f5877
AnnotationView styling: move todo.css rules to annotation.scss
bwbohl Sep 19, 2025
3a155b4
AnnotationView: remove duplicate cls property
bwbohl Sep 19, 2025
674ee24
Source- and Text-Views: Load taxonomies array instead of categories a…
bwbohl Mar 3, 2026
0c3e60b
View – SourceView: use dynamic taxonomies in setAnnotationFilter func…
bwbohl Mar 3, 2026
20f9595
View – SourceView: use dynamic taxonomies in annotationFilterChanged …
bwbohl Mar 3, 2026
9a090ef
MeasureBasedView annotationFilterChanged: pass taxonomies array to in…
bwbohl Mar 11, 2026
264591c
MeasureBasedView – horizontal viewer: process taxonomies array for an…
bwbohl Mar 11, 2026
9460b2f
MeasureBasedView: add inline documentation
bwbohl Mar 11, 2026
6fe1d4f
SourceView: add some inline documentation
bwbohl Mar 11, 2026
867f9b3
AnnotationView: do not prepend 'view.window.AnnotationView_' for fiel…
bwbohl Mar 11, 2026
98c0c14
View PageBasedView – annotationFilter: process taxonomies array
bwbohl Mar 11, 2026
6a97a74
View PageBasedView: cleanup & formatting
bwbohl Mar 11, 2026
c0b0c27
View PageBasedView: align with View MeasureBasedView
bwbohl Mar 11, 2026
58a2c60
View PageBasedView: add some inline documentation
bwbohl Mar 11, 2026
4fa6483
View SourceView: add local-file fallback for taxonomy.label
bwbohl Mar 11, 2026
74de7bb
View SourceView: add some inline documentation
bwbohl Mar 11, 2026
2c4272e
View SourceView: remove trailing whitespaces
bwbohl Mar 11, 2026
1faec4b
View TextFacsimileSplitView – setAnnotationFilter: process taxonomies…
bwbohl Mar 11, 2026
4256db7
View TextFacsimileSplitView: fix trailing whitespaces and indentation
bwbohl Mar 11, 2026
31d30c0
View TextView – setAnnotationFilter: process taxonomies array
bwbohl Mar 11, 2026
0504d3f
View TextView: remove trailing whitespace
bwbohl Mar 11, 2026
26b0240
AnnotationView: ignore legacyFields
bwbohl Mar 24, 2026
08f8029
Application.js: remove call to undefined model.Annotation.updateProxy
bwbohl Mar 24, 2026
f78bfdb
MeasureBasedView: fix some indentation and trailing whitespace
bwbohl Mar 11, 2026
3e72013
TextFacsimileSplitView: add taxonomyClasses field to annotations store
bwbohl May 19, 2026
07e6000
MeasureBasedView: add taxonomyClasses field to annotations store
bwbohl May 19, 2026
c6da7e9
SourceView: add taxonomyClasses field to annotations store
bwbohl May 19, 2026
f567046
OpenSeaDragonViewer: support taxonomyClasses in annotation data
bwbohl May 19, 2026
b93a4bf
ImageViewer: support taxonomyClasses in image annotations
bwbohl May 19, 2026
1a4729c
feat: pass allTaxonomyIds to annotation filter
bwbohl May 19, 2026
5dab5d4
SourceView controller: merge categories and priorities into taxonomies
bwbohl May 28, 2026
58e85cb
ImageViewer fix: add null check before removing shape element
bwbohl Jun 9, 2026
c7bb197
feat: add legacy priority and category columns
bwbohl Jun 15, 2026
9c3d89e
cleanup: remove unused variable declaration
bwbohl Jun 16, 2026
f5b9bd1
refactor: addAnnotations in OpenSeaDragonViewer and ImageViewer
bwbohl Jun 17, 2026
d802544
Merge branch 'bazga/candidate' into ftr/dynamic-annotation-classifica…
bwbohl Jun 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/add-new-issues-and-prs-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v1.0.2
- uses: actions/add-to-project@v2.0.0
with:
project-url: https://github.com/orgs/Edirom/projects/4
github-token: ${{ secrets.ADD_TO_PROJECT_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
fetch-depth: 0 # fetch all history to include latest tags for build metadata
submodules: 'recursive'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-citation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Update or add commit and date-released fields
run: |
Expand Down
1 change: 0 additions & 1 deletion app/Application.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ Ext.define('EdiromOnline.Application', {
me.backendURL = config.backendURL || me.backendURL;
EdiromOnline.model.Edition.updateProxyUrl(me.backendURL);
EdiromOnline.model.Work.updateProxyUrl(me.backendURL);
EdiromOnline.model.Annotation.updateProxyUrl(me.backendURL);
me.initializeApplication();
}, me);
},
Expand Down
3 changes: 2 additions & 1 deletion app/controller/AJAXController.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ Ext.define('EdiromOnline.controller.AJAXController', {
if(typeof async === 'undefined')
async = true;

url = this.application.backendURL + url;
if(!/^https?:\/\//.test(url))
url = this.application.backendURL + url;

var fn = Ext.bind(function(response, options, retryNoInt) {

Expand Down
4 changes: 0 additions & 4 deletions app/controller/window/HelpWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ Ext.define('EdiromOnline.controller.window.HelpWindow', {

var windowContent = response.responseText;

// replace image paths (relative backendPath to absolute backendURL)
var replacee = new RegExp('src="' + me.backendPath.replace(/\/, '\/'/g), "g");
windowContent = windowContent.replace(replacee, 'src="' + me.backendURL);

// set window content
win.setContent(windowContent);
}, me)
Expand Down
2 changes: 1 addition & 1 deletion app/controller/window/source/MeasureBasedView.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Ext.define('EdiromOnline.controller.window.source.MeasureBasedView', {
var data = response.responseText;

var annotations = Ext.create('Ext.data.Store', {
fields: ['id', 'title', 'text', 'uri', 'plist', 'svgList', 'priority', 'categories', 'fn'],
fields: ['id', 'title', 'text', 'uri', 'plist', 'svgList', 'priority', 'categories', 'taxonomyClasses', 'fn'],
data: Ext.JSON.decode(data)
});

Expand Down
43 changes: 28 additions & 15 deletions app/controller/window/source/SourceView.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,31 @@ Ext.define('EdiromOnline.controller.window.source.SourceView', {
if(typeof(debug) !== 'undefined' && debug !== null && debug) {
console.log(data);
}

// if taxonomies array is empty but categories and priorities are
// populated merge those to a taxonomies array
var taxonomies = data['taxonomies'] || [];
if (taxonomies.length === 0) {
var categories = data['categories'] || [];
var priorities = data['priorities'] || [];
if (categories.length > 0) {
taxonomies.push({
id: 'ediromCategory',
label: 'ediromCategory',
items: categories
});
}
if (priorities.length > 0) {
taxonomies.push({
id: 'ediromPriority',
label: 'ediromPriority',
items: priorities
});
}
}

var priorities = Ext.create('Ext.data.Store', {
fields: ['id', 'name'],
data: data['priorities']
});
var categories = Ext.create('Ext.data.Store', {
fields: ['id', 'name'],
data: data['categories']
});

//TODO why not save to object store?

me.annotInfosLoaded(priorities, categories, view);
// hand over returned taxonomies array
me.annotInfosLoaded(taxonomies, view);
}, this)
);

Expand All @@ -134,8 +146,9 @@ Ext.define('EdiromOnline.controller.window.source.SourceView', {
view.setMovements(movements);
},

annotInfosLoaded: function(priorities, categories, view) {
view.setAnnotationFilter(priorities, categories);
annotInfosLoaded: function(taxonomies, view) {
// delegate taxonomies array handling to the view
view.setAnnotationFilter(taxonomies);
},

overlaysLoaded: function(overlays, view) {
Expand Down Expand Up @@ -237,7 +250,7 @@ Ext.define('EdiromOnline.controller.window.source.SourceView', {
var data = response.responseText;

var annotations = Ext.create('Ext.data.Store', {
fields: ['id', 'title', 'text', 'uri', 'plist', 'svgList', 'priority', 'categories', 'fn'],
fields: ['id', 'title', 'text', 'uri', 'plist', 'svgList', 'priority', 'categories', 'taxonomyClasses', 'fn'],
data: Ext.JSON.decode(data)
});

Expand Down
39 changes: 26 additions & 13 deletions app/controller/window/text/TextFacsimileSplitView.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,29 @@ Ext.define('EdiromOnline.controller.window.text.TextFacsimileSplitView', {

data = Ext.JSON.decode(data);

var priorities = Ext.create('Ext.data.Store', {
fields: ['id', 'name'],
data: data['priorities']
});
var categories = Ext.create('Ext.data.Store', {
fields: ['id', 'name'],
data: data['categories']
});

me.annotInfosLoaded(priorities, categories, view);
// if taxonomies array is empty but categories and priorities are
// populated merge those to a taxonomies array
var taxonomies = data['taxonomies'] || [];
if (taxonomies.length === 0) {
var categories = data['categories'] || [];
var priorities = data['priorities'] || [];
if (categories.length > 0) {
taxonomies.push({
id: 'ediromCategory',
label: 'ediromCategory',
items: categories
});
}
if (priorities.length > 0) {
taxonomies.push({
id: 'ediromPriority',
label: 'ediromPriority',
items: priorities
});
}
}

me.annotInfosLoaded(taxonomies, view);
}, this)
);
},
Expand All @@ -138,8 +151,8 @@ Ext.define('EdiromOnline.controller.window.text.TextFacsimileSplitView', {
view.setChapters(chapters);
},

annotInfosLoaded: function(priorities, categories, view) {
view.setAnnotationFilter(priorities, categories);
annotInfosLoaded: function(taxonomies, view) {
view.setAnnotationFilter(taxonomies);
},

onAnnotationsVisibilityChange: function(view, visible) {
Expand All @@ -156,7 +169,7 @@ Ext.define('EdiromOnline.controller.window.text.TextFacsimileSplitView', {
var data = response.responseText;

var annotations = Ext.create('Ext.data.Store', {
fields: ['id', 'title', 'text', 'uri', 'plist', 'svgList', 'priority', 'categories', 'fn'],
fields: ['id', 'title', 'text', 'uri', 'plist', 'svgList', 'priority', 'categories', 'taxonomyClasses', 'fn'],
data: Ext.JSON.decode(data)
});

Expand Down
45 changes: 29 additions & 16 deletions app/controller/window/text/TextView.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ Ext.define('EdiromOnline.controller.window.text.TextView', {

var uri = view.uri;

window.doAJAXRequest('data/xql/getText.xql',
// request goes to v2 API - relative to backendURI
window.doAJAXRequest('api/document',
'GET',
{
uri: uri,
resource: uri,
idPrefix: view.id + '_',
term: view.window.term,
path: view.window.path
mediaType: 'text/html'
},
Ext.bind(function(response){
this.contentLoaded(view, response.responseText);
Expand Down Expand Up @@ -98,16 +98,29 @@ Ext.define('EdiromOnline.controller.window.text.TextView', {

data = Ext.JSON.decode(data);

var priorities = Ext.create('Ext.data.Store', {
fields: ['id', 'name'],
data: data['priorities']
});
var categories = Ext.create('Ext.data.Store', {
fields: ['id', 'name'],
data: data['categories']
});

me.annotInfosLoaded(priorities, categories, view);
// if taxonomies array is empty but categories and priorities are
// populated merge those to a taxonomies array
var taxonomies = data['taxonomies'] || [];
if (taxonomies.length === 0) {
var categories = data['categories'] || [];
var priorities = data['priorities'] || [];
if (categories.length > 0) {
taxonomies.push({
id: 'ediromCategory',
label: 'ediromCategory',
items: categories
});
}
if (priorities.length > 0) {
taxonomies.push({
id: 'ediromPriority',
label: 'ediromPriority',
items: priorities
});
}
}

me.annotInfosLoaded(taxonomies, view);
}, this)
);
},
Expand Down Expand Up @@ -144,8 +157,8 @@ Ext.define('EdiromOnline.controller.window.text.TextView', {
view.showAnnotations(annotations);
},

annotInfosLoaded: function(priorities, categories, view) {
view.setAnnotationFilter(priorities, categories);
annotInfosLoaded: function(taxonomies, view) {
view.setAnnotationFilter(taxonomies);
},

onGotoChapter: function(view, chapter) {
Expand Down
53 changes: 0 additions & 53 deletions app/model/Annotation.js

This file was deleted.

26 changes: 23 additions & 3 deletions app/view/window/AnnotationView.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,26 +295,46 @@ Ext.define('EdiromOnline.view.window.AnnotationView', {
dataIndex: 'title',
flex: 4,
filter: true
},
{
header: getLangString('ediromPriority') + ' (legacy)',
dataIndex: 'priority',
flex: 1,
filter: true
},
{
header: getLangString('ediromCategory') + ' (legacy)',
dataIndex: 'categories',
flex: 2,
filter: true
}

];

// save existing dataIndex entries as column names
const existingColumnNames = columns.map(column =>
column.dataIndex);

// Legacy fields declared by the backend — skip them in favour of taxonomy map entries
// when the annotation_hide_legacy_fields preference is true (default).
// Falls back to [] for older backends that don't send this key, or when pref is false.
const hideLegacyFields = getPreference('annotation_hide_legacy_fields', true) === 'true';
const legacyFields = hideLegacyFields && me.data && me.data.legacyFields ? me.data.legacyFields : [];

//iterate over storeFields to create missing grid columns
storeFields.forEach(field => {
if (legacyFields.includes(typeof field === 'string' ? field : field.name)) return;
if (!existingColumnNames.includes(typeof field === 'string' ? field : field.name)) {
// if existingColumnNames does not include the value of field or field.name
// create fieldObject
const fieldName = typeof field === 'string' ? field : field.name;
const fieldObject = {
header: getLangString('view.window.AnnotationView_' + fieldName),
header: getLangString(fieldName),
dataIndex: fieldName,
renderer: me.createFieldRenderer(fieldName),
flex: 1,
flex: 1, //TODO evaluate filed content length to set more appropriate flex value
filter: true,
hidden: emptyFields ? emptyFields.includes(field) : false
hidden: emptyFields ? emptyFields.includes(fieldName) : false
};
// push fieldObject to columns array
columns.push(fieldObject);
Expand Down
Loading