Skip to content

Commit

Permalink
load panel HTML after all core JS is loaded, to ensure that inline `<…
Browse files Browse the repository at this point in the history
…script>` tags aren't loaded before core JS
  • Loading branch information
Alex Van Camp committed Mar 13, 2015
1 parent 0e99421 commit ebd14f9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/dashboard/public/dashboard.jade
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ html(lang="en")
//- Spacer
p

//- Bundle panels
div.container
div.dashboard-panels
each bundle in bundles
+panels(bundle)

//- Core JavaScript
script(src='/components/jquery/dist/jquery.min.js')
script(src='/components/bootstrap/dist/js/bootstrap.min.js')
Expand Down Expand Up @@ -110,6 +104,14 @@ html(lang="en")

script(src='/dashboard/dashboard.js')

//- Bundle panels
We load these after all JS is loaded to ensure that any scripts declared inline are loaded after
all the core JS is loaded.
div.container
div.dashboard-panels
each bundle in bundles
+panels(bundle)

//- Bundle javascript
each bundle in bundles
//- only add the tag if there is a script, empty tags can cause long timeout delays
Expand Down

0 comments on commit ebd14f9

Please sign in to comment.