Commit de383008 authored by Curtis Adam's avatar Curtis Adam

Activate a 4th difficulty option and enable difficulties for the card type "cube"

parent 72c78e5b
......@@ -291,6 +291,7 @@ $themes: (
$no_results_text: map-get($map, "no_results_text");
//difficulty colors
$button_difficulty0_note: map-get($map, "button_difficulty0_note");
$button_difficulty0: map-get($map, "button_difficulty0");
$button_difficulty1: map-get($map, "button_difficulty1");
$button_difficulty2: map-get($map, "button_difficulty2");
$button_difficulty3: map-get($map, "button_difficulty3");
......@@ -2697,6 +2698,15 @@ $themes: (
background-color: $button_difficulty0_note !important;
}
#setDifficulty .btn-white {
color: $button_difficulty0 !important;
}
#setDifficulty .btn-white.active, .label-difficulty0 {
color: $white !important;
background-color: $button_difficulty0 !important;
}
#setDifficulty .btn-info {
color: $button_difficulty1 !important;
}
......
......@@ -334,6 +334,7 @@
"no_results_text": $thm_gray,
//difficulty colors
"button_difficulty0_note": darkorange,
"button_difficulty0": darkorange,
"button_difficulty1": green,
"button_difficulty2": blue,
"button_difficulty3": red,
......
......@@ -463,14 +463,13 @@ export let CardVisuals = class CardVisuals {
return box + 'difficultyBlank0';
}
}
if (difficulty === 0 && !CardType.gotNotesForDifficultyLevel(cardType)) {
difficulty = 1;
}
if (backgroundStyle === 0) {
switch (difficulty) {
case 0:
if (CardType.gotNotesForDifficultyLevel(cardType)) {
return box + 'difficultyLinedNote0';
} else {
return box + 'difficultyLined0';
}
break;
case 1:
......@@ -487,6 +486,8 @@ export let CardVisuals = class CardVisuals {
case 0:
if (CardType.gotNotesForDifficultyLevel(cardType)) {
return box + 'difficultyBlankNote0';
} else {
return box + 'difficultyBlank0';
}
break;
case 1:
......
......@@ -18,7 +18,7 @@
//17: Inverses Fragen
//18: Cube
let cardTypesWithDictionary = [1];
let cardTypesWithDifficultyLevel = [0, 1, 3, 5, 6, 7, 11, 12, 13, 15, 17];
let cardTypesWithDifficultyLevel = [0, 1, 3, 5, 6, 7, 11, 12, 13, 15, 17, 18];
let cardTypesWithLearningModes = [0, 1, 3, 4, 5, 6, 11, 12, 13, 15, 16, 17];
let cardTypesWithLearningGoal = [0, 5, 12];
let cardTypesWithLearningUnit = [];
......@@ -362,27 +362,27 @@ let cardTypeCubeSides = [
[
{
"contentId": 1,
"defaultStyle": "white"
"defaultStyle": "default"
},
{
"contentId": 2,
"defaultStyle": "white"
"defaultStyle": "default"
},
{
"contentId": 3,
"defaultStyle": "white"
"defaultStyle": "default"
},
{
"contentId": 4,
"defaultStyle": "white"
"defaultStyle": "default"
},
{
"contentId": 5,
"defaultStyle": "white"
"defaultStyle": "default"
},
{
"contentId": 6,
"defaultStyle": "white"
"defaultStyle": "default"
}
]
];
......
......@@ -891,13 +891,12 @@ Template.registerHelper("getCardsetBackground", function (difficulty, cardType)
if (!CardType.gotDifficultyLevel(cardType)) {
return 'box-difficultyBlank0';
}
if (difficulty === 0 && !CardType.gotNotesForDifficultyLevel(cardType)) {
difficulty = 1;
}
switch (difficulty) {
case 0:
if (CardType.gotNotesForDifficultyLevel(cardType)) {
return 'box-difficultyBlankNote0';
} else {
return 'box-difficultyBlank0';
}
break;
case 1:
......
......@@ -197,7 +197,6 @@
<template name="difficultyEditor">
<div id="difficultyGroup" class="form-group btn-group" role="group" data-toggle="buttons">
{{#if gotNotesForDifficultyLevel}}
<span class="col-xs-6 col-sm-3 btn-bootstrap-container">
<label id="difficulty0"
class="btn btn-block btn-default btn-raised {{#if
......@@ -217,9 +216,8 @@
{{/unless}}
</span>
</label>
</span>
{{/if}}
<span class="col-xs-6 {{#if gotNotesForDifficultyLevel}}col-sm-3{{else}}col-sm-4{{/if}} btn-bootstrap-container">
</span>
<span class="col-xs-6 col-sm-3 btn-bootstrap-container">
<label id="difficulty1"
class="btn btn-default btn-block btn-info btn-raised {{#if
isDifficultyChecked 1}}active{{/if}}"
......@@ -238,7 +236,7 @@
</span>
</label>
</span>
<span class="col-xs-6 {{#if gotNotesForDifficultyLevel}}col-sm-3{{else}}col-sm-4{{/if}} btn-bootstrap-container">
<span class="col-xs-6 col-sm-3 btn-bootstrap-container">
<label id="difficulty2"
class="btn btn-default btn-block btn-success btn-raised {{#if
isDifficultyChecked 2}}active{{/if}}"
......@@ -257,7 +255,7 @@
</span>
</label>
</span>
<span class="col-xs-6 {{#if gotNotesForDifficultyLevel}}col-sm-3{{else}}col-sm-4{{/if}} btn-bootstrap-container">
<span class="col-xs-6 col-sm-3 btn-bootstrap-container">
<label id="difficulty3"
class="btn btn-default btn-block btn-danger btn-raised {{#if
isDifficultyChecked 3}}active{{/if}}"
......
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