Finished meta data endpoint support and dump version number
Change-Id: I3b2fd0485a36978125b7d8f0353bfc651f501a5a
diff --git a/Changes b/Changes
index cd6a742..af33ec2 100755
--- a/Changes
+++ b/Changes
@@ -1,3 +1,12 @@
+0.26 2018-02-12
+ - Added meta data view.
+ - Attach reference line to match bottom.
+ - Separate match views and integrate relation menu
+ into reference line.
+ - Attach querycreator object to annotation table.
+ - Update client side dependencies
+ - Introduce development mode to client side code.
+
0.25 2018-01-31
- Make annotation helper configurable.
- Support multiple prefixes in menus.
diff --git a/dev/js/src/api.js b/dev/js/src/api.js
index b87eb1f..9d4fd80 100644
--- a/dev/js/src/api.js
+++ b/dev/js/src/api.js
@@ -63,7 +63,8 @@
// doc is a KorAP.Match object
var url = KorAP.URL;
- url += '/' + match.textSigle;
+ url += '/corpus';
+ url += '/' + doc.textSigle;
if (param['fields'] !== undefined) {
url += '?fields='; // TODO!
@@ -102,7 +103,16 @@
*/
if (this.readyState == 4) {
- var json = JSON.parse(this.responseText);
+ var json;
+ try {
+ json = JSON.parse(this.responseText);
+ }
+ catch (e) {
+ KorAP.log(0, e);
+ console.log(e);
+ onload(undefined);
+ return;
+ };
if (json !== null && json["errors"] !== null) {
for (var i in json["errors"]) {
KorAP.log(json["errors"][i][0], json["errors"][i][1] || "Unknown");
diff --git a/dev/js/src/match.js b/dev/js/src/match.js
index e88bf98..605b9e0 100644
--- a/dev/js/src/match.js
+++ b/dev/js/src/match.js
@@ -193,7 +193,6 @@
ops.classList.add('action', 'bottom', 'button-group');
/*
- Temporarily disabled
var meta = ops.addE('span');
meta.addT('Meta');
meta.setAttribute('title', loc.SHOW_META);
diff --git a/dev/js/src/match/info.js b/dev/js/src/match/info.js
index ed8facc..f30287b 100644
--- a/dev/js/src/match/info.js
+++ b/dev/js/src/match/info.js
@@ -151,10 +151,13 @@
* Receive meta data from server.
*/
getMetaData : function (cb) {
+
+ var match = this._match;
+
try {
KorAP.API.getTextInfo(
- this._match, {}, function (textResponse) {
-
+ match, {}, function (textResponse) {
+
if (textResponse === undefined) {
cb(null);
return;
@@ -175,7 +178,7 @@
// Add metainfo to matchview
cb(matchMetaClass.create(
- this._match, fields
+ match, fields
));
}
);
@@ -345,6 +348,10 @@
var that = this;
this.getMetaData(function (meta) {
+
+ if (meta === null)
+ return;
+
// Load data
metaTable.classList.remove('loading');
diff --git a/dev/js/src/match/meta.js b/dev/js/src/match/meta.js
index 05e1f3b..2edae65 100644
--- a/dev/js/src/match/meta.js
+++ b/dev/js/src/match/meta.js
@@ -1,30 +1,5 @@
define(['util'], function () {
- /*
- author, editor title, subTitle textSigle
- in corpusAuthor (corpusEditor), corpusTitle, corpusSubTitle, corpusSigle
- in docAuthor (docEditor), docTitle, docSubTitle, docSigle
- publisher
- reference
- creationDate
- foundries
- keywords
- textClass
- textColumn
- textDomain
- textType
- textTypeArt
- textTypeRef
- language
- license
- pages
- pubDate
- layerInfo
- tokenSource
- biblEditionStatement
- fileEditionStatement
-*/
-
// Localization values
const loc = KorAP.Locale;
loc.METADATA = loc.METADATA || 'Metadata';
diff --git a/dev/scss/main/matchinfo.scss b/dev/scss/main/matchinfo.scss
index 3abe319..ded592d 100644
--- a/dev/scss/main/matchinfo.scss
+++ b/dev/scss/main/matchinfo.scss
@@ -330,7 +330,9 @@
max-height: 6em;
margin-left: $border-size;
white-space: normal;
- overflow: visible;
+ overflow-y: auto;
+ overflow-x: hidden;
+ text-overflow: ellipsis;
}
}
}
diff --git a/lib/Kalamar.pm b/lib/Kalamar.pm
index c99f86f..fbb418f 100644
--- a/lib/Kalamar.pm
+++ b/lib/Kalamar.pm
@@ -6,7 +6,7 @@
use Mojo::Util qw/url_escape/;
# Minor version - may be patched from package.json
-our $VERSION = '0.25';
+our $VERSION = '0.26';
# TODO: Use CSRF!!!
# TODO: The FAQ-Page has a contact form for new questions
diff --git a/package.json b/package.json
index 712819c..6e75732 100755
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "Kalamar",
"description": "Mojolicious-based Frontend for KorAP",
"license" : "BSD-2-Clause",
- "version": "0.25.4",
+ "version": "0.26.1",
"repository" : {
"type": "git",
"url": "https://github.com/KorAP/Kalamar.git"