Skip to content

Commit

Permalink
Merge pull request #23 from developeregrem/pve-8
Browse files Browse the repository at this point in the history
Pve 8
  • Loading branch information
developeregrem authored Jan 4, 2020
2 parents 51685a0 + 560604d commit 182f97e
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 45 deletions.
78 changes: 39 additions & 39 deletions config/services.yaml
Original file line number Diff line number Diff line change
@@ -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%'
10 changes: 9 additions & 1 deletion templates/Templates/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
});
</script>
{% endblock %}
10 changes: 5 additions & 5 deletions templates/Templates/templates_form_input_fields.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
});
</script>

0 comments on commit 182f97e

Please sign in to comment.