...
 
Commits (93)

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

/*
* This file is part of ARSnova Cards.
* Copyright (C) 2016 The ARSnova Team
* This file is part of cards.
* Copyright (C) 2018 The ARSnova Team
*
* ARSnova Click is free software: you can redistribute it and/or modify
* cards is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ARSnova Click is distributed in the hope that it will be useful,
* cards is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ARSnova Click. If not, see <http://www.gnu.org/licenses/>.*/
* along with cards. If not, see <http://www.gnu.org/licenses/>.*/
var gulp = require('gulp'),
let gulp = require('gulp4'),
watch = require('gulp-watch');
var jshint = require('gulp-jshint');
var jscs = require('gulp-jscs');
var stylish = require('jshint-stylish');
let jshint = require('gulp-jshint');
let jscs = require('gulp-jscs');
let stylish = require('jshint-stylish');
var paths = [
let paths = [
'./{client,imports,i18n,server,tests}/**/*.js'
];
gulp.task('default', ['codeCheck']);
gulp.task('watch', function () {
gulp.start('codeCheck');
gulp.watch(paths, ['codeCheck'])
});
gulp.task('codeCheck', function () {
gulp.start('lint');
gulp.start('jscs');
gulp.watch(paths, gulp.series('codeCheck'));
});
gulp.task('lint', function () {
......@@ -48,3 +40,13 @@ gulp.task('jscs', function () {
.pipe(jscs())
.pipe(jscs.reporter());
});
gulp.task(
'codeCheck',
gulp.series('lint', 'jscs')
);
gulp.task(
'default',
gulp.series('codeCheck')
);
......@@ -35,7 +35,6 @@ tap:i18n-db
aldeed:collection2
okgrow:promise
themeteorchef:bert
easy:search
barbatus:stars-rating
rexzh0u:kramed
simple:katex
......@@ -54,7 +53,6 @@ check@1.3.1
shell-server@0.4.0
tsega:bootstrap3-lightbox
polyroid:font-roboto
ground:db
meteorhacks:ssr
fezvrasta:bootstrap-material-design
mrt:mathjax
......
......@@ -43,14 +43,9 @@ ddp-rate-limiter@1.0.7
ddp-server@2.2.0
deps@1.0.12
diff-sequence@1.1.0
dispatch:kernel@0.0.6
dispatch:request-animation-frame@0.0.1
dsyko:jquery-ui-touch-punch@1.2.4
dynamic-import@0.5.0
east5th:package-scan@0.0.5
easy:search@2.2.1
easysearch:components@2.2.1
easysearch:core@2.2.0
ecmascript@0.12.1
ecmascript-runtime@0.7.0
ecmascript-runtime-client@0.8.0
......@@ -68,13 +63,6 @@ fourseven:scss@3.13.0
geojson-utils@1.0.10
google-config-ui@1.0.1
google-oauth@1.2.6
ground:db@0.3.15
ground:dictionary@0.2.1
ground:localstorage@0.1.9
ground:minimax@1.1.3
ground:servertime@0.0.3
ground:store@0.1.2
ground:util@0.1.17
harrison:papa-parse@1.1.7
hot-code-push@1.0.4
html-tools@1.0.11
......@@ -130,19 +118,11 @@ observe-sequence@1.0.16
okgrow:promise@0.9.5
ordered-dict@1.1.0
patrickml:braintree@1.32.0
peerlibrary:assert@0.2.5
peerlibrary:base-component@0.16.0
peerlibrary:blaze-components@0.21.0
peerlibrary:computed-field@0.9.0
peerlibrary:data-lookup@0.1.0
peerlibrary:reactive-field@0.3.0
percolate:synced-cron@1.3.2
pfafman:filesaver@1.3.2
polyroid:font-roboto@1.0.1
promise@0.11.1
raix:eventemitter@0.1.3
raix:onetimeout@1.0.4
raix:stubfence@1.0.3
random@1.1.0
rate-limit@1.0.9
reactive-dict@1.2.1
......
......@@ -3,24 +3,24 @@
@import '../imports/ui/impressum/impressum.scss';
@import '../imports/ui/welcome/welcome.scss';
@import '../imports/ui/wordcloud/wordcloud.scss';
@import '../imports/ui/cardsets/cardsets.scss';
@import '../imports/ui/filter/index/index.scss';
@import '../imports/ui/cardset/cardset.scss';
@import '../imports/ui/cardsets/resultItem';
@import '../imports/ui/filter/index/item/cardset';
@import '../imports/ui/card/card.scss';
@import '../imports/ui/card/sidebar/sidebar.scss';
@import '../imports/ui/card/sidebar/item/zoomText';
@import '../imports/ui/card/navigation/navigation.scss';
@import '../imports/ui/markdeepEditor/content/content';
@import '../imports/ui/markdeepEditor/navigation/navigation';
@import '../imports/ui/filter/filter.scss';
@import '../imports/ui/filter/navigation/navigation.scss';
@import '../imports/ui/forms/bonusForm.scss';
@import '../imports/ui/forms/cardsetForm.scss';
@import '../imports/ui/profile/profile.scss';
@import '../imports/ui/profile/profile';
@import '../imports/ui/learn/learn.scss';
@import '../imports/ui/learn/progress.scss';
@import '../imports/ui/pomodoroTimer/pomodoroTimer.scss';
@import '../imports/ui/admin/admin.scss';
@import '../imports/ui/access_denied/access_denied.scss';
@import '../imports/ui/accessDenied/accessDenied';
@import '../imports/ui/markdeep/content.scss';
@import '../imports/ui/main/sweetAlert2.scss';
@import '../imports/ui/loadingScreen/loadingScreen.scss';
......
......@@ -816,9 +816,24 @@ $themes: (
border-bottom-color: $search_results_separator !important;
}
.search-subject {
background-color: $search_results_subject_background !important;
color: $search_results_subject_text !important;
.search-subject-personal {
background-color: $private_background !important;
color: $private_text !important;
}
.search-subject-edu {
background-color: $edu_background !important;
color: $edu_text !important;
}
.search-subject-pro {
background-color: $pro_background !important;
color: $pro_text !important;
}
.search-subject-free {
background-color: $free_background !important;
color: $free_text !important;
}
.search-content {
......
......@@ -396,8 +396,6 @@
//notification colors
"notification_text_smartphones": white,
//search colors
"search_results_subject_background": $thm_green,
"search_results_subject_text": white,
"search_results_content_background": LightGoldenRodYellow,
"search_results_content_text": $thm_gray,
"search_results_author_background": $thm_gray,
......
......@@ -278,11 +278,11 @@
"cardset_footer_navigation_background": $thm_gray,
"cardset_footer_navigation_presentation_background": $thm_dark_blue,
"cardset_footer_navigation_presentation_text": white,
"cardset_footer_navigation_presentation_background_hover": $thm_dark_blue,
"cardset_footer_navigation_presentation_background_hover": $thm_gray,
"cardset_footer_navigation_presentation_text_hover": white,
"cardset_footer_navigation_learn_background": $thm_green,
"cardset_footer_navigation_learn_text": white,
"cardset_footer_navigation_learn_background_hover": $thm_green,
"cardset_footer_navigation_learn_background_hover": $thm_gray,
"cardset_footer_navigation_learn_text_hover": white,
"cardset_footer_navigation_learn_list_leitner_background": none,
"cardset_footer_navigation_learn_list_leitner_text": black,
......@@ -308,9 +308,9 @@
"cardset_footer_navigation_learn_list_reset_wozniak_text": white,
"cardset_footer_navigation_learn_list_reset_wozniak_background_hover": white,
"cardset_footer_navigation_learn_list_reset_wozniak_text_hover": $thm_orange,
"cardset_footer_navigation_new_card_background": $thm_green,
"cardset_footer_navigation_new_card_background": $thm_orange,
"cardset_footer_navigation_new_card_text": white,
"cardset_footer_navigation_new_card_background_hover": $thm_green,
"cardset_footer_navigation_new_card_background_hover": $thm_gray,
"cardset_footer_navigation_new_card_text_hover": white,
"cardset_footer_navigation_import_cards_background": none,
"cardset_footer_navigation_import_cards_text": black,
......@@ -334,7 +334,7 @@
"cardset_footer_navigation_publish_cardset_text_hover": black,
"cardset_footer_navigation_bonus_background": $thm_green,
"cardset_footer_navigation_bonus_text": white,
"cardset_footer_navigation_bonus_background_hover": $thm_green,
"cardset_footer_navigation_bonus_background_hover": $thm_gray,
"cardset_footer_navigation_bonus_text_hover": white,
"cardset_footer_navigation_bonus_list_start_learning_background": $thm_green,
"cardset_footer_navigation_bonus_list_start_learning_text": white,
......@@ -380,9 +380,9 @@
"cardset_footer_navigation_export_cards_text": black,
"cardset_footer_navigation_export_cards_background_hover": none,
"cardset_footer_navigation_export_cards_text_hover": black,
"cardset_footer_navigation_delete_all_cards_background": $thm_orange,
"cardset_footer_navigation_delete_all_cards_background": $thm_red,
"cardset_footer_navigation_delete_all_cards_text": white,
"cardset_footer_navigation_delete_all_cards_background_hover": $thm_orange,
"cardset_footer_navigation_delete_all_cards_background_hover": $thm_gray,
"cardset_footer_navigation_delete_all_cards_text_hover": white,
//markdeep colors
"markdeep_inline_code_background": yellow,
......@@ -398,8 +398,6 @@
//notification colors
"notification_text_smartphones": white,
//search colors
"search_results_subject_background": $thm_green,
"search_results_subject_text": white,
"search_results_content_background": LightGoldenRodYellow,
"search_results_content_text": $thm_gray,
"search_results_author_background": $thm_gray,
......
This diff is collapsed.
......@@ -16,11 +16,15 @@ export let Bonus = class Bonus {
}
static canJoinBonus (cardset_id) {
let cardset = Cardsets.findOne({_id: cardset_id}, {fields: {_id: 1, registrationPeriod: 1, owner: 1}});
if (Roles.userIsInRole(Meteor.userId(), ['firstLogin', 'blocked']) || cardset.owner === Meteor.userId()) {
let cardset = Cardsets.findOne({_id: cardset_id}, {fields: {_id: 1, registrationPeriod: 1, owner: 1, kind: 1}});
if (Roles.userIsInRole(Meteor.userId(), ['firstLogin', 'blocked'])) {
return false;
}
if (Roles.userIsInRole(Meteor.userId(), ['admin', 'editor', 'lecturer', 'university', 'pro'])) {
let roles = ['admin', 'editor', 'lecturer', 'university', 'pro'];
if (cardset.kind === "free") {
roles.push('standard');
}
if (Roles.userIsInRole(Meteor.userId(), roles)) {
return !this.isInBonus(cardset._id) && moment(cardset.registrationPeriod).endOf('day') > new Date();
} else {
return false;
......
......@@ -8,8 +8,89 @@ import {BertAlertVisuals} from "./bertAlertVisuals";
const subjectMaxLength = 255;
const contentMaxLength = 300000;
let editorButtonIndex = 0;
let editorButtons = [];
let cardNavigationName = ".cardNavigation";
let learningGoalLevelGroupName = '#learningGoalLevelGroup .active';
let firstCardNavigationCall = false;