Commit 2295e874 authored by Curtis Adam's avatar Curtis Adam

Display order numbers in card list view and prepare for manual card priority

parent 575a9941
...@@ -190,6 +190,9 @@ $themes: ( ...@@ -190,6 +190,9 @@ $themes: (
$cardset_markdeep_text: map-get($map, "cardset_markdeep_text"); $cardset_markdeep_text: map-get($map, "cardset_markdeep_text");
$cardset_markdeep_link: map-get($map, "cardset_markdeep_link"); $cardset_markdeep_link: map-get($map, "cardset_markdeep_link");
$cardset_markdeep_placeholder: map-get($map, "cardset_markdeep_placeholder"); $cardset_markdeep_placeholder: map-get($map, "cardset_markdeep_placeholder");
//card list
$card_list_number_background: map-get($map, "card_list_number_background");
$card_list_number_text: map-get($map, "card_list_number_text");
//card colors //card colors
$background_lecture: map-get($map, "background_lecture"); $background_lecture: map-get($map, "background_lecture");
$background_hint: map-get($map, "background_hint"); $background_hint: map-get($map, "background_hint");
...@@ -1640,5 +1643,11 @@ $themes: ( ...@@ -1640,5 +1643,11 @@ $themes: (
background-color: $no_results_background !important; background-color: $no_results_background !important;
color: $no_results_text !important; color: $no_results_text !important;
} }
//card list
.cardListNumber {
color: $card_list_number_text !important;
background-color: $card_list_number_background !important;
}
} }
} }
...@@ -204,6 +204,9 @@ ...@@ -204,6 +204,9 @@
"background_post_it_lines": $thm_orange, "background_post_it_lines": $thm_orange,
"background_pink": lightpink, "background_pink": lightpink,
"background_pink_lines": $thm_red, "background_pink_lines": $thm_red,
//card list
"card_list_number_background": black,
"card_list_number_text": $white,
//card colors //card colors
"background_lecture": LightGoldenRodYellow, "background_lecture": LightGoldenRodYellow,
"background_hint": LightGoldenRodYellow, "background_hint": LightGoldenRodYellow,
......
...@@ -206,6 +206,9 @@ ...@@ -206,6 +206,9 @@
"background_post_it_lines": $thm_orange, "background_post_it_lines": $thm_orange,
"background_pink": pink, "background_pink": pink,
"background_pink_lines": $thm_red, "background_pink_lines": $thm_red,
//card list
"card_list_number_background": $thm_green,
"card_list_number_text": white,
//card colors //card colors
"background_lecture": LightGoldenRodYellow, "background_lecture": LightGoldenRodYellow,
"background_hint": WhiteSmoke, "background_hint": WhiteSmoke,
......
...@@ -661,9 +661,12 @@ ...@@ -661,9 +661,12 @@
</thead> </thead>
<tbody> <tbody>
{{#each cardList}} {{#each cardList}}
<tr> <tr class="cardListRow">
<td class="{{getCardBackground this.difficulty this.cardType 1}} cardListRow" <td class="{{getCardBackground this.difficulty this.cardType 1}}"
data-id="{{this._id}}"> data-id="{{this._id}}">
<div class="cardListNumber">
{{getPriority @index}}
</div>
<div class="col-xs-11 listCard" data-id="{{this._id}}"> <div class="col-xs-11 listCard" data-id="{{this._id}}">
{{#if gotSidesSwapped}} {{#if gotSidesSwapped}}
{{cleanText this.back}} {{cleanText this.back}}
......
...@@ -226,6 +226,9 @@ Template.cardsetList.helpers({ ...@@ -226,6 +226,9 @@ Template.cardsetList.helpers({
return Cardsets.find({_id: Session.get('tempLearningIndex')}).fetch(); return Cardsets.find({_id: Session.get('tempLearningIndex')}).fetch();
} }
}, },
getPriority: function (index) {
return index;
},
cleanText: function (text) { cleanText: function (text) {
return text return text
// Remove image mark-up // Remove image mark-up
......
//@extend-elements //@extend-elements
//original selectors //original selectors
//.carousel-control.left, .carousel-control.right //.carousel-control.left, .carousel-control.right
$padding-card-list-row: 8px;
%extend_1 { %extend_1 {
background-image: none; background-image: none;
margin-top: 90px; margin-top: 90px;
...@@ -333,6 +336,22 @@ th .field-tip { ...@@ -333,6 +336,22 @@ th .field-tip {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
padding-left: $padding-card-list-row * 3;
}
.cardListRow td {
padding: $padding-card-list-row;
}
.cardListNumber {
position: absolute;
float: left;
width: 15px;
padding: $padding-card-list-row $padding-card-list-row * 2 $padding-card-list-row $padding-card-list-row;
margin-top: -$padding-card-list-row;
margin-left: -$padding-card-list-row;
vertical-align: middle;
text-align: center;
} }
.cardListSubject tbody tr:hover { .cardListSubject tbody tr:hover {
...@@ -399,7 +418,7 @@ th .field-tip { ...@@ -399,7 +418,7 @@ th .field-tip {
} }
.cardset-list-badge { .cardset-list-badge {
float:right; float: right;
} }
.markdeepCardset { .markdeepCardset {
...@@ -407,7 +426,7 @@ th .field-tip { ...@@ -407,7 +426,7 @@ th .field-tip {
} }
.markdeepCardsetContent { .markdeepCardsetContent {
padding: $padding_cardset_content_vertical$padding_cardset_content_horizontal !important; padding: $padding_cardset_content_vertical $padding_cardset_content_horizontal !important;
font-size: $font_size_cardset_content !important; font-size: $font_size_cardset_content !important;
} }
......
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