Compare commits

...

23 commits

Author SHA1 Message Date
Simon Vieille 26cbaa8469 Merge branch 'develop' 2024-05-03 17:58:22 +02:00
Simon Vieille 7897bafcc2
fix undefined window.tinymce.murph 2024-05-03 17:57:43 +02:00
Simon Vieille 63a8a60e2d Merge branch 'develop' 2024-03-31 16:57:56 +02:00
Simon Vieille d01e9d618b
add border color on tinymce editor 2024-03-31 16:57:46 +02:00
Simon Vieille 96347a1730 Merge branch 'develop' 2024-03-31 16:50:47 +02:00
Simon Vieille aeb0e6c109 allow to use window.tinymceModes to add or override tinymce modes 2024-03-31 16:50:18 +02:00
Simon Vieille 64258a2d8c Merge branch 'develop' 2024-03-25 15:27:12 +01:00
Simon Vieille 70329ceeda
fix template of CrudController (maker) 2024-03-25 15:27:06 +01:00
Simon Vieille 1adb1ebe2b Merge branch 'develop' 2024-03-25 13:04:17 +01:00
Simon Vieille f57cc8e4d6
fix hidden save button in file manager 2024-03-25 13:04:16 +01:00
Simon Vieille b21967028e Merge branch 'develop' 2024-03-25 13:03:01 +01:00
Simon Vieille 5b22851674
fix hidden save button in file manager 2024-03-25 13:02:20 +01:00
Simon Vieille 4082bb171a
fix use of IsGranted is CrudController 2024-02-04 16:48:44 +01:00
Simon Vieille dc19617fb1 Merge branch 'develop' 2024-02-04 16:33:34 +01:00
Simon Vieille dbd2036fb0
rollback commit 614ae40 (add IsGranted in all methods of the CrudController maker template) 2024-02-04 16:33:30 +01:00
Simon Vieille 8e2566abc8
rollback commit 614ae40 (add IsGranted in all methods of the CrudController maker template) 2024-02-04 16:33:22 +01:00
Simon Vieille 66e1a9c87f
rollback commit 614ae40 (add IsGranted in all methods of the CrudController maker template) 2024-02-04 16:31:21 +01:00
Simon Vieille 6709c0a303
update changelog 2024-02-04 16:17:49 +01:00
Simon Vieille 614ae40901 add IsGranted in all methods of the CrudController maker template 2024-02-04 16:16:22 +01:00
Simon Vieille 430bff9433
fix default crud sort 2024-02-02 20:04:19 +01:00
Simon Vieille 6441da8a27
fix default crud sort 2024-02-02 20:03:57 +01:00
Simon Vieille 801e3317e7
update changelog 2024-02-02 20:02:00 +01:00
Simon Vieille f7604d2a45
fix default crud sort 2024-02-02 20:01:23 +01:00
6 changed files with 42 additions and 20 deletions

View file

@ -1,5 +1,14 @@
## [Unreleased]
### Added
* allow to use `window.tinymceModes` to add or override tinymce modes
* add border color on tinymce editor
### Fixed
* fix default crud sort
* fix hidden save button in file manager
* fix template of CrudController (maker)
* fix undefined `window.tinymce.murph`
## [v1.24.1] - 2024-02-01
### Fixed
* update Murph version constant

View file

@ -424,15 +424,14 @@ abstract class CrudController extends AdminController
$sessionSortName = sprintf('%s_label', $sessionId);
$sessionSortDirection = sprintf('%s_direction', $sessionId);
$name = $request->query->get(
'_sort',
$session->get($sessionSortName, $defaultSort['label'] ?? null)
);
$name = $request->query->get('_sort', $session->get($sessionSortName)) ?? $defaultSort['label'] ?? null;
$direction = strtolower($request->query->get(
'_sort_direction',
$session->get($sessionSortDirection, $defaultSort['direction'] ?? 'asc')
));
$direction = strtolower(
$request->query->get(
'_sort_direction',
$session->get($sessionSortDirection)
) ?? $defaultSort['direction'] ?? 'asc'
);
$session->set($sessionSortName, $name);
$session->set($sessionSortDirection, $direction);

View file

@ -744,8 +744,15 @@ label.required::after {
background: map-get($theme-colors, 'dark-blue');
}
.tox.tox-silver-sink.tox-tinymce-aux {
z-index: 3000 !important;
.tox {
&.tox-silver-sink.tox-tinymce-aux {
z-index: 3000 !important;
}
&.tox-tinymce {
border-color: $input-border-color;
border-radius: 5px;
}
}
.field-boolean {

View file

@ -53,7 +53,7 @@ const fileManagerBrowser = function (callback) {
})
}
if (typeof window.tinymce !== 'undefined') {
const createTinymceConfig = function () {
window.tinymce.murph = window.tinymce.murph || {}
window.tinymce.murph.selector = window.tinymce.murph.selector || '*[data-tinymce]'
window.tinymce.murph.configurationBase = window.tinymce.murph.configurationBase || {
@ -80,6 +80,7 @@ if (typeof window.tinymce !== 'undefined') {
}
window.tinymce.murph.modes = window.tinymce.murph.modes || {}
window.tinymceModes = window.tinymceModes || {}
window.tinymce.murph.modes.default = window.tinymce.murph.modes.default || {
plugins: 'print preview importcss searchreplace visualblocks visualchars fullscreen template table charmap hr pagebreak nonbreaking toc insertdatetime advlist lists wordcount textpattern noneditable help charmap quickbars link image code autoresize',
@ -95,6 +96,11 @@ if (typeof window.tinymce !== 'undefined') {
toolbar: 'undo redo | bold italic underline'
}
window.tinymce.murph.modes = {
...window.tinymce.murph.modes,
...window.tinymceModes
}
tinymce.addI18n('fr_FR', {
Redo: 'R\u00e9tablir',
Undo: 'Annuler',
@ -612,17 +618,14 @@ const doInitEditor = () => {
}
module.exports = function () {
if (typeof tinymce === 'undefined') {
return
}
const observer = new MutationObserver(doInitEditor)
const config = { attributes: false, childList: true, subtree: true }
observer.observe(document.querySelector('body'), config)
$(() => {
createTinymceConfig()
doInitEditor()
const observer = new MutationObserver(doInitEditor)
const config = { attributes: false, childList: true, subtree: true }
observer.observe(document.querySelector('body'), config)
$('body').on('hidden.bs.modal', '.modal', (e) => {
if (!$('.tox-dialog').length) {
$(e.target).find('.tox-tinymce').each(() => {

View file

@ -11,11 +11,11 @@ use <?php echo $entity; ?> as Entity;
use <?php echo $factory; ?> as Factory;
use <?php echo $form; ?> as Type;
use <?php echo $repository_query; ?> as RepositoryQuery;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
class <?php echo $class_name; ?> extends CrudController
{

View file

@ -197,6 +197,10 @@
</div>
<div>
{% if splInfo.isFile and not isLocked %}
<button type="submit" class="btn btn-primary" form="form-fm-attributes">{{ 'Save'|trans }}</button>
{% endif %}
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ 'Close'|trans }}</button>
</div>
{% endif %}