From f0cb711c8edbcbcccaa9584b3212f99e8d014b79 Mon Sep 17 00:00:00 2001 From: Curtis Adam Date: Wed, 27 Jun 2018 15:58:05 +0200 Subject: [PATCH] Use the settings files to load the welcome page title --- imports/ui/main/main.js | 4 ++++ imports/ui/welcome/welcome.html | 4 ++-- imports/ui/welcome/welcome.js | 6 ++++++ settings.json | 6 ++++++ settings_debug.json | 6 ++++++ settings_review.json | 6 ++++++ 6 files changed, 30 insertions(+), 2 deletions(-) diff --git a/imports/ui/main/main.js b/imports/ui/main/main.js index f764d260..311b9c20 100644 --- a/imports/ui/main/main.js +++ b/imports/ui/main/main.js @@ -243,6 +243,10 @@ Template.main.helpers({ } }); +Template.main.onCreated(function () { + document.title = Meteor.settings.public.welcome.title.first + "." + Meteor.settings.public.welcome.title.last; +}); + Template.main.onRendered(function () { Session.set("searchValue", undefined); Meteor.call("initUser"); diff --git a/imports/ui/welcome/welcome.html b/imports/ui/welcome/welcome.html index 1bb65bdf..b878a48d 100644 --- a/imports/ui/welcome/welcome.html +++ b/imports/ui/welcome/welcome.html @@ -4,9 +4,9 @@
- informatik + {{getFirstTitleWord}} - cards + {{getLastTitleWord}}
diff --git a/imports/ui/welcome/welcome.js b/imports/ui/welcome/welcome.js index ad75a400..135020dd 100644 --- a/imports/ui/welcome/welcome.js +++ b/imports/ui/welcome/welcome.js @@ -199,6 +199,12 @@ Template.welcome.helpers({ } loginButtons += ""; return loginButtons; + }, + getFirstTitleWord: function () { + return Meteor.settings.public.welcome.title.first; + }, + getLastTitleWord: function () { + return Meteor.settings.public.welcome.title.last; } }); diff --git a/settings.json b/settings.json index df377112..24e5dfb2 100644 --- a/settings.json +++ b/settings.json @@ -20,6 +20,12 @@ "singleUniversity": true, "default": "THM" }, + "welcome": { + "title": { + "first": "informatik", + "last": "cards" + } + }, "env": "Sandbox", "BT_MERCHANT_ID": "7jspbjz7zk4vkh67", "BT_PUBLIC_KEY": "bf7p9crbdv2359gv" diff --git a/settings_debug.json b/settings_debug.json index 14e4a0ba..8e021904 100644 --- a/settings_debug.json +++ b/settings_debug.json @@ -21,6 +21,12 @@ "singleUniversity": false, "default": "THM" }, + "welcome": { + "title": { + "first": "debug", + "last": "cards" + } + }, "env": "Sandbox", "BT_MERCHANT_ID": "7jspbjz7zk4vkh67", "BT_PUBLIC_KEY": "bf7p9crbdv2359gv" diff --git a/settings_review.json b/settings_review.json index 4c56b447..4b461f4b 100644 --- a/settings_review.json +++ b/settings_review.json @@ -21,6 +21,12 @@ "singleUniversity": false, "default": "THM" }, + "welcome": { + "title": { + "first": "review", + "last": "cards" + } + }, "env": "Sandbox", "BT_MERCHANT_ID": "7jspbjz7zk4vkh67", "BT_PUBLIC_KEY": "bf7p9crbdv2359gv" -- GitLab