Commit 1395f6c2 authored by Klaus-Dieter Quibeldey-Cirkel's avatar Klaus-Dieter Quibeldey-Cirkel 🏀

Merge branch...

Merge branch '1358-offer-an-info-border-button-on-the-right-side-below-the-enlargement-icon-in-presentation-and-learning-mode' into 'staging'

Resolve "Offer an info border button on the right side below the enlargement icon in presentation and learning mode"

Closes #1358

See merge request arsnova/flashcards!1608
parents aa0baccb 79fb78ba
......@@ -1177,6 +1177,7 @@
"zoomText": "Ändere die Schriftgröße der Karte",
"zoomTextReset": "Zurücksetzen",
"pomodoro": "Wechsel zwischen Minutensprunguhr | Pomodoro-Timer",
"showHelp": "Hilfe",
"markdeepEditor": {
"help": "Zeige alle Formatierungsoptionen von Markdeep",
"center": "Zentriere den Karteninhalt vertikal",
......
......@@ -1176,6 +1176,7 @@
"zoomText": "",
"zoomTextReset": "Zurücksetzen",
"pomodoro": "",
"showHelp": "Help",
"markdeepEditor": {
"help": "",
"center": " ",
......
<template name="cardSidebarItemHelp">
<i class="card-button cardHeaderItem fa fa-question showModalHelp {{#if modalActive}}pressed{{/if}}" title="{{_ "card.tooltip.showHelp"}}"></i>
</template>
import "./help.html";
import {Route} from "../../../../api/route";
import {Session} from "meteor/session";
/*
* ############################################################################
* cardSidebarItemHelp
* ############################################################################
*/
Template.cardSidebarItemHelp.events({
"click .showModalHelp": function () {
if (Route.isPresentation()) {
$('#presentationHelpModal').modal('show');
} else if (Route.isBox()) {
$('#leitnerHelpModal').modal('show');
} else if (Route.isMemo()) {
$('#wozniakHelpModal').modal('show');
}
}
});
Template.cardSidebarItemHelp.helpers({
modalActive: function () {
return Session.get('helpModalActive');
}
});
......@@ -101,6 +101,7 @@
{{/if}}
{{> cardSidebarItemEndPresentation}}
{{> cardSidebarItemZoomText}}
{{> cardSidebarItemHelp}}
</template>
<template name="flashcardSidebarDemoLeft">
......@@ -142,6 +143,7 @@
<template name="flashcardSidebarLeitnerRight">
{{> cardSidebarItemBackToCardset}}
{{> cardSidebarItemZoomText}}
{{> cardSidebarItemHelp}}
</template>
<template name="flashcardSidebarWozniakLeft">
......@@ -151,4 +153,5 @@
<template name="flashcardSidebarWozniakRight">
{{> cardSidebarItemBackToCardset}}
{{> cardSidebarItemZoomText}}
{{> cardSidebarItemHelp}}
</template>
......@@ -15,6 +15,7 @@ import "./item/copy.js";
import "./item/delete.js";
import "./item/edit.js";
import "./item/pomodoroButton.js";
import "./item/help.js";
import {CardNavigation} from "../../../api/cardNavigation";
......
......@@ -2,6 +2,7 @@ import "./leitnerHelp.html";
import "./content/english.html";
import "./content/german.html";
import {Template} from "meteor/templating";
import {Session} from "meteor/session";
let firstTimeLeitner = 'isFirstTimeLeitner';
/*
......@@ -11,6 +12,12 @@ let firstTimeLeitner = 'isFirstTimeLeitner';
*/
Template.leitnerHelpModal.onRendered(function () {
$('#leitnerHelpModal').on('show.bs.modal', function () {
Session.set('helpModalActive', true);
});
$('#leitnerHelpModal').on('hidden.bs.modal', function () {
Session.set('helpModalActive', false);
});
if (localStorage.getItem(firstTimeLeitner) !== "true") {
$('#leitnerHelpModal').modal('show');
}
......@@ -19,6 +26,7 @@ Template.leitnerHelpModal.onRendered(function () {
Template.leitnerHelpModal.onDestroyed(function () {
$('body').removeClass('modal-open');
$('.modal-backdrop').remove();
Session.set('helpModalActive', false);
});
......
......@@ -2,6 +2,7 @@ import "./wozniakHelp.html";
import "./content/english.html";
import "./content/german.html";
import {Template} from "meteor/templating";
import {Session} from "meteor/session";
let firstTimeWozniak = 'isFirstTimeWozniak';
/*
......@@ -11,6 +12,12 @@ let firstTimeWozniak = 'isFirstTimeWozniak';
*/
Template.wozniakHelpModal.onRendered(function () {
$('#wozniakHelpModal').on('show.bs.modal', function () {
Session.set('helpModalActive', true);
});
$('#wozniakHelpModal').on('hidden.bs.modal', function () {
Session.set('helpModalActive', false);
});
if (localStorage.getItem(firstTimeWozniak) !== "true") {
$('#wozniakHelpModal').modal('show');
}
......@@ -19,6 +26,7 @@ Template.wozniakHelpModal.onRendered(function () {
Template.wozniakHelpModal.onDestroyed(function () {
$('body').removeClass('modal-open');
$('.modal-backdrop').remove();
Session.set('helpModalActive', false);
});
......
......@@ -2,6 +2,7 @@ import "./presentationHelp.html";
import "./content/english.html";
import "./content/german.html";
import {Template} from "meteor/templating";
import {Session} from "meteor/session";
let firstTimePresentation = 'isFirstTimePresentation';
/*
......@@ -11,6 +12,12 @@ let firstTimePresentation = 'isFirstTimePresentation';
*/
Template.presentationHelpModal.onRendered(function () {
$('#presentationHelpModal').on('show.bs.modal', function () {
Session.set('helpModalActive', true);
});
$('#presentationHelpModal').on('hidden.bs.modal', function () {
Session.set('helpModalActive', false);
});
if (localStorage.getItem(firstTimePresentation) !== "true") {
$('#presentationHelpModal').modal('show');
}
......@@ -19,6 +26,7 @@ Template.presentationHelpModal.onRendered(function () {
Template.presentationHelpModal.onDestroyed(function () {
$('body').removeClass('modal-open');
$('.modal-backdrop').remove();
Session.set('helpModalActive', false);
});
......
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