diff --git a/control/content/index.html b/control/content/index.html index 4d5e244..f6d95f9 100755 --- a/control/content/index.html +++ b/control/content/index.html @@ -59,6 +59,41 @@ + +
+ Feature Title +
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
Topic Privacy
@@ -362,6 +397,11 @@ pluginInstanceName.innerHTML = 'Social Wall' queryStringContainer.style.display = "none" } + if (config.featureTitle === Config.TITLE.DEFAULT) { + defaultTitle.checked = true; + } else { + topicTitle.checked = true; + } if (config.privacy === Config.PRIVACY.PUBLIC) { publicPrivacy.checked = true; writeAccessContainer.style.display = "grid"; @@ -496,6 +536,16 @@ config.save(); } + function onSelectTitle(title) { + if (title === 'default') { + config.featureTitle = Config.TITLE.DEFAULT; + } + else if (title === 'topic') { + config.featureTitle = Config.TITLE.TOPIC; + } + config.save(); + } + function onSelectWritePrivacy() { setBothPrivacyElements(); config.save(); diff --git a/control/content/js/classes/config.js b/control/content/js/classes/config.js index e02fb69..533f192 100644 --- a/control/content/js/classes/config.js +++ b/control/content/js/classes/config.js @@ -11,6 +11,7 @@ class Config { this.emptyStateMessage = dataObj.emptyStateMessage ||'Create your first group now!'; this.navigateToCwByDefault = dataObj.navigateToCwByDefault || false; this.sortBy = dataObj.sortBy || 'default'; + this.featureTitle = dataObj.featureTitle || 'default'; } static get PRIVACY() { @@ -21,6 +22,13 @@ class Config { } } + static get TITLE() { + return { + DEFAULT: 'default', + TOPIC: 'topic', + } + } + static get WRITE_PRIVACY() { return { PUBLIC: 'public', diff --git a/widget/app.js b/widget/app.js index c7f3853..cb02d8b 100644 --- a/widget/app.js +++ b/widget/app.js @@ -28,6 +28,9 @@ function init() { .then(result => { buildfire.spinner.hide(); config = result.data; + if(!config.featureTitle) { + config.featureTitle = 'default'; + } getStrings(); if (config.privacy === Helper.PRIVACY.PRIVATE && !loggedUser) { enforceUserLogin(); @@ -802,6 +805,9 @@ function navigateTo(topic) { } else { if (topic.originalShareId) pluginData.queryString = 'wid=' + topic.originalShareId + '&privacy=' + topic.privacy; else pluginData.queryString = queryString + '&privacy=' + topic.privacy; + if(config.featureTitle === 'topic') { + pluginData.title = topic.title; + } buildfire.navigation.navigateTo(pluginData); } }