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