Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Langenthal 3.5.0 #184

Merged
merged 45 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
e944806
ember-cli
schefbi Jun 6, 2024
5734e61
v3.19.0...v3.27.0
schefbi Jul 4, 2024
d1b15d7
Deprecations add this hbs component
schefbi Jul 4, 2024
c048473
fix component error options, jQuery typeahead.js
schefbi Jul 9, 2024
58662f7
fix typeahead
schefbi Jul 11, 2024
99dea20
replaceWith to transitionTo
schefbi Jul 11, 2024
b3d93a1
update devDependencies
schefbi Jul 11, 2024
d933cae
testing settings
schefbi Jul 11, 2024
141acc5
Revert "replaceWith to transitionTo"
schefbi Jul 11, 2024
7178cf5
useCompanyAddress template fix 4.0
schefbi Aug 15, 2024
e33c1aa
template rendering 4.0 this
schefbi Aug 15, 2024
6817382
fix keyup ember 4.0
schefbi Aug 15, 2024
53f91e8
didTransition To routeDidChange
schefbi Aug 15, 2024
cf6160d
add ember active class to css
schefbi Aug 15, 2024
dcd437b
replaceWith to router.transitionTo 4.0
schefbi Aug 15, 2024
e1db9d6
rendering link-to update to LinkTo 4.0
schefbi Aug 15, 2024
029018b
add this to hbs
schefbi Aug 15, 2024
67fc716
import jQuery
schefbi Aug 15, 2024
8e54d0f
use router.transitionTo
schefbi Aug 15, 2024
7abf636
enable terser
schefbi Aug 15, 2024
354e14d
ember-angle-brackets-codemod
schefbi Aug 15, 2024
817275f
audit fix
schefbi Aug 15, 2024
c8ff021
v3.27.0...v3.28.6
schefbi Aug 16, 2024
cbf75d0
audit fix v3.28.6
schefbi Aug 16, 2024
4a730c0
node version 14.x
schefbi Aug 16, 2024
5b3c697
node version 14.x
schefbi Aug 16, 2024
2820269
Merge pull request #183 from bkd-mba-fbi/ember-update
schefbi Aug 16, 2024
925fbd9
Dropdown initial empty value #170 #171 #175
schefbi Aug 16, 2024
699aef3
vss dependency required use backend #172
schefbi Aug 16, 2024
ce264e6
token in sessionStorage send Authorization header #177
schefbi Aug 16, 2024
7003284
yes no as radiobutton #174
schefbi Aug 22, 2024
de43640
Login warning text to subscribe #176
schefbi Aug 23, 2024
195418e
AdresseData.IsBillingAddress change to IsBilling #181
schefbi Aug 23, 2024
6391c0c
add offers and hasCourseInstance to course jsonld #173
schefbi Aug 23, 2024
cf6e1d5
event dispaly grid optimized #169 #178
schefbi Aug 23, 2024
c12bf01
grid icon to header margin bottom #169
schefbi Aug 23, 2024
4a1d576
sync local files with keys #163
schefbi Aug 23, 2024
15d02b2
add weekday #163
schefbi Aug 23, 2024
ea9e7b1
v3.5.0
schefbi Aug 23, 2024
8b78a74
Merge branch 'master' into develop
schefbi Aug 23, 2024
dc33922
fix settings.subscriptionWithLoginURL null
schefbi Aug 23, 2024
ac3ad12
Merge branch 'develop' of https://github.com/bkd-mba-fbi/kursausschre…
schefbi Aug 23, 2024
c70a230
card-list margin left #169
schefbi Aug 28, 2024
1735abf
area More then one display #185
schefbi Aug 28, 2024
4c9caec
scroll to kursCategoryHeader #186
schefbi Aug 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 34 additions & 16 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true,
},
},
plugins: [
'ember'
],
plugins: ['ember'],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
env: {
browser: true
browser: true,
},
rules: {
'semi': 'error',
Expand All @@ -22,19 +24,35 @@ module.exports = {
// node files
{
files: [
'testem.js',
'ember-cli-build.js',
'config/**/*.js',
'lib/*/index.js'
'./.eslintrc.js',
'./.prettierrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./testem.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./lib/*/index.js',
'./server/**/*.js',
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
},
env: {
browser: false,
node: true
}
}
]
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
rules: {
// this can be removed once the following is fixed
// https://github.com/mysticatea/eslint-plugin-node/issues/77
'node/no-unpublished-require': 'off',
},
},
{
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
2 changes: 1 addition & 1 deletion .github/workflows/buildDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
node-version: [10.x]
node-version: [14.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# misc
/.vscode
/.sass-cache
/.eslintcache
/connect.lock
/coverage/*
/libpeerconnection.log
Expand Down
21 changes: 21 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.eslintcache

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
singleQuote: true,
};
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
language: node_js
node_js:
- "10"
- "12"

sudo: false
dist: trusty
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# kursausschreibung 3.4.1
# kursausschreibung 3.5.0
[![Build 🏭🚀](https://github.com/bkd-mba-fbi/kursausschreibung/actions/workflows/buildDeploy.yml/badge.svg)](https://github.com/bkd-mba-fbi/kursausschreibung/actions/workflows/buildDeploy.yml)

# Documentation
Expand Down Expand Up @@ -64,8 +64,8 @@ Make use of the many generators for code, try `ember help generate` for more det

### Linting

* `npm run lint:js`
* `npm run lint:js -- --fix`
* `npm run lint`
* `npm run lint:fix`

### Building

Expand Down
12 changes: 8 additions & 4 deletions app/components/event-list-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { setParameterByName, getParameterByName } from 'kursausschreibung/framew
import { sortAs } from '../framework/gui-helpers';
import { getSortAs } from '../framework/storage';
import settings from '../framework/settings';
import { getString } from '../framework/translate';
import { htmlSafe } from '@ember/string';

// tests if a query matches a value
function match(value, query) {
Expand Down Expand Up @@ -32,15 +34,15 @@ export default Component.extend({
this.send('queryChanged');
}

let sortOptions = [];
let options = '';
if(settings.sortOptions === undefined) {
sortOptions.push({key:'error', value:'configure key sortoptions array in settings'});
options = '<option value=error>configure key sortoptions array in settings</option>';
} else {
settings.sortOptions.forEach(option => {
sortOptions.push({key:option, value:"sort"+option});
options = options + '<option value='+option+'>'+getString("sort"+option)+'</option>';
});
}
this.set('sortOptions',sortOptions);
this.set('sortOptions',htmlSafe(options));
},

didRender() {
Expand All @@ -50,7 +52,9 @@ export default Component.extend({
filteredEvents: oneWay('events'),

keyUp(){
this.set('query',document.getElementById('searchEvents').value)
setParameterByName('search',this.get('query'));
this.send('queryChanged');
},

actions: {
Expand Down
12 changes: 12 additions & 0 deletions app/components/input/input-dropdown.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
import Component from '@ember/component';
import { vssDependency } from 'kursausschreibung/framework/form-helpers';
import { htmlSafe } from '@ember/string';

export default Component.extend({
willRender() {
let options = this.get('field.options.options');
let dropdownOptions = '';
options.forEach(option => {
dropdownOptions = dropdownOptions + '<option value='+option.Key+'>'+option.Value+'</option>';
});
this.set('dropdownOptions',htmlSafe(dropdownOptions));
},

change(){
let field = this.get('field');
let currentValue = null;

document.getElementById(this.elementId).children[0].classList.remove('required');

document.getElementsByName(field.id).forEach(input => {
if(field.options.showAsRadioButtons) {
Expand Down
3 changes: 2 additions & 1 deletion app/components/input/input-email.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import Component from '@ember/component';
import { formFieldError } from 'kursausschreibung/framework/form-helpers';
import jQuery from 'jquery';

export default Component.extend({
change() {
// show an error message for duplicate e-mails
const emailFields = this.$().closest('form').find('input[type="email"]').toArray();
const emailFields = jQuery('#subscriptionForm').closest('form').find('input[type="email"]').toArray();
const emailFieldValues = emailFields.map(field => field.value);

emailFields.forEach((field, fieldIndex) => {
Expand Down
5 changes: 3 additions & 2 deletions app/components/input/input-freeform-dropdown.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import Component from '@ember/component';
import { vssDependency } from 'kursausschreibung/framework/form-helpers';
import jQuery from 'jquery';

export default Component.extend({
didInsertElement() {
this._super(...arguments);

let options = this.get('field.options').options.map(option => option.Value);

this.$('.typeahead').typeahead(
jQuery('.typeahead').typeahead(
{
hint: true,
highlight: true,
Expand All @@ -26,7 +27,7 @@ export default Component.extend({
},

willDestroyElement() {
this.$('.typeahead').typeahead('destroy');
jQuery('.typeahead').typeahead('destroy');
this._super(...arguments);
},

Expand Down
8 changes: 5 additions & 3 deletions app/components/input/input-postal-code.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Component from '@ember/component';
import { debounce } from '@ember/runloop';
import { getPostalCodes } from 'kursausschreibung/framework/api';
import jQuery from 'jquery';


export default Component.extend({
Expand All @@ -11,8 +12,9 @@ export default Component.extend({
getPostalCodes(query).then(response => asyncResults(response));
};

let $typeahead = this.$('.typeahead');
let $locationFields = this.$().closest('fieldset').find('input[name="Location"]');
let elementId = '#'+this.elementId
let $typeahead = jQuery(elementId).children(0);
let $locationFields = jQuery(elementId).closest('fieldset').find('input[name="Location"]');

$typeahead.typeahead(
{
Expand All @@ -38,7 +40,7 @@ export default Component.extend({
},

willDestroyElement() {
this.$('.typeahead').typeahead('destroy');
jQuery('.typeaheadZip').typeahead('destroy');
this._super(...arguments);
}
});
12 changes: 10 additions & 2 deletions app/components/subscription-form.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Component from '@ember/component';
import { computed } from '@ember/object';
import $ from 'jquery';
import jQuery from 'jquery';
import { formatDate, getDMY, getYMD } from 'kursausschreibung/framework/date-helpers';
import { setDataToSubmit } from 'kursausschreibung/framework/storage';
import { getString } from 'kursausschreibung/framework/translate';
Expand Down Expand Up @@ -30,10 +30,18 @@ export default Component.extend({
submit(event) {
event.preventDefault();

subscribe(this.$('form'), this);
subscribe(jQuery('form'), this);
this.get('subscribe')();
},

useCompanyAddress(){
var value = this.get('useCompanyAddress');
if(value){
this.set('useCompanyAddress',false);
} else {
this.set('useCompanyAddress',true);
}
},
addPerson() {
if (this.get('event.FreeSeats') - 1 - this.get('additionalPeopleCount') <= 0) {
uikit.modal.alert(getString('noSeatsAvailable'));
Expand Down
8 changes: 1 addition & 7 deletions app/controllers/list/category/event/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
import Controller from '@ember/controller';
import settings from 'kursausschreibung/framework/settings';
import LinkComponent from '@ember/routing/link-component';

let badgeFreeSeatsEnabled = typeof settings.badgeFreeSeats === 'object' && settings.badgeFreeSeats.enabled === true;

export default Controller.extend({
showBreadcrumbs: settings.showBreadcrumbs,
badgeFreeSeatsEnabled
});

// bindings for tooltip and disabled attributes
LinkComponent.reopen({
attributeBindings: ['data-uk-tooltip', 'disabled']
});
});
14 changes: 8 additions & 6 deletions app/controllers/list/category/event/subscribe.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';

export default Controller.extend({
actions: {
subscribe() {
this.transitionToRoute('list.category.event.confirmation');
export default class subscribeController extends Controller {
@service router;
@action
subscribe() {
this.router.transitionTo('list.category.event.confirmation');
}
}
});
};
2 changes: 1 addition & 1 deletion app/framework/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function ajax(method, relativeUrl, readableError = true, data = null, file = fal
dataFilter: data => data === '' ? 'null' : data,

headers: {
'CLX-Authorization': `token_type=${appConfig.tokenType}, access_token=${accessToken}`
'Authorization': `Bearer ${accessToken}`
}
});

Expand Down
2 changes: 1 addition & 1 deletion app/framework/form-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ if(field.options.dependencyItems !== undefined) {

if(vssDependencyCheck(formValue,operator,values)) {
hidden.classList.remove(hiddenClass);
requiredElement.required = true;
requiredElement.required = element.required;
} else {
hidden.classList.add(hiddenClass);
requiredElement.required = false;
Expand Down
1 change: 1 addition & 0 deletions app/framework/gui-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export function displayAsGrid(bool) {
var list = document.getElementById('list-cards');
var btGrid = document.getElementById('bt-grid');
var btList = document.getElementById('bt-list');
var bool = (String(bool).toLowerCase() === 'true');

if (typeof bool === "boolean") {
setListViewGrid(bool);
Expand Down
Loading
Loading