diff --git a/config/services.yaml b/config/services.yaml index a8976e3..b866c03 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -1,39 +1,39 @@ -# Put parameters here that don't need to change on each machine where the app is deployed -# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration -parameters: - locale: '%env(LOCALE)%' - fromMail: '%env(FROM_MAIL)%' - fromName: '%env(FROM_NAME)%' - returnPath: '%env(RETURN_PATH)%' - mailHost: '%env(MAIL_HOST)%' - version: '1.2.0' - -services: - # default configuration for services in *this* file - _defaults: - autowire: true # Automatically injects dependencies in your services. - autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. - public: false # Allows optimizing the container by removing unused services; this also means - # fetching services directly from the container via $container->get() won't work. - # The best practice is to be explicit about your dependencies anyway. - - # makes classes in src/ available to be used as services - # this creates a service per class whose id is the fully-qualified class name - App\: - resource: '../src/*' - exclude: '../src/{Entity,Migrations,Tests,Kernel.php}' - - # controllers are imported separately to make sure services can be injected - # as action arguments even if you don't extend any base controller class - App\Controller\: - resource: '../src/Controller' - tags: ['controller.service_arguments'] - - # add more service definitions when explicit configuration is needed - # please note that last definitions always *replace* previous ones - App\Controller\TemplatesServiceController: - arguments: - - '%fromMail%' - - '%fromName%' - - '%mailHost%' - - '%returnPath%' +# Put parameters here that don't need to change on each machine where the app is deployed +# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration +parameters: + locale: '%env(LOCALE)%' + fromMail: '%env(FROM_MAIL)%' + fromName: '%env(FROM_NAME)%' + returnPath: '%env(RETURN_PATH)%' + mailHost: '%env(MAIL_HOST)%' + version: '1.2.1' + +services: + # default configuration for services in *this* file + _defaults: + autowire: true # Automatically injects dependencies in your services. + autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. + public: false # Allows optimizing the container by removing unused services; this also means + # fetching services directly from the container via $container->get() won't work. + # The best practice is to be explicit about your dependencies anyway. + + # makes classes in src/ available to be used as services + # this creates a service per class whose id is the fully-qualified class name + App\: + resource: '../src/*' + exclude: '../src/{Entity,Migrations,Tests,Kernel.php}' + + # controllers are imported separately to make sure services can be injected + # as action arguments even if you don't extend any base controller class + App\Controller\: + resource: '../src/Controller' + tags: ['controller.service_arguments'] + + # add more service definitions when explicit configuration is needed + # please note that last definitions always *replace* previous ones + App\Controller\TemplatesServiceController: + arguments: + - '%fromMail%' + - '%fromName%' + - '%mailHost%' + - '%returnPath%' diff --git a/templates/Templates/index.html.twig b/templates/Templates/index.html.twig index b411a6b..04de44d 100644 --- a/templates/Templates/index.html.twig +++ b/templates/Templates/index.html.twig @@ -105,6 +105,14 @@ $("#editor1").val(tinymce.get("editor1").getContent()); _doPost('#entry-form-new', url, '{{ path('settings.templates.overview') }}'); return false; - } + } + + // workaround for tinymce in a bootstrap modal, when opening a tinymce modal, events are not working anymore + // like dropdown in the template plugin or selecting text in the code plugin + $(document).on('focusin', function(e) { + if ($(e.target).closest(".tox-dialog").length) { + e.stopImmediatePropagation(); + } + }); {% endblock %} diff --git a/templates/Templates/templates_form_input_fields.html.twig b/templates/Templates/templates_form_input_fields.html.twig index 52a478f..0444577 100644 --- a/templates/Templates/templates_form_input_fields.html.twig +++ b/templates/Templates/templates_form_input_fields.html.twig @@ -97,9 +97,9 @@ }, }); - $("#template-type").change(function() { - let newTemplateUrl = templateUrl.replace("placeholder", $(this).val()); - tinymce.activeEditor.settings.templates = newTemplateUrl; - }); - }); + $("#template-type").change(function() { + let newTemplateUrl = templateUrl.replace("placeholder", $(this).val()); + tinymce.activeEditor.settings.templates = newTemplateUrl; + }); + }); \ No newline at end of file