diff options
| author | anicet | 2015-06-15 15:50:43 +0200 |
|---|---|---|
| committer | anicet | 2015-06-16 10:45:54 +0200 |
| commit | 1f21fe9db19049d7d1052efb4928b67dc640c9eb (patch) | |
| tree | d0c3dab46a58eefb5fcd0ddbc8042614fcc057dd /app/assets/javascripts/partials | |
| parent | bde2f4c0018ebdc3b9cca5047e61ab517556b78b (diff) | |
| download | chouette-core-1f21fe9db19049d7d1052efb4928b67dc640c9eb.tar.bz2 | |
Ie Report : split file and line in partials
Diffstat (limited to 'app/assets/javascripts/partials')
| -rw-r--r-- | app/assets/javascripts/partials/ie_report.js.coffee.erb | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/app/assets/javascripts/partials/ie_report.js.coffee.erb b/app/assets/javascripts/partials/ie_report.js.coffee.erb index bff2ae315..8087071cb 100644 --- a/app/assets/javascripts/partials/ie_report.js.coffee.erb +++ b/app/assets/javascripts/partials/ie_report.js.coffee.erb @@ -1,6 +1,6 @@ $(".imports.show, .exports.show, .compliance_checks.show").ready -> - get_export_results = (html_container, html_element) -> + getFileResults = (html_container, html_element) -> html_container.children().each -> if($(this).is(html_element)) $(this).show() @@ -27,28 +27,15 @@ $(".imports.show, .exports.show, .compliance_checks.show").ready -> colors: [ "#e22b1b", "#898e7f", "#8fc861" ] }).on('click', update = (i, row) -> switch i - when 0 then get_export_results($(".report"), $(".files_error")) - when 1 then get_export_results($(".report"), $(".files_ignored")) - when 2 then get_export_results($(".report"), $(".files_ok")) + when 0 then getFileResults($(".results"), $(".files_error")) + when 1 then getFileResults($(".results"), $(".files_ignored")) + when 2 then getFileResults($(".results"), $(".files_ok")) ) - get_export_results($(".report"), $(".files_error")) + getFileResults($(".results"), $(".files_error")) if $( "#files_statistics" ).length getFileStatistics('files_statistics') - $('#ie_tab a.ie_tab_file').click (e) -> - e.preventDefault() - $('#ie_tab_line').hide() - $(this).tab('show') - $('#files_statistics, .caption').show() - get_export_results($(".report"), $(".files_error")) - - $('#ie_tab a.ie_tab_line').click (e) -> - e.preventDefault() - $(this).tab('show') - $('#files_statistics, .caption').hide() - get_export_results( $(".report"), $("div.lines")) - refreshInterval = $(".report").data("refresh-interval") if refreshInterval > 0 reloadPage = () -> window.location.reload() |
