Added new notification engine
diff --git a/dev/demo/all.html b/dev/demo/all.html
index d2fd6ce..70457e7 100644
--- a/dev/demo/all.html
+++ b/dev/demo/all.html
@@ -148,5 +148,11 @@
var KorAP = KorAP || {};
KorAP.URL = 'http://localhost:3000';
</script>
+ <script>//<![CDATA[
+KorAP.Notifications = [];
+KorAP.Notifications.push(["warn","767: Case insensitivity is currently not supported for this layer"]);
+KorAP.Notifications.push(["error","404: Not Found (remote)"]);
+//]]>
+ </script>
</body>
</html>
diff --git a/dev/js/src/init.js b/dev/js/src/init.js
index 7c403aa..a414020 100644
--- a/dev/js/src/init.js
+++ b/dev/js/src/init.js
@@ -23,14 +23,14 @@
// Override KorAP.log
window.alertify = alertifyClass;
- KorAP.log = function (type, msg) {
+ KorAP.log = function (code, msg) {
// Use alertify to log errors
alertifyClass.log(
- (type === 0 ? '' : type + ': ') +
+ (code === 0 ? '' : code + ': ') +
msg,
'error',
- 5000
+ 10000
);
};
@@ -38,6 +38,16 @@
var obj = {};
/**
+ * Release notifications
+ */
+ if (KorAP.Notifications !== undefined) {
+ var n = KorAP.Notifications;
+ for (var i = 0; i < n.length; i++) {
+ alertifyClass.log(n[i][1], n[i][0], 10000);
+ };
+ };
+
+ /**
* Replace Virtual Collection field
*/
var vcname;