Skip to content

Commit

Permalink
Fixed chart.js not loading and moved remaining javascript webjars to …
Browse files Browse the repository at this point in the history
…use the npm version (#580)
  • Loading branch information
felixoi authored and phase committed Jul 20, 2018
1 parent 9d77776 commit ee7310f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/views/bootstrap/layout.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<meta name="theme-color" content="#333">

@if(scripts) {
<script type="text/javascript" src="@routes.Assets.at("lib/jquery/jquery.min.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("lib/jquery/dist/jquery.min.js")"></script>
}
</head>
<body class="site">
Expand All @@ -52,7 +52,7 @@
<script type="text/javascript" src="@routes.Assets.at("lib/moment/min/moment.min.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("bootstrap/js/bootstrap.min.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("lib/filesize/lib/filesize.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("lib/clipboard/clipboard.min.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("lib/clipboard/dist/clipboard.min.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("highlight/highlight.pack.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/main.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/svg.js")"></script>
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/admin/stats.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h4 class="panel-title pull-left">Flags</h4>
</div>
</div>
</div>
<script nonce="@nonce" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"></script>
<script nonce="@nonce" type="text/javascript" src="@routes.Assets.at("lib/chart.js/dist/Chart.min.js")"></script>
<script nonce="@nonce">
$(function(){
var domChartReview = document.getElementById("chart-reviews");
Expand Down
7 changes: 4 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ libraryDependencies ++= Seq(
"com.vladsch.flexmark" % "flexmark-ext-typographic" % "0.34.0",
"com.vladsch.flexmark" % "flexmark-ext-wikilink" % "0.34.0",

"org.webjars" % "jquery" % "2.2.4",
"org.webjars" % "font-awesome" % "4.7.0",
"org.webjars.npm" % "jquery" % "2.2.4",
"org.webjars.npm" % "font-awesome" % "4.7.0",
"org.webjars.npm" % "filesize" % "3.6.1",
"org.webjars.npm" % "moment" % "2.22.2",
"org.webjars.bowergithub.zenorocha" % "clipboard.js" % "2.0.1"
"org.webjars.npm" % "clipboard" % "2.0.1",
"org.webjars.npm" % "chart.js" % "2.7.2"
)

unmanagedResourceDirectories in Test += (baseDirectory.value / "target/web/public/test")

0 comments on commit ee7310f

Please sign in to comment.