diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/postrunner/TrackView.rb | 9 | ||||
-rw-r--r-- | lib/postrunner/ViewFrame.rb | 3 |
2 files changed, 8 insertions, 4 deletions
diff --git a/lib/postrunner/TrackView.rb b/lib/postrunner/TrackView.rb index ff1f0be..3500972 100644 --- a/lib/postrunner/TrackView.rb +++ b/lib/postrunner/TrackView.rb @@ -39,16 +39,19 @@ module PostRunner doc.link({ 'rel' => 'stylesheet', 'href' => 'openlayers/ol.css', 'type' => 'text/css' }) - doc.script({ 'src' => 'openlayers/ol.js' }) - doc.script({ 'src' => 'postrunner/trackview.js' }) + doc.script({ 'language' => 'javascript', 'type' => 'text/javascript', + 'src' => 'openlayers/ol.js' }) + doc.script({ 'language' => 'javascript', 'type' => 'text/javascript', + 'src' => 'postrunner/trackview.js' }) } doc.script(java_script) - doc.body_init_script('pr_trackview_init_xy()') } ViewFrame.new('map', 'Map', 600, nil, true) { doc.div({ 'id' => 'map', 'class' => 'trackmap' }) }.to_html(doc) + + doc.body_init_script('pr_trackview_init_xy();') end private diff --git a/lib/postrunner/ViewFrame.rb b/lib/postrunner/ViewFrame.rb index aa416d0..635d297 100644 --- a/lib/postrunner/ViewFrame.rb +++ b/lib/postrunner/ViewFrame.rb @@ -40,7 +40,8 @@ module PostRunner # Add the necessary style sheet snippets to the document head. doc.head { doc.style(style) - doc.script({ 'src' => 'postrunner/postrunner.js' }) + doc.script({ 'language' => 'javascript', 'type' => 'text/javascript', + 'src' => 'postrunner/postrunner.js' }) } } doc.head { |