Skip to content

Commit

Permalink
Clean code and add to CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
RamezIssac committed Oct 1, 2023
1 parent c02e5c8 commit 49d9de5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 32 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file.

## [1.1.2] - 2023-09-29
- Enhance Chartjs internal
- Moving all css and js resources to be handled by `Media` governed by `settings.SLICK_REPORTING_SETTINGS`
- Add ``get_slick_reporting_media`` and ``get_charts_media`` templatetags
- Simplify adding export options and customizing the builtin export to csv button
- Simplify adding custom buttons to the report page

## [1.1.1] - 2023-09-25
- Change settings to be a dict , adding support JQUERY_URL and FONT AWESOME customization #79 & #81
- Fix issue with chartjs not being loaded #80
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,6 @@
'datasets': datasets,
}
}
// for (let i = 0; i < response.data.length; i++) {
// let row = response.data[i];
// if (titleFieldName !== '') {
// let txt = row[titleFieldName];
// txt = $(txt).text() || txt; // the title is an <a tag , we want teh text only
// legendResults.push(txt)
// }
// datasetData.push(row[dataFieldName])
// }
let results = getGroupByLabelAndSeries(response, chartOptions);
datasets = [{
data: results.series,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@
});

jQuery(document).ready(function () {
// $.slick_reporting.defaults.total_label = "{% trans "Total" %}";
$.slick_reporting.report_loader.initialize();
});

Expand Down
22 changes: 0 additions & 22 deletions slick_reporting/templates/slick_reporting/js_resources.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,10 @@
{% add_jquery %}
{% get_slick_reporting_media as media %}
{{ media }}
{#<script src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>#}
{#<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/select2.min.css" rel="stylesheet"/>#}
{#<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/select2.min.js"#}
{# integrity="sha384-JnbsSLBmv2/R0fUmF2XYIcAEMPHEAO51Gitn9IjL4l89uFTIgtLF1+jqIqqd9FSk"#}
{# crossorigin="anonymous"></script>#}

{#<script src="https://cdn.datatables.net/1.13.4/js/jquery.dataTables.min.js"></script>#}
{#<script src="https://cdn.datatables.net/1.13.4/js/dataTables.bootstrap5.min.js"></script>#}
{#<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.4/css/dataTables.bootstrap5.min.css"/>#}

<link rel="stylesheet" type="text/css"
href="{{ slick_reporting_settings.FONT_AWESOME.CSS_URL }}"/>


{#<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>#}
{#<script src="https://code.highcharts.com/highcharts.js"></script>#}


{#<script src="{% static 'slick_reporting/slick_reporting.js' %}"></script>#}
{#<script src="{% static 'slick_reporting/slick_reporting.report_loader.js' %}"></script>#}
{#<script src="{% static 'slick_reporting/slick_reporting.highchart.js' %}"></script>#}
{#<script src="{% static 'slick_reporting/slick_reporting.chartsjs.js' %}"></script>#}
{#<script src="{% static 'slick_reporting/slick_reporting.datatable.js' %}"></script>#}

{#<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>#}

{{ slick_reporting_settings|json_script:"slick_reporting_settings" }}
<script>

Expand Down

0 comments on commit 49d9de5

Please sign in to comment.