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:
@@ -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') + ')');
|
||||
|
@@ -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 %}
|
||||
|
Reference in New Issue
Block a user