Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
c19ccd2
Upgrade to Bootstrap 5 and update PostCSS
nestordedios Mar 1, 2022
1b15a01
Add package-lock.json after updates
nestordedios Mar 1, 2022
87e2325
Function hover() is deprecated, use :hover pseudo class instead
nestordedios Mar 1, 2022
9784c20
Add colors variable and use those instead of custom CSS variables
nestordedios Mar 1, 2022
e0c31cf
Use other default Sass variables for the one no longer existing
nestordedios Mar 1, 2022
0d291d0
Comment out non existing Bootstrap components for now
nestordedios Mar 1, 2022
da61c4b
Replace theme-color-level() by mix() in _buttons.scss
nestordedios Mar 1, 2022
cdd0a54
Keep $alert-bg-level Bootstrap 4 variable
nestordedios Mar 2, 2022
5746636
Replace badge-variant() function by the returning value
nestordedios Mar 2, 2022
9cf1b8d
Use visually-hidden and visually-hidden-focusable functions
nestordedios Mar 2, 2022
e85345e
Import Bootstrap utilities generator
nestordedios Mar 3, 2022
be2ec00
Add text-decoration-none utility class to links
nestordedios Mar 3, 2022
9dec219
Replace data-toggle attribute by data-bs-toggle
nestordedios Mar 3, 2022
a16da47
Update Cypress tests that interact with dropdown buttons
nestordedios Mar 3, 2022
b0f9119
Set font-family with $font-family-base Sass variable
nestordedios Mar 3, 2022
fc3d3e4
Update value of $min-contrast-ratio Sass variable
nestordedios Mar 3, 2022
f502c5e
Add utility class text-decoration-none to remove default Bootstrap 5 …
nestordedios Mar 3, 2022
5daaf9f
Use shift-color function instead of mix
nestordedios Mar 3, 2022
4aa52cd
Replace custom-checkbox by form-check as new in Bootstrap 5
nestordedios Mar 9, 2022
a9bac2d
Replace ml-* utility classes by ms-*
nestordedios Mar 14, 2022
9fc3bbb
Replace mr-* utility classes by me-*
nestordedios Mar 14, 2022
194d7c5
Replace pl-* utility classes by ps-*
nestordedios Mar 14, 2022
509e8ec
Replace pr-* utility classes by pe-*
nestordedios Mar 14, 2022
3868d47
Import Bootstrap's CSS variables
nestordedios Mar 14, 2022
99b42e7
Replace badge-* background colors by bg-*
nestordedios Mar 14, 2022
6498238
Add white color to btn-hidden-danger buttons
nestordedios Mar 14, 2022
aa28884
Add text-decoration-none to badges
nestordedios Mar 14, 2022
616a66f
Remove generation of custom states backgrounds
nestordedios Mar 15, 2022
9e676f8
Replace input-group-append by input-group-text
nestordedios Mar 15, 2022
42ccb4c
Replace float-right by float-end
nestordedios Mar 15, 2022
752493c
Add form-label class to <label> element
nestordedios Mar 15, 2022
9f0e219
Add form-label class to form labels elements
nestordedios Mar 15, 2022
34317fb
Remove .input-group-append and .input-group-prepend wrappers
nestordedios Mar 15, 2022
f637d41
Set $input-bg variable
nestordedios Mar 15, 2022
bb852dc
Use $input-disable-bg variable as background color of date input fields
nestordedios Mar 15, 2022
2ce6f7d
Update margin in _pre_postfix.scss
nestordedios Mar 15, 2022
dc5ae85
Replace data-toggle by data-bs-toggle
nestordedios Mar 15, 2022
eff892e
Replace form-group and inline-form classes by utility classes
nestordedios Mar 17, 2022
5112b18
Fix checkbox and switcher fields
nestordedios Mar 17, 2022
0c534c0
Replace form-group by mb-4 utility class
nestordedios Mar 18, 2022
406cf46
Remove is-normal class where it does not apply CSS
nestordedios Mar 18, 2022
b258d04
Add ternary operator to check for fields that need less margin
nestordedios Mar 18, 2022
005821b
Rewrite initialization of Toasts in Javascript
nestordedios Mar 21, 2022
2f54f6a
Replace data-toggle attribute by data-bs-toggle
nestordedios Mar 21, 2022
60fe8e3
Initialize Popovers with Javascript
nestordedios Mar 22, 2022
d4ba524
Move color around in variables.scss
nestordedios Mar 22, 2022
5cf8be0
Remove theme-colors from buttons.scss
nestordedios Mar 22, 2022
932b2bd
Use bg-toast-{state} classes to apply backgroudn color on toasts
nestordedios Mar 22, 2022
06020d2
Replace data-content attribute by data-bs-content
nestordedios Mar 23, 2022
02ac35e
Replace data-trigger attribute by data-bs-trigger
nestordedios Mar 23, 2022
dde7ee9
Replace data-html attribute by data-bs-attribute
nestordedios Mar 23, 2022
474a902
Replace Bootbox by built in Bootstrap modal system
nestordedios Apr 1, 2022
9fd84b7
Configure Popovers SCSS variables in _variables.scss
nestordedios Apr 1, 2022
cabd210
Replace Bootbox by Bootstrap modal for file fields
nestordedios Apr 5, 2022
14db536
Add good color for .btn-light-danger
nestordedios Apr 7, 2022
a48f5b5
Replace badge-secondary by bg-secondary CSS class
nestordedios Apr 7, 2022
c0dd1b7
Fix tabbing and urls
nestordedios Apr 7, 2022
a615988
Replace Bootbox by Bootstrap's modals to upload images from URL
nestordedios Apr 7, 2022
f895bd9
Update icons classes
nestordedios Apr 7, 2022
7993759
Make images take all the height available in Images modal
nestordedios Apr 7, 2022
fa81ec7
Use labels to set title of select a file modal
nestordedios Apr 7, 2022
a0c9d13
Use labels to set title of modal to upload images
nestordedios Apr 7, 2022
d71f911
Set title of Upload from URL modal with labels
nestordedios Apr 7, 2022
952d8b2
Set labels for image, file, imagelist and filelist fields
nestordedios Apr 7, 2022
3b76180
Update translations
nestordedios Apr 7, 2022
4e789b2
Make loading text of modal a translatable label
nestordedios Apr 7, 2022
3c7c112
Install @popperjs/core to fix failing test
nestordedios Apr 8, 2022
4eaa429
Fix Javascript linting errors
nestordedios Apr 8, 2022
cea0895
Fix CSS lint errors
nestordedios Apr 8, 2022
767a864
Update display_record.spec.js
Joossensei Apr 8, 2022
d2e29ef
Update view_users_tables.spec.js
Joossensei Apr 8, 2022
163f022
Fix "disabled" badge for users
Joossensei Apr 8, 2022
b308a94
Update listing.html.twig
Joossensei Apr 8, 2022
fa45cbf
Update ajax-save.js
Joossensei Apr 8, 2022
6e885d0
Small update to display record
Joossensei Apr 11, 2022
29ea4d0
Remove scroll behaviour for all tests
nestordedios Apr 11, 2022
588f631
Oops @nestordedios
Joossensei Apr 11, 2022
3a1907b
Update cypress-dev.json
Joossensei Apr 11, 2022
f44bc22
Fix a few Cypress tests
Joossensei Apr 11, 2022
47b00bf
Remove the dropdown toggle
Joossensei Apr 12, 2022
99ebd98
Update some Cypress tests
Joossensei Apr 12, 2022
8179fe6
Fix tab.show() isn't a function error on invalid input fields
nestordedios Apr 13, 2022
9522f84
Replace bootbox action confirmation by Bootstrap modal
nestordedios Apr 13, 2022
79c2730
Remove unused jquery from index.vue file
nestordedios Apr 13, 2022
0390113
This somehow fixes the compact view???
Joossensei Apr 20, 2022
29c90f3
Fix bulk select of records on CMS listings
nestordedios Apr 21, 2022
4af4a02
Fix javascript linting
nestordedios Apr 21, 2022
a9756bd
Update record_listing.spec.js
Joossensei Apr 22, 2022
e16e7d5
Fixed bulk cypress test
Joossensei Apr 22, 2022
23a94a0
Update cypress-ci.json
Joossensei Apr 22, 2022
a77d3d6
Global flag for force doesnt work
Joossensei Apr 22, 2022
09365ff
Update display_record.spec.js
Joossensei Apr 22, 2022
19dd7c5
Update cypress config for dev and some tests
Joossensei Apr 22, 2022
f0dabbd
Bunch of test fixes
Joossensei Apr 22, 2022
1a5a3c6
Update cypress configs for Bootstrap update
Joossensei Apr 25, 2022
d820f22
Update .gitignore
Joossensei Apr 25, 2022
bc2bc84
Remove old confirmation stuff
Joossensei Apr 25, 2022
5650662
Update lots and lots of tests
Joossensei Apr 25, 2022
3adeba1
Add force and correct a little mistake
Joossensei Apr 25, 2022
fe03b31
Update edit_record_1_fill_list.spec.js
Joossensei Apr 25, 2022
4ab9dc4
Change order on `.scrollIntoView()`
bobdenotter Apr 25, 2022
ac7fe6f
Update edit_record_1_fill_list.spec.js
Joossensei Apr 25, 2022
e7aee38
Update edit_record_1_fill_list.spec.js
Joossensei Apr 26, 2022
1b21d5a
Update edit_record_1_fill_list.spec.js
Joossensei Apr 26, 2022
01003b2
Set retries to 0 for this test because a retry breaks it
Joossensei Apr 26, 2022
427fb3e
Update edit_record_1_fill_list.spec.js
Joossensei Apr 26, 2022
43f4d10
Update edit_record_1_fill_list.spec.js
Joossensei Apr 26, 2022
0fd8b3c
Update edit_record_1_fill_list.spec.js
Joossensei Apr 26, 2022
c7a734a
Update edit_record_1_fill_list.spec.js
Joossensei Apr 26, 2022
b0415d9
Its too fast
Joossensei Apr 26, 2022
0d5770d
Update edit_record_1_fill_list.spec.js
Joossensei Apr 26, 2022
415133c
Updating updating
Joossensei Apr 26, 2022
236e162
Fix the links and the phpstan
Joossensei Apr 26, 2022
08e3bea
Update cypress_tests.yaml
Joossensei Apr 26, 2022
6c09b91
Lets not remove the server start
Joossensei Apr 26, 2022
3e946f4
Update edit_record_1_fill_list.spec.js
Joossensei Apr 28, 2022
894312f
Update File.vue
Joossensei Apr 28, 2022
f68ebcb
Hope this gives us an insight of what Error 500 means
Joossensei Apr 28, 2022
c4515e3
Update edit_record_1_fill_list.spec.js
Joossensei Apr 28, 2022
1a4c96c
Fix ESLint
Joossensei Apr 29, 2022
c5b496a
Updates after rebase. Also fixing filelist test
Joossensei Apr 29, 2022
25465d4
Lets see if the Error 500 is gone now
Joossensei Apr 29, 2022
7f47ddc
Update edit_record_1_fill_list.spec.js
Joossensei Apr 29, 2022
77bab8d
Update edit_record_1_fill_list.spec.js
Joossensei Apr 29, 2022
aad9f5f
Update edit_record_1_fill_list.spec.js
Joossensei Apr 29, 2022
1a3c451
Add dinamic labels for save and close buttons in modals
nestordedios Apr 29, 2022
5aab658
Update tests and labels
Joossensei Apr 29, 2022
4eccced
Fix ESLint
Joossensei Apr 29, 2022
8e885e9
Update modal.js
Joossensei Apr 29, 2022
a21559d
Fixed it
Joossensei Apr 29, 2022
9dda14c
Update modal.js
Joossensei Apr 29, 2022
e3fcf79
Tweak, tweak
bobdenotter May 3, 2022
cc08c9c
Split list in two tests
bobdenotter May 3, 2022
e37aa2a
Disabling two problematic tests
bobdenotter May 3, 2022
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
5 changes: 3 additions & 2 deletions .github/workflows/cypress_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ jobs:
npm run build
sudo chmod -R 777 config/ public/files/ public/theme/ public/thumbs/ var/
# prepare web server for e2e tests
./bin/console doctrine:database:create
./bin/console doctrine:schema:create
./bin/console doctrine:schema:create -q
./bin/console doctrine:migrations:sync-metadata-storage -q
./bin/console doctrine:migrations:version --add --all -n -q
./bin/console doctrine:fixtures:load --group=without-images -n
./bin/console server:start 127.0.0.1:8088
# test if web server works
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ webpack_stats.json
### Behat / Cypress / Front-end testing files
bin/chromedriver*
bin/selenium-server-standalone*
tests/cypress/screenshots/
tests/cypress/videos/
tests/cypress/evidence

### File-system cruft and temporary files
__*
Expand Down
12 changes: 9 additions & 3 deletions assets/js/app/ajax-save.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import $ from 'jquery';
import { patience_virtue, renable } from './patience-is-a-virtue';
import { Toast } from 'bootstrap';

let form = $('#editcontent');
let record_id = form.data('record');
Expand Down Expand Up @@ -44,10 +45,15 @@ $(document).ready(function() {
$('#toastBody').append(toastMessage);

$(document).ready(function() {
$('.toast').toast('show');
});
let toastElList = [].slice.call(document.querySelectorAll('.toast'));
let toastList = toastElList.map(function(toastEl) {
return new Toast(toastEl, []);
});

setTimeout($('.toast').toast('hide'), 5000);
toastList.forEach(function(toast) {
toast.show();
});
});
}
this.href = window.location.pathname;

Expand Down
75 changes: 66 additions & 9 deletions assets/js/app/common.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import $ from 'jquery';
import { DateTime } from 'luxon';
import { Popover } from 'bootstrap';
import { Tab } from 'bootstrap';
import { resetModalContent } from './modal';

import { version } from '../version';
window.assetsVersion = version;
Expand Down Expand Up @@ -37,15 +40,16 @@ $(document).ready(function() {
let url = location.href.replace(/\/$/, '');
if (location.hash) {
const hash = url.split('#');
$('a[href="#' + hash[1] + '"]').tab('show');
let triggerEl = document.querySelector('a[href="#' + hash[1] + '"]');
Tab.getOrCreateInstance(triggerEl).show(); // Select tab by name
url = location.href.replace(/\/#/, '#');
history.replaceState(null, null, url);
setTimeout(() => {
$(window).scrollTop(0);
}, 50);
}

$('a[data-toggle="pill"]').on('click', function() {
$('a[data-bs-toggle="pill"]').on('click', function() {
let newUrl;
const hash = $(this).attr('href');
newUrl = url.split('#')[0] + hash;
Expand All @@ -62,19 +66,24 @@ $(document).ready(function() {
/*
** Initialise all popover elements
*/
$('[data-toggle="popover"]').popover();
let popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'));
popoverTriggerList.map(function(popoverTriggerEl) {
return new Popover(popoverTriggerEl);
});

/*
** When a field from another group is invalid, show it.
*/
$('#editor button[type="submit"]').click(function() {
$('input:invalid').each(function() {
// Find the tab-pane that this element is inside, and get the id
var $closest = $(this).closest('.tab-pane');
var id = $closest.attr('id');

// Find the link that corresponds to the pane and have it show
$('.nav a[href="#' + id + '"]').tab('show');
let $closest = $(this).closest('.tab-pane');
let id = $closest.attr('id');
if (id != null) {
// Find the link that corresponds to the pane and have it show
let triggerEl = document.querySelector('.nav a[href="#' + id + '"]');
Tab.getOrCreateInstance(triggerEl).show(); // Select tab by name
}

// Only want to do it once
return false;
Expand Down Expand Up @@ -143,7 +152,7 @@ $(document).ready(function() {
$('[data-copy-to-clipboard]').on('click', function(e) {
const target = $(e.target);

var input = document.createElement('input');
let input = document.createElement('input');
input.setAttribute('id', 'copy');

target.parent().append(input);
Expand All @@ -157,4 +166,52 @@ $(document).ready(function() {
.remove();
});
/* End of copy text to clipboard */

/*
** Modals content
*/

// Reset the content of a modal to it's default

$('[data-bs-toggle="modal"]').on('click', function(event) {
let resourcesModal = document.getElementById('resourcesModal');

let saveButton = document.getElementById('modalButtonAccept');

let title = event.target.getAttribute('data-modal-title');
let modalTitle = resourcesModal.querySelector('.modal-title');

let modalBody = resourcesModal.querySelector('.modal-body');
let body = event.target.getAttribute('data-modal-body');

let targetURL = event.target.getAttribute('href');

modalTitle.innerHTML = title;
modalBody.innerHTML = body;

if (targetURL != null && modalBody != null) {
modalBody.remove();
}

saveButton.addEventListener(
'click',
() => {
// When the modal is accepted navigate to the URL of the target element
if (targetURL) {
window.location.href = targetURL;
}
},
{ once: true },
);

resourcesModal.addEventListener(
'hidden.bs.modal',
() => {
// Reset modal body content when the modal is closed
resetModalContent('');
},
{ once: true },
);
});
/* End of Modals content */
});
35 changes: 0 additions & 35 deletions assets/js/app/confirmation.js

This file was deleted.

6 changes: 3 additions & 3 deletions assets/js/app/editor/Components/Checkbox.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<template>
<div>
<div :class="['custom-control', 'custom-' + mode]">
<div :class="['custom-control', 'form-' + mode, 'form-check', mode == 'switch' ? 'form-switch' : '']">
<input
:id="id"
class="custom-control-input"
class="form-check-input"
:name="name"
:checked="value"
type="checkbox"
:readonly="readonly"
@change="liveValue = $event.target.checked"
/>
<label class="custom-control-label" :for="name">{{ label }}</label>
<label class="custom-control-label form-label" :for="name">{{ label }}</label>

<!-- This hidden input is actually what gets submitted. It submits "true" when checked, and "false" when not checked -->
<!-- It exists because we need an "unchecked" value submitted. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox -->
Expand Down
4 changes: 2 additions & 2 deletions assets/js/app/editor/Components/Collection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<div class="card-header d-flex align-items-center">
<!-- Initial title. This is replaced by dynamic title in JS below. -->
<i class="card-marker-caret fa fa-caret-right"></i>
<span class="badge badge-secondary inline" :title="element.label">
<span class="badge bg-secondary inline" :title="element.label">
<i :class="[element.icon, 'fas']"></i>
</span>
<div class="collection-item-title" :data-label="element.label">
Expand All @@ -50,7 +50,7 @@
:disabled="!allowMore"
class="btn btn-secondary dropdown-toggle"
type="button"
data-toggle="dropdown"
data-bs-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
Expand Down
54 changes: 26 additions & 28 deletions assets/js/app/editor/Components/Date.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,32 @@
:data-errormessage="errormessage"
>
</flat-pickr>
<div class="input-group-append">
<button
class="btn btn-tertiary"
:class="{ 'btn-outline-secondary': readonly }"
type="button"
:disabled="readonly"
data-toggle
aria-label="Date picker"
onclick="this.blur()"
>
<i class="fa fa-calendar">
<span class="sr-only" aria-hidden="true">{{ labels.toggle }}</span>
</i>
</button>
<button
class="btn btn-tertiary"
:class="{ 'btn-outline-secondary': readonly }"
type="button"
:disabled="readonly"
data-clear
aria-label="Reset date"
onclick="this.blur()"
>
<i class="fa fa-times">
<span class="sr-only" aria-hidden="true">{{ labels.clear }}</span>
</i>
</button>
</div>
<button
class="btn btn-tertiary"
:class="{ 'btn-outline-secondary': readonly }"
type="button"
:disabled="readonly"
data-toggle
aria-label="Date picker"
onclick="this.blur()"
>
<i class="fa fa-calendar">
<span class="sr-only" aria-hidden="true">{{ labels.toggle }}</span>
</i>
</button>
<button
class="btn btn-tertiary"
:class="{ 'btn-outline-secondary': readonly }"
type="button"
:disabled="readonly"
data-clear
aria-label="Reset date"
onclick="this.blur()"
>
<i class="fa fa-times">
<span class="sr-only" aria-hidden="true">{{ labels.clear }}</span>
</i>
</button>
</div>
</div>
</template>
Expand Down
4 changes: 1 addition & 3 deletions assets/js/app/editor/Components/Email.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<template>
<div>
<div class="input-group mb-2">
<div class="input-group-prepend">
<div class="input-group-text"><i class="far fa-envelope mr-0"></i></div>
</div>
<i class="input-group-text far fa-envelope me-0"></i>
<input
:id="id"
class="form-control"
Expand Down
22 changes: 11 additions & 11 deletions assets/js/app/editor/Components/Embed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<div :id="name" class="editor__embed" :name="name">
<div class="row">
<div class="col-8">
<div class="form-group">
<label for="embed-url">{{ labels.content_url }}</label>
<div class="mb-4">
<label class="form-label" for="embed-url">{{ labels.content_url }}</label>
<div class="input-group">
<input
v-model="urlData"
Expand All @@ -27,7 +27,7 @@
:aria-label="labels.refresh"
@click="updateEmbed"
>
<i :class="(loading ? 'fa-spin' : '') + ' fas fa-sync mr-0'"></i>
<i :class="(loading ? 'fa-spin' : '') + ' fas fa-sync me-0'"></i>
</button>

<button
Expand All @@ -36,15 +36,15 @@
:aria-label="labels.delete"
@click="clearEmbed"
>
<i class="fas fa-trash mr-0"></i>
<i class="fas fa-trash me-0"></i>
</button>
</span>
</div>
</div>
<div class="form-group form-inline">
<label for="embed-width-size">{{ labels.label_size }}</label>
<div class="mb-4 d-flex align-items-center">
<label class="form-label" for="embed-width-size">{{ labels.label_size }}</label>
<input
class="form-control col-2 offset-1"
class="form-control w-auto col-2 offset-1"
:name="name + '[width]'"
type="number"
:value="widthData"
Expand All @@ -54,7 +54,7 @@
×
<label for="embed-height-size" class="sr-only">{{ labels.label_height }}</label>
<input
class="form-control col-2"
class="form-control w-auto col-2"
:name="name + '[height]'"
type="number"
:value="heightData"
Expand All @@ -63,8 +63,8 @@
/>
<label>{{ labels.label_pixel }}</label>
</div>
<div class="form-group">
<label>{{ labels.label_matched_embed }}</label>
<div class="mb-4">
<label class="form-label">{{ labels.label_matched_embed }}</label>
<input
class="form-control title"
:name="name + '[title]'"
Expand Down Expand Up @@ -92,7 +92,7 @@
</div>
</div>
<div class="col-4">
<label>{{ labels.label_preview }}</label>
<label class="form-label">{{ labels.label_preview }}</label>
<div class="editor__image--preview">
<a
v-if="previewImage !== null && previewImage !== ''"
Expand Down
Loading