1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-23 13:23:18 +02:00

refactor(admin-plugin): move js code from base.html #186

new: tail section for base.html
This commit is contained in:
Awilum
2019-08-26 23:33:21 +03:00
parent 383cc6ac14
commit 6639ef9e1c
2 changed files with 12 additions and 6 deletions

View File

@@ -253,6 +253,8 @@
{% include "plugins/admin/views/partials/custom-file-input.html" %}
{% include "plugins/admin/views/partials/trumbowyg.html" %}
{% block tail %}{% endblock %}
<script type="text/javascript">
$(document).ready(function() {
@@ -277,12 +279,6 @@
$('.js-plugin-license-placeholder').html($(this).attr('data-license'));
});
$('.js-snippets-info').click(function () {
$('#snippetsInfoModal').modal();
$('.js-snippets-snippet-placeholder').html($(this).attr('data-name'));
$('.js-snippets-php-placeholder').html($(this).attr('data-name'));
});
$('.js-entries-image-preview').click(function () {
$('#entriesImagePreview').modal();
$('.js-entry-image-preview-placeholder').css('background-image', 'url(' + $(this).attr('data-image-url') + ')');

View File

@@ -86,3 +86,13 @@
</div>
</div>
{% endblock %}
{% block tail %}
<script type="text/javascript">
$('.js-snippets-info').click(function () {
$('#snippetsInfoModal').modal();
$('.js-snippets-snippet-placeholder').html($(this).attr('data-name'));
$('.js-snippets-php-placeholder').html($(this).attr('data-name'));
});
</script>
{% endblock %}