Merge "function to add statistic button" into corpStat
diff --git a/.gitignore b/.gitignore
index aa3cfbb..3f541a0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,6 +18,7 @@
dev/css
templates/announcement.html.ep
templates/custom
+lib/Kalamar/Plugin/Announcements.pm
log
blib
script*
diff --git a/Changes b/Changes
index f8eedfd..fadb543 100755
--- a/Changes
+++ b/Changes
@@ -1,7 +1,8 @@
-0.27 2018-05-23
+0.27 2018-06-18
- Introduced content blocks to create
flexible entry lists in the footer
- Add marker for "cutted" matches.
+ - Re-enabled Windows installations.
0.26 2018-04-06
- Added meta data view.
diff --git a/Makefile.PL b/Makefile.PL
index 22f10c6..18cf7a4 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -4,10 +4,6 @@
use ExtUtils::MakeMaker;
-if ($^O =~ /^(MSWin32|cygwin|msys)$/i) {
- die "No support for Windows.\n";
-};
-
WriteMakefile(
VERSION_FROM => 'lib/Kalamar.pm',
ABSTRACT => 'Mojolicious-based Frontend for KorAP',
@@ -18,7 +14,7 @@
},
LICENSE => 'freebsd',
PREREQ_PM => {
- 'Mojolicious' => '7.66',
+ 'Mojolicious' => '7.78',
'Mojolicious::Plugin::TagHelpers::Pagination' => 0.06,
'Mojolicious::Plugin::TagHelpers::MailToChiffre' => 0.09,
'Mojolicious::Plugin::ClosedRedirect' => 0.13,
@@ -32,7 +28,7 @@
# Currently on GitHub only (github.com/akron)
'Mojolicious::Plugin::Search' => 0.07,
- 'Mojolicious::Plugin::Localize' => 0.17,
+ 'Mojolicious::Plugin::Localize' => 0.18,
'Mojolicious::Plugin::TagHelpers::ContentBlock' => 0.08,
},
test => {
diff --git a/README.md b/README.md
index 479f12c..7e22507 100644
--- a/README.md
+++ b/README.md
@@ -88,16 +88,16 @@
(see [Kustvakt](https://github.com/KorAP/Kustvakt) for further information).
-### Configuration
+## Configuration
The basic configuration file is ```kalamar.conf```. To define derivations,
create a configuration file with the pattern ```kalamar.[MYNAME].conf``` and
follow the descriptions in ```kalamar.conf```.
For client-side configurations, a file ```kalamar.conf.js``` can be
introduced, that will be consulted during the build process, loading
-optional components using a ```require(...)``` directive.
+optional components using a ```require(...)``` directive (see example below).
-### Localization and Customization
+### Localization
To create a localized version of Kalamar, start the ```localize``` command
with the target locale as its argument, e.g. ```pl``` for polish.
@@ -109,7 +109,7 @@
The newly defined dictionary file can then be modified and added to the resources
definition of the ```Localize``` plugin in the configuration:
-```
+```perl
Localize => {
resources => ['kalamar.pl.dict']
}
@@ -118,7 +118,7 @@
To localize example queries according to a special corpus environment,
define a name of the example corpus in the configuration.
-```
+```perl
Kalamar => {
examplecorpus => 'mycorpus'
}
@@ -130,8 +130,6 @@
Templates can be localized and customized by overriding
the ```Template``` dictionary entries.
-This is especially useful for the landing page in
-```Template_intro```.
Currently the JavaScript translations are separated and stored in ```dev/js/src/loc```.
To generate assets relying on different locales, add the locale to ```Gruntfile.js```.
@@ -141,7 +139,7 @@
For example to support ```marmot``` and ```malt```,
the configuration may look like this:
-```
+```js
require([
"hint/foundries/marmot",
"hint/foundries/malt"
@@ -151,6 +149,17 @@
See ```dev/js/src/hint/foundries``` for
more optional foundries.
+### Customization
+
+The landing page can be customized by overriding the
+entry for ```Template_intro``` in the dictionary.
+
+Some sections of the user interface can be customized
+by adding new
+[content blocks](https://github.com/Akron/Mojolicious-Plugin-TagHelpers-ContentBlock).
+Currently the sections are in ```footer```, in the bottom line of the user interface,
+and ```loginInfo```, below the login form, if present.
+
## COPYRIGHT AND LICENSE
### Bundled Software
@@ -189,7 +198,7 @@
Corpus Analysis Platform at the
[Institute for the German Language (IDS)](http://ids-mannheim.de/),
member of the
-[Leibniz-Gemeinschaft](http://www.leibniz-gemeinschaft.de/en/about-us/leibniz-competition/projekte-2011/2011-funding-line-2/)
+[Leibniz Association](https://www.leibniz-gemeinschaft.de/en/home/)
and supported by the [KobRA](http://www.kobra.tu-dortmund.de) project,
funded by the
[Federal Ministry of Education and Research (BMBF)](http://www.bmbf.de/en/).
diff --git a/dev/js/spec/hintSpec.js b/dev/js/spec/hintSpec.js
index fe96f79..426bb96 100644
--- a/dev/js/spec/hintSpec.js
+++ b/dev/js/spec/hintSpec.js
@@ -343,6 +343,21 @@
hint.show(true);
expect(hint.active()).toBeFalsy();
});
+
+
+ it('should show the assistant bar on blur', function () {
+ var hint = hintClass.create({
+ inputField : input
+ });
+ // Fine
+ hint.inputField().insert('der Baum corenlp/');
+ hint.show(true);
+ expect(hint.active()).toBeTruthy();
+
+ // Blur
+ hint.active().hideWithoutDestruction();
+ expect(hint.active()).toBeFalsy();
+ });
xit('should remove all menus on escape');
});
diff --git a/dev/js/src/hint/menu.js b/dev/js/src/hint/menu.js
index c5c7cc7..a7bdf57 100644
--- a/dev/js/src/hint/menu.js
+++ b/dev/js/src/hint/menu.js
@@ -55,6 +55,7 @@
this.element().classList.remove("visible");
if (this._hint) {
this._hint.inputField().element().focus();
+ this.onHide();
};
}
};