@@ -57,10 +57,7 @@ class ScoverageHtmlWriter(sourceDirectory: File, outputDir: File) {
57
57
<title id =' title' >
58
58
{filename}
59
59
</title >
60
- <link rel =" stylesheet" href =" http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" />
61
- <script src =" http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" ></script >
62
- <script src =" http://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js" ></script >
63
- <script src =" http://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.18.3/addons/pager/jquery.tablesorter.pager.min.js" ></script >
60
+ {plugins}
64
61
<style >
65
62
{css}
66
63
</style >
@@ -135,21 +132,13 @@ class ScoverageHtmlWriter(sourceDirectory: File, outputDir: File) {
135
132
| overflow: hidden;
136
133
|}""" .stripMargin
137
134
138
- val tableScript = """ $(document).ready(function() {$("#packages").tablesorter();});"""
139
-
140
135
<head >
141
136
<meta http-equiv =" Content-Type" content =" text/html; charset=utf-8" />
142
137
<title id =' title' >Scoverage Code Coverage </title >
143
- <link rel =" stylesheet" href =" http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" />
144
- <script src =" http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" ></script >
145
- <script src =" http://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js" ></script >
146
- <script src =" http://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.18.3/addons/pager/jquery.tablesorter.pager.min.js" ></script >
138
+ {plugins}
147
139
<style >
148
140
{css}
149
141
</style >
150
- <script >
151
- {tableScript}
152
- </script >
153
142
</head >
154
143
}
155
144
@@ -282,10 +271,7 @@ class ScoverageHtmlWriter(sourceDirectory: File, outputDir: File) {
282
271
<title id =' title' >
283
272
Scoverage Code Coverage
284
273
</title >
285
- <link rel =" stylesheet" href =" http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" />
286
- <script src =" http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" ></script >
287
- <script src =" http://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js" ></script >
288
- <script src =" http://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.18.3/addons/pager/jquery.tablesorter.pager.min.js" ></script >
274
+ {plugins}
289
275
</head >
290
276
<body style =" font-family: monospace;" >
291
277
<table class =" table table-striped" style =" font-size: 13px" >
@@ -314,7 +300,7 @@ class ScoverageHtmlWriter(sourceDirectory: File, outputDir: File) {
314
300
}
315
301
316
302
def risks (coverage : Coverage , limit : Int ) = {
317
- <table id = " packages " class =" table table-striped" style =" font-size: 12px" >
303
+ <table class =" tablesorter table table-striped" style =" font-size: 12px" >
318
304
<thead >
319
305
<tr >
320
306
<th >
@@ -535,5 +521,16 @@ class ScoverageHtmlWriter(sourceDirectory: File, outputDir: File) {
535
521
</tr >
536
522
</table >
537
523
}
524
+
525
+ def plugins = {
526
+ <script src =" http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" ></script >
527
+ <link rel =" stylesheet" href =" https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.20.1/css/theme.default.min.css" type =" text/css" />
528
+ <script src =" http://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.20.1/js/jquery.tablesorter.min.js" ></script >
529
+ <link rel =" stylesheet" href =" http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" type =" text/css" />
530
+ <script src =" http://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js" ></script >
531
+ <script type =" text/javascript" >
532
+ {xml.Unparsed (""" $(document).ready(function() {$(".tablesorter").tablesorter();});""" )}
533
+ </script >
534
+ }
538
535
}
539
536
0 commit comments