N°3123 - DisplayBock BlockCvs

This commit is contained in:
Eric
2020-12-08 16:29:16 +01:00
parent 10c3f9f633
commit b8a42843e0
10 changed files with 149 additions and 33 deletions

View File

@@ -0,0 +1,29 @@
{# @copyright Copyright (C) 2010-2020 Combodo SARL #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
{% apply spaceless %}
<div id="{{ oUIBlock.GetId() }}" class="{{ oUIBlock.GetBlockCode() }}">
<div>
<table style="width:100%" class="transparent">
<tr>
<td><a href="{{ oUIBlock.sDownloadLink }}">{{ 'UI:Download-CSV'|dict_format(oUIBlock.sCsvFile) }}</a>{{ oUIBlock.sCharsetNotice }}</td>
<td style="text-align:right">
<input type="checkbox" {{ oUIBlock.sChecked }} onClick="window.location.href='{{ oUIBlock.sLinkToToggle }}'">
&nbsp;{{ 'UI:CSVExport:AdvancedMode'|dict_s }}
</td>
</tr>
</table>
{% if oUIBlock.bAdvancedMode %}
<p>
{{ 'UI:CSVExport:AdvancedMode+'|dict_s }}
</p>
{% endif %}
</div>
<div id="csv_content_loading">
<div style="width: 250px; height: 20px; background: url(../setup/orange-progress.gif); border: 1px #999 solid; margin-left:auto; margin-right: auto; text-align: center;">
{{ 'UI:Loading'|dict_s }}
</div>
</div>
<textarea id="csv_content" style="display:none;"></textarea>
</div>
{% endapply %}

View File

@@ -0,0 +1,12 @@
{# @copyright Copyright (C) 2010-2020 Combodo SARL #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
{% apply spaceless %}
$.post(
'{{ oUIBlock.sAjaxLink|raw }}',
{{ oUIBlock.sJsonParams|raw }},
function(data) {
$('#csv_content').html(data);
$('#csv_content_loading').hide();
$('#csv_content').show();
});
{% endapply %}