|
@@ -43,7 +43,7 @@ function card_has_tag(card, tag) {
|
43
|
43
|
function card_add_tag(card, tag) {
|
44
|
44
|
tag = tag.trim().toLowerCase();
|
45
|
45
|
var index = card.tags.indexOf(tag);
|
46
|
|
- if (index == -1) {
|
|
46
|
+ if (index === -1) {
|
47
|
47
|
card.tags.push(tag);
|
48
|
48
|
}
|
49
|
49
|
}
|
|
@@ -51,7 +51,7 @@ function card_add_tag(card, tag) {
|
51
|
51
|
function card_remove_tag(card, tag) {
|
52
|
52
|
tag = tag.trim().toLowerCase();
|
53
|
53
|
card.tags = card.tags.filter(function (t) {
|
54
|
|
- return tag != t;
|
|
54
|
+ return tag !== t;
|
55
|
55
|
});
|
56
|
56
|
}
|
57
|
57
|
|
|
@@ -115,10 +115,10 @@ function card_element_inline_icon(params, card_data, options) {
|
115
|
115
|
var align = params[2] || "center";
|
116
|
116
|
var margin_left = 0;
|
117
|
117
|
var color = card_data_color_front(card_data, options);
|
118
|
|
- if(align == "center") {
|
|
118
|
+ if (align === "center") {
|
119
|
119
|
margin_left = (size/-2) + 'px';
|
120
|
120
|
}
|
121
|
|
- else if (align == 'right') {
|
|
121
|
+ else if (align === 'right') {
|
122
|
122
|
margin_left = 'auto';
|
123
|
123
|
}
|
124
|
124
|
return '<div class="card-element card-inline-icon align-' + align + ' icon-' + icon + '" style ="height:' + size + 'px; width: ' + size + 'px; margin-left: ' + margin_left + '; background-color: ' + color + '"></div>';
|
|
@@ -450,7 +450,7 @@ function card_pages_wrap(pages, options) {
|
450
|
450
|
var result = "";
|
451
|
451
|
for (var i = 0; i < pages.length; ++i) {
|
452
|
452
|
var style = "";
|
453
|
|
- if ((options.card_arrangement == "doublesided") && (i % 2 == 1)) {
|
|
453
|
+ if ((options.card_arrangement === "doublesided") && (i % 2 === 1)) {
|
454
|
454
|
style += 'style="background-color:' + options.background_color + '"';
|
455
|
455
|
} else {
|
456
|
456
|
style += 'style="background-color:' + options.foreground_color + '"';
|
|
@@ -501,7 +501,7 @@ function card_pages_generate_html(card_data, options) {
|
501
|
501
|
});
|
502
|
502
|
|
503
|
503
|
var pages = [];
|
504
|
|
- if (options.card_arrangement == "doublesided") {
|
|
504
|
+ if (options.card_arrangement === "doublesided") {
|
505
|
505
|
// Add padding cards so that the last page is full of cards
|
506
|
506
|
front_cards = card_pages_add_padding(front_cards, options);
|
507
|
507
|
back_cards = card_pages_add_padding(back_cards, options);
|
|
@@ -517,10 +517,10 @@ function card_pages_generate_html(card_data, options) {
|
517
|
517
|
|
518
|
518
|
// Interleave front and back pages so that we can print double-sided
|
519
|
519
|
pages = card_pages_merge(front_pages, back_pages);
|
520
|
|
- } else if (options.card_arrangement == "front_only") {
|
|
520
|
+ } else if (options.card_arrangement === "front_only") {
|
521
|
521
|
var cards = card_pages_add_padding(front_cards, options);
|
522
|
522
|
pages = card_pages_split(cards, rows, cols);
|
523
|
|
- } else if (options.card_arrangement == "side_by_side") {
|
|
523
|
+ } else if (options.card_arrangement === "side_by_side") {
|
524
|
524
|
var cards = card_pages_interleave_cards(front_cards, back_cards, options);
|
525
|
525
|
cards = card_pages_add_padding(cards, options);
|
526
|
526
|
pages = card_pages_split(cards, rows, cols);
|