Compare commits
24 commits
Author | SHA1 | Date | |
---|---|---|---|
Simon Vieille | 26cbaa8469 | ||
Simon Vieille | 7897bafcc2 | ||
Simon Vieille | 63a8a60e2d | ||
Simon Vieille | d01e9d618b | ||
Simon Vieille | 96347a1730 | ||
Simon Vieille | aeb0e6c109 | ||
Simon Vieille | 64258a2d8c | ||
Simon Vieille | 70329ceeda | ||
Simon Vieille | 1adb1ebe2b | ||
Simon Vieille | f57cc8e4d6 | ||
Simon Vieille | b21967028e | ||
Simon Vieille | 5b22851674 | ||
Simon Vieille | 4082bb171a | ||
Simon Vieille | dc19617fb1 | ||
Simon Vieille | dbd2036fb0 | ||
Simon Vieille | 8e2566abc8 | ||
Simon Vieille | 66e1a9c87f | ||
Simon Vieille | 6709c0a303 | ||
Simon Vieille | 614ae40901 | ||
Simon Vieille | 430bff9433 | ||
Simon Vieille | 6441da8a27 | ||
Simon Vieille | 801e3317e7 | ||
Simon Vieille | f7604d2a45 | ||
Simon Vieille | 8a632a1b14 |
13
CHANGELOG.md
13
CHANGELOG.md
|
@ -1,5 +1,18 @@
|
|||
## [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
|
||||
|
||||
## [v1.24.0] - 2024-01-27
|
||||
### Added
|
||||
* add CSS class `no-wrap`
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace App\Core;
|
||||
|
||||
if (!defined('MURPH_VERSION')) {
|
||||
define('MURPH_VERSION', 'v1.23.0');
|
||||
define('MURPH_VERSION', 'v1.24.1');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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(() => {
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Reference in a new issue