Commit 29de55ef authored by Curtis Adam's avatar Curtis Adam

Add a button to remove the current help filter

parent 49a09746
......@@ -61,6 +61,9 @@
"datenschutz": "Datenschutz",
"agb": "AGB"
},
"help": {
"resetFilter": "Zeige alle Einträge"
},
"notifications": {
"title": "Nachrichten",
"clearAll": "Leeren",
......
......@@ -69,6 +69,9 @@
"datenschutz": "Privacy",
"agb": "GTC"
},
"help": {
"resetFilter": ""
},
"notifications": {
"title": "Notifications",
"clearAll": "Clear all",
......
This diff is collapsed.
......@@ -4,6 +4,11 @@
<h1>Falls sich die App nicht von selbst erklärt</h1>
</div>
<div class="panel-body info-tab">
{{#if isHelpFilterActive}}
<button id="resethelpFilter" class="btn btn-raised btn-info">
{{_ "help.resetFilter"}}
</button>
{{/if}}
{{#if displayHelpCategory "start"}}
{{> helpStart}}
{{/if}}
......
......@@ -25,7 +25,16 @@ import "./help.html";
*/
Template.help.helpers({
isHelpFilterActive: function () {
return Session.get('helpFilter') !== undefined;
},
displayHelpCategory: function (category) {
return Session.get('helpTarget') === undefined || Session.get('helpTarget') === category;
return Session.get('helpFilter') === undefined || Session.get('helpFilter') === category;
}
});
Template.help.events({
'click #resethelpFilter': function () {
Session.set('helpFilter', undefined);
}
});
......@@ -39,7 +39,7 @@ Session.setDefault("fullscreen", false);
Session.setDefault("previousRouteName", undefined);
Session.setDefault("connectionStatus", 2);
Session.setDefault("selectingCardsetToLearn", false);
Session.setDefault('helpTarget', undefined);
Session.setDefault('helpFilter', undefined);
Session.setDefault('currentZoomValue', CardVisuals.getDefaultTextZoomValue());
......@@ -94,6 +94,7 @@ Template.main.events({
'click .logout': function (event) {
event.preventDefault();
Meteor.logout();
Session.set('helpFilter', undefined);
},
'keyup #input-search': function (event) {
event.preventDefault();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment