Skip to content

Commit

Permalink
Merge pull request derekeder#33 from derekeder/ychaouche-master
Browse files Browse the repository at this point in the history
Ychaouche master
  • Loading branch information
derekeder authored Jan 17, 2017
2 parents 3ffd679 + f70525c commit 429cd43
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
21 changes: 11 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<script type="text/javascript" src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script type="text/javascript" src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>

Expand All @@ -43,14 +43,15 @@ <h2>CSV to HTML Table</h2>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.csv.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.js"></script>
<script src='js/csv_to_html_table.js'></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery.csv.min.js"></script>
<script type="text/javascript" src="js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="js/dataTables.bootstrap.js"></script>
<script type="text/javascript" src="js/csv_to_html_table.js"></script>

<script>

<script type="text/javascript">
function format_link(link){
if (link)
return "<a href='" + link + "' target='_blank'>" + link + "</a>";
Expand All @@ -59,7 +60,7 @@ <h2>CSV to HTML Table</h2>
}

CsvToHtmlTable.init({
csv_path: 'data/Health Clinics in Chicago.csv',
csv_path: 'data/Health Clinics in Chicago.csv',
element: 'table-container',
allow_download: true,
csv_options: {separator: ',', delimiter: '"'},
Expand Down
4 changes: 2 additions & 2 deletions js/csv_to_html_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ CsvToHtmlTable = {
$.when($.get(csv_path)).then(
function(data){
var csv_data = $.csv.toArrays(data, csv_options);

var table_head = "<thead><tr>";

for (head_id = 0; head_id < csv_data[0].length; head_id++) {
Expand Down Expand Up @@ -53,4 +53,4 @@ CsvToHtmlTable = {
$("#" + el).append("<p><a class='btn btn-info' href='" + csv_path + "'><i class='glyphicon glyphicon-download'></i> Download as CSV</a></p>");
});
}
}
}

0 comments on commit 429cd43

Please sign in to comment.