Commit 64d5b6da authored by Curtis Adam's avatar Curtis Adam

Fix new cardset navigation related bugs

parent 723977b7
......@@ -281,10 +281,15 @@ $themes: (
$cardset_footer_navigation_manage_list_reset_wozniak_background_hover: map-get($map, "cardset_footer_navigation_manage_list_reset_wozniak_background_hover");
$cardset_footer_navigation_manage_list_reset_wozniak_text_hover: map-get($map, "cardset_footer_navigation_manage_list_reset_wozniak_text_hover");
$cardset_footer_navigation_manage_list_start_stop_learning_background: map-get($map, "cardset_footer_navigation_manage_list_start_stop_learning_background");
$cardset_footer_navigation_manage_list_start_stop_learning_text: map-get($map, "cardset_footer_navigation_manage_list_start_stop_learning_text");
$cardset_footer_navigation_manage_list_start_stop_learning_background_hover: map-get($map, "cardset_footer_navigation_manage_list_start_stop_learning_background_hover");
$cardset_footer_navigation_manage_list_start_stop_learning_text_hover: map-get($map, "cardset_footer_navigation_manage_list_start_stop_learning_text_hover");
$cardset_footer_navigation_manage_list_start_learning_background: map-get($map, "cardset_footer_navigation_manage_list_start_learning_background");
$cardset_footer_navigation_manage_list_start_learning_text: map-get($map, "cardset_footer_navigation_manage_list_start_learning_text");
$cardset_footer_navigation_manage_list_start_learning_background_hover: map-get($map, "cardset_footer_navigation_manage_list_start_learning_background_hover");
$cardset_footer_navigation_manage_list_start_learning_text_hover: map-get($map, "cardset_footer_navigation_manage_list_start_learning_text_hover");
$cardset_footer_navigation_manage_list_stop_learning_background: map-get($map, "cardset_footer_navigation_manage_list_stop_learning_background");
$cardset_footer_navigation_manage_list_stop_learning_text: map-get($map, "cardset_footer_navigation_manage_list_stop_learning_text");
$cardset_footer_navigation_manage_list_stop_learning_background_hover: map-get($map, "cardset_footer_navigation_manage_list_stop_learning_background_hover");
$cardset_footer_navigation_manage_list_stop_learning_text_hover: map-get($map, "cardset_footer_navigation_manage_list_stop_learning_text_hover");
$cardset_footer_navigation_manage_list_show_stats_background: map-get($map, "cardset_footer_navigation_manage_list_show_stats_background");
$cardset_footer_navigation_manage_list_show_stats_text: map-get($map, "cardset_footer_navigation_manage_list_show_stats_text");
......@@ -928,14 +933,24 @@ $themes: (
color: $cardset_footer_navigation_manage_list_reset_wozniak_text_hover !important;
}
.startStopLearningList {
background-color: $cardset_footer_navigation_manage_list_start_stop_learning_background !important;
color: $cardset_footer_navigation_manage_list_start_stop_learning_text !important;
.startLearningList {
background-color: $cardset_footer_navigation_manage_list_start_learning_background !important;
color: $cardset_footer_navigation_manage_list_start_learning_text !important;
}
.startLearningList:hover {
background-color: $cardset_footer_navigation_manage_list_start_learning_background_hover !important;
color: $cardset_footer_navigation_manage_list_start_learning_text_hover !important;
}
.stopLearningList {
background-color: $cardset_footer_navigation_manage_list_stop_learning_background !important;
color: $cardset_footer_navigation_manage_list_stop_learning_text !important;
}
.startStopLearningList:hover {
background-color: $cardset_footer_navigation_manage_list_start_stop_learning_background_hover !important;
color: $cardset_footer_navigation_manage_list_start_stop_learning_text_hover !important;
.stopLearningList:hover {
background-color: $cardset_footer_navigation_manage_list_stop_learning_background_hover !important;
color: $cardset_footer_navigation_manage_list_stop_learning_text_hover !important;
}
.showStatsList {
......
......@@ -315,10 +315,14 @@
"cardset_footer_navigation_manage_list_reset_wozniak_text": black,
"cardset_footer_navigation_manage_list_reset_wozniak_background_hover": none,
"cardset_footer_navigation_manage_list_reset_wozniak_text_hover": black,
"cardset_footer_navigation_manage_list_start_stop_learning_background": none,
"cardset_footer_navigation_manage_list_start_stop_learning_text": black,
"cardset_footer_navigation_manage_list_start_stop_learning_background_hover": none,
"cardset_footer_navigation_manage_list_start_stop_learning_text_hover": black,
"cardset_footer_navigation_manage_list_start_learning_background": $thm_green,
"cardset_footer_navigation_manage_list_start_learning_text": white,
"cardset_footer_navigation_manage_list_start_learning_background_hover": $thm_green,
"cardset_footer_navigation_manage_list_start_learning_text_hover": white,
"cardset_footer_navigation_manage_list_stop_learning_background": $thm_orange,
"cardset_footer_navigation_manage_list_stop_learning_text": white,
"cardset_footer_navigation_manage_list_stop_learning_background_hover": $thm_orange,
"cardset_footer_navigation_manage_list_stop_learning_text_hover": white,
"cardset_footer_navigation_manage_list_show_stats_background": none,
"cardset_footer_navigation_manage_list_show_stats_text": black,
"cardset_footer_navigation_manage_list_show_stats_background_hover": none,
......
......@@ -317,10 +317,14 @@
"cardset_footer_navigation_manage_list_reset_wozniak_text": black,
"cardset_footer_navigation_manage_list_reset_wozniak_background_hover": none,
"cardset_footer_navigation_manage_list_reset_wozniak_text_hover": black,
"cardset_footer_navigation_manage_list_start_stop_learning_background": none,
"cardset_footer_navigation_manage_list_start_stop_learning_text": black,
"cardset_footer_navigation_manage_list_start_stop_learning_background_hover": none,
"cardset_footer_navigation_manage_list_start_stop_learning_text_hover": black,
"cardset_footer_navigation_manage_list_start_learning_background": $thm_green,
"cardset_footer_navigation_manage_list_start_learning_text": white,
"cardset_footer_navigation_manage_list_start_learning_background_hover": $thm_green,
"cardset_footer_navigation_manage_list_start_learning_text_hover": white,
"cardset_footer_navigation_manage_list_stop_learning_background": $thm_orange,
"cardset_footer_navigation_manage_list_stop_learning_text": white,
"cardset_footer_navigation_manage_list_stop_learning_background_hover": $thm_orange,
"cardset_footer_navigation_manage_list_stop_learning_text_hover": white,
"cardset_footer_navigation_manage_list_show_stats_background": none,
"cardset_footer_navigation_manage_list_show_stats_text": black,
"cardset_footer_navigation_manage_list_show_stats_background_hover": none,
......
......@@ -60,7 +60,7 @@
{{#if isActiveRoute 'cardsetlistid'}}
<div class="col-xs-12">
<button class="btn btn-raised btn-danger" id="backToCardsetDetailView">
<span class="pull-left"><i class="fa fa-arrow-left"></i> {{_ "cardset.list.back"}}</span>
<span class="pull-left"><i class="fa fa-arrow-left"></i> {{_ "cardset.list.back"}}</span>
</button>
{{> cardsetList}}
</div>
......@@ -359,14 +359,14 @@
</div>
{{/if}}
{{/if}}
<div class="btn-group">
<button type="button" class="btn btn-sm btn-raised learnBtn"
data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<i class="fa fa-graduation-cap"></i> {{_ "learn"}} <span class="caret"></span>
</button>
<ul class="dropdown-menu">
{{#if gotLearningModes}}
{{#if gotLearningModes}}
<div class="btn-group">
<button type="button" class="btn btn-sm btn-raised learnBtn"
data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<i class="fa fa-graduation-cap"></i> {{_ "learn"}} <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li id="learnBox" class="leitnerList" {{disableIfOffline}}>{{_
"learnfile"}}</li>
<li id="learnMemo" class="wozniakList" {{disableIfOffline}}>{{_
......@@ -380,9 +380,9 @@
<li id="leitnerProgress" class="progressList" {{disableIfOffline}}>{{_
"leitnerProgress"}}</li>
{{/if}}
{{/if}}
</ul>
</div>
</ul>
</div>
{{/if}}
{{#if isCardsetOwner _id}}
{{#unless isShuffledCardset _id}}
<div class="btn-group">
......@@ -458,36 +458,34 @@
{{_ "sidebar-nav.manageEditors"}}
</li>
{{/if}}
{{#unless learningActive}}
{{#if learningLeitner}}
<li id="resetLeitner" class="resetLeitnerList"
data-toggle="modal"
data-target="#resetLeitnerModal" {{disableIfOffline}}>{{_
"resetLearnfile"}}</li>
{{/if}}
{{#if learningMemo}}
<li id="resetMemo" class="resetWozniakList"
data-toggle="modal"
data-target="#resetMemoModal" {{disableIfOffline}}>{{_
"resetWozniak"}}</li>
{{/if}}
{{/unless}}
{{#if gotLearningModes}}
{{#unless learningActive}}
{{#if learningLeitner}}
<li id="resetLeitner" class="resetLeitnerList"
data-toggle="modal"
data-target="#resetLeitnerModal" {{disableIfOffline}}>{{_
"resetLearnfile"}}</li>
{{/if}}
{{#if learningMemo}}
<li id="resetMemo" class="resetWozniakList"
data-toggle="modal"
data-target="#resetMemoModal" {{disableIfOffline}}>{{_
"resetWozniak"}}</li>
{{/if}}
{{/unless}}
{{/if}}
{{#if enableIfPublished}}
{{#if gotLearningModes}}
{{#if isCardsetOwner _id}}
{{#if isInRole 'lecturer'}}
<li id="startStopLearning"
class="startStopLearn startStopLearningList {{#if
learningActive}} btn-danger learnBoxActive {{else}} btn-success {{/if}}"
data-toggle="modal"
data-target="{{#unless
learningActive}}#confirmLearnModal{{else}}#confirmEndLearnModal{{/unless}}">
{{#if learningActive}}
{{_ "sidebar-nav.stopLearning"}}
{{else}}
{{#if isInRole 'admin, editor, lecturer'}}
{{#unless learningActive}}
<li id="startLearning"
class="startLearn startLearningList"
data-toggle="modal"
data-target="#confirmLearnModal">
{{_ "sidebar-nav.startLearning"}}
{{/if}}
</li>
</li>
{{/unless}}
{{/if}}
{{/if}}
{{#if learningActiveAndEditor}}
......@@ -496,6 +494,18 @@
</li>
{{/if}}
{{/if}}
{{#if isCardsetOwner _id}}
{{#if isInRole 'admin, editor, lecturer'}}
{{#if learningActive}}
<li id="stopLearning"
class="stopLearn stopLearningList learnBoxActive"
data-toggle="modal"
data-target="#confirmEndLearnModal">
{{_ "sidebar-nav.stopLearning"}}
</li>
{{/if}}
{{/if}}
{{/if}}
{{#unless isEditor}}
<li id="report_button" class="reportList" data-toggle="modal"
data-target="#reportModal">{{_
......
......@@ -10,18 +10,30 @@ module.exports = {
}
},
learnMemo: function (click = true) {
browser.waitForVisible('.learnBtn', global.threshold);
if (click) {
browser.click('.learnBtn');
}
browser.waitForVisible('#learnMemo', global.threshold);
if (click) {
browser.click('#learnMemo');
}
},
learnBox: function (click = true) {
browser.waitForVisible('.learnBtn', global.threshold);
if (click) {
browser.click('.learnBtn');
}
browser.waitForVisible('#learnBox', global.threshold);
if (click) {
browser.click('#learnBox');
}
},
leitnerProgress: function (click = true) {
browser.waitForVisible('.learnBtn', global.threshold);
if (click) {
browser.click('.learnBtn');
}
browser.waitForVisible('#leitnerProgress', global.threshold);
if (click) {
browser.click('#leitnerProgress');
......
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