Fixed API/globalvar bug for ajax data retrieval
diff --git a/dev/js/src/api.js b/dev/js/src/api.js
index f9058bc..82f1062 100644
--- a/dev/js/src/api.js
+++ b/dev/js/src/api.js
@@ -11,7 +11,6 @@
KorAP.API = {
getMatchInfo : function (match, param, cb) {
// match is a KorAP.Match object
-
var url = KorAP.URL;
url += '/corpus';
url += '/' + match.corpusID;
diff --git a/dev/js/src/util.js b/dev/js/src/util.js
index f3df4fc..98d3ddb 100644
--- a/dev/js/src/util.js
+++ b/dev/js/src/util.js
@@ -1,4 +1,4 @@
-var KorAP = KorAP || {};
+window.KorAP = window.KorAP || {};
// TODO: Make this part of util!
// Don't let events bubble up
diff --git a/lib/Kalamar.pm b/lib/Kalamar.pm
index f465802..d05257e 100644
--- a/lib/Kalamar.pm
+++ b/lib/Kalamar.pm
@@ -17,9 +17,11 @@
push(@{$self->plugins->namespaces}, __PACKAGE__ . '::Plugin');
# Set secrets for signed cookies
- $self->secrets([
- b($self->home . '/kalamar.secret')->slurp->split("\n")
- ]);
+ if (-e (my $secret = $self->home . '/kalamar.secret')) {
+ $self->secrets([
+ b($secret)->slurp->split("\n")
+ ]);
+ };
# Load plugins
foreach (
diff --git a/templates/partial/header.html.ep b/templates/partial/header.html.ep
index 2bd2c12..a994af1 100644
--- a/templates/partial/header.html.ep
+++ b/templates/partial/header.html.ep
@@ -2,13 +2,13 @@
<a href="/"
class="logo"
title="<%= title %>"><h1><span><%= title %></span></h1></a>
-<!--
<div class="button top">
+<!--
<a href="#"
class="login"
title="<%= loc 'login' %>"><span><%= loc 'login' %></span></a>
- </div>
-->
+ </div>
<form autocomplete="off" action="<%= url_for 'index' %>">
<div id="searchbar">
%= search_field 'q', id => 'q-field', autofocus => 'autofocus', placeholder => loc('searchplaceholder')