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

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

This commit is contained in:
Awilum
2019-08-26 23:40:38 +03:00
parent 6639ef9e1c
commit e31fbd65b6
2 changed files with 17 additions and 14 deletions

View File

@@ -266,19 +266,6 @@
$("#form").submit();
});
$('.js-plugins-info').click(function () {
$('#pluginInfoModal').modal();
$('.js-plugin-name-placeholder').html($(this).attr('data-name'));
$('.js-plugin-version-placeholder').html($(this).attr('data-version'));
$('.js-plugin-description-placeholder').html($(this).attr('data-description'));
$('.js-plugin-author-name-placeholder').html($(this).attr('data-author-name'));
$('.js-plugin-author-email-placeholder').html($(this).attr('data-author-email'));
$('.js-plugin-author-url-placeholder').html($(this).attr('data-author-url'));
$('.js-plugin-homepage-placeholder').html($(this).attr('data-homepage'));
$('.js-plugin-bugs-placeholder').html($(this).attr('data-bugs'));
$('.js-plugin-license-placeholder').html($(this).attr('data-license'));
});
$('.js-entries-image-preview').click(function () {
$('#entriesImagePreview').modal();
$('.js-entry-image-preview-placeholder').css('background-image', 'url(' + $(this).attr('data-image-url') + ')');

View File

@@ -73,5 +73,21 @@
</div>
</div>
</div>
{% endblock %}
{% block tail %}
<script type="text/javascript">
$('.js-plugins-info').click(function () {
$('#pluginInfoModal').modal();
$('.js-plugin-name-placeholder').html($(this).attr('data-name'));
$('.js-plugin-version-placeholder').html($(this).attr('data-version'));
$('.js-plugin-description-placeholder').html($(this).attr('data-description'));
$('.js-plugin-author-name-placeholder').html($(this).attr('data-author-name'));
$('.js-plugin-author-email-placeholder').html($(this).attr('data-author-email'));
$('.js-plugin-author-url-placeholder').html($(this).attr('data-author-url'));
$('.js-plugin-homepage-placeholder').html($(this).attr('data-homepage'));
$('.js-plugin-bugs-placeholder').html($(this).attr('data-bugs'));
$('.js-plugin-license-placeholder').html($(this).attr('data-license'));
});
</script>
{% endblock %}