Interactive interface for browsing global, full-resolution satellite imagery
Intro and outro dialogs now from tour html file
Mike McGann490c69fbb20d
diff --git a/web/index.html b/web/index.htmlindex ed0cc3a3e..b704f4037 100644--- a/web/index.html+++ b/web/index.html@@ -303,6 +303,6 @@</div></div>- <ol id="joyRideTipContent" class="tour"></ol>+ <div id="wv-tour-content"></div></body></html>diff --git a/web/js/ui/wv.ui.js b/web/js/ui/wv.ui.jsindex bfe526d6f..96174ab37 100644--- a/web/js/ui/wv.ui.js+++ b/web/js/ui/wv.ui.js@@ -177,7 +177,7 @@ wv.ui = (function(self) {closeComponent("wv-menu", closeMenu);};- self.getDialog = function(marker) {+ self.getDialog = function(marker, exclusive) {self.close(marker);return getComponent(marker || "wv-dialog", closeDialog);};diff --git a/web/js/wv.tour.js b/web/js/wv.tour.jsindex 18cbe8fbd..00bf458eb 100644--- a/web/js/wv.tour.js+++ b/web/js/wv.tour.js@@ -60,9 +60,8 @@ wv.tour = wv.tour || function(models, ui, config) {return;}- $content = $("#joyRideTipContent");+ $content = $("#wv-tour-content");if ( $content.children().length === 0 ) {- console.log("loading");$content.load("pages/tour.html", function() { onLoad(introduction); });} else {onLoad(introduction);@@ -70,49 +69,12 @@ wv.tour = wv.tour || function(models, ui, config) {};var onLoad = function(introduction) {- console.log("loaded");var padding = 15; // padding - used for all of the tour windowsvar pos, width, height, xval, yval; // helpful calculation vars- var finalRow = "";- if(introduction) {- finalRow = "<td colspan='2'><p id='dontShowP' class=\"splash\"><input id='dontShowAgain' type='checkbox'>Do not show again (Access from <i class='fa fa-info-circle fa-fw'></i> menu)</p></td>";- }- var item = "<div class=\"splash\">"+- "<center>"+- "<p class=\"splashwelcome\">This application allows you to interactively browse global satellite imagery within hours of it being acquired. Use the features described below to find interesting imagery, save and share what you find, and download the underlying data.</p>"+- "</br></br>"+- "<table id=\"splashTable\" class=\"splash\">"+- "<tr>"+- "<td><img src=\"images/tour/layer-picker-0.7.png\" alt=\"Layer Picker\" width=\"150\" height=\"93\" class=\"splash\"/></td>"+- "<td><img src=\"images/tour/time-slider-0.7.png\" alt=\"Time Slider\" width=\"150\" height=\"78\" class=\"splash\"/></td>"+- "<td><img src=\"images/tour/toolbar-0.7.png\" alt=\"Toolbar\" width=\"124\" height=\"50\" class=\"splash\"/></td>"+- "<td><img src=\"images/tour/map-0.7.png\" alt=\"Map\" width=\"100\" height=\"75\" class=\"splash\"/></td>"+- "</tr>"+- "<tr class='splash-info'>"+- "<td class='splash-info'><p class=\"splash\">Use the <span class=\"highlight\">Layer Picker</span> on the left to choose the type of imagery to display on the map. It also has a tab to download the underlying data.</p></td>"+- "<td class='splash-info'><p class=\"splash\">Use the <span class=\"highlight\">Time Slider</span> on the bottom to choose the date of the observations.</p></td>"+- "<td class='splash-info'><p class=\"splash\">Use the <span class=\"highlight\">Tool Bar</span> at the top to see other tools for changing and saving the view.</p></td>"+- "<td class='splash-info'><p class=\"splash\">Use the <span class=\"highlight\">Map</span> itself to pan or zoom in on an area.</p></td>"+- "</tr>"+- "<tr>"+- "<td><p></p></td>"+- "</tr>"+- "<tr>"+- "<td rowspan=\"2\" colspan=\"4\"><p style='text-align:center;'><button id='takeTour' type='button' class=\"takeTour\"; background-image:url('../images/splash-button.png')\">Take Tour</button><button id='skipTour' type='button' class=\"skipTour\">Skip Tour</button></p></td>"+- //"<td rowspan=\"2\" colspan=\"2\"><button id='skipTour' type='button' class=\"skipTour\">Skip Tour</button></td>"+- "</tr>"+- "<tr></tr>"+- "<tr>"+- finalRow +- "</tr>"+- "</table>"+- "</center>"+- "</div>";-- var $startDialog = wv.ui.getDialog();+ wv.ui.close();+ var $startDialog = $("#wv-tour-intro");$startDialog- .html(item).dialog({title: "Welcome to @NAME@!",dialogClass: "tour",@@ -123,110 +85,12 @@ wv.tour = wv.tour || function(models, ui, config) {resizable: false});- /*- splashOverlay = new YAHOO.widget.Panel("splash", { zIndex:1020, visible:false, modal:true, draggable:false, } );-- splashOverlay.setBody(item);- splashOverlay.show();- */+ if ( introduction ) {+ $("#wv-tour-skip").show();+ } else {+ $("#wv-tour-skip").hide();+ }- /* set up all of the callout panels */- /*- var baseLayers = "<div>"+- "<h3>Layer Picker - Base Layers</h3>"+- "</br></br>"+- "<p class='tour'>A <span class='highlight'>Base Layer</span> is an opaque background image - you can have multiple active base layers, but you can only show one at a time.</p>"+- "<p class='tour'>There are several ways to interact with the layers: </p>" +- "<ul class='tour'>"+- "<li>Use the <img style='height: 14px' src=\"images/visible.png\"/> icon to show and hide layers.</li>" +- "<li>Use the <img style='height: 14px' src=\"images/close-x.png\"/> icon to remove layers.</li>"+- "<li>Drag the layers to rearrange them.</li>" +- "</ul>"+- "<p class='tour'> <span class='tryIt'>Try It!</span></p>"+- "<ul class='tour'>"+- "<li>Click on the <img style='height: 14px' src='images/visible.png'/> for \"Corrected Reflectance (True Color) Aqua / MODIS\" under Base Layers.</li>" +- "<li>Drag \"Corrected Reflectance (True Color) Aqua / MODIS\" to the bottom of the list. Notice how the map changes.</li>" +- "<li>Drag \"Corrected Reflectance (True Color) Aqua / MODIS\" back to the top of the list.</li>" +- "</ul>"+- "</br>"+- "</div>";- document.getElementById("wv-tour-base-layers").innerHTML = baseLayers;-- var overlayLayers = "<div>"+- "<h3>Layer Picker - Continued</h3>"+- "</br></br>"+- "<p class='tour'>An <span class='highlight'>Overlay</span> is a partially transparent layer to view on top of the background - you can view multiple overlays at once. If an overlay has a color bar, you can click the color bar and select a new color palette."+- "<p>On the <i class=\"productsIcon selected icon-add\"></i> tab, you can use the drop down list or the search bar to find and add layers.</p> "+- "<p>On the <i class=\"productsIcon selected icon-download\"></i> tab, you can download data for layers you are currently viewing.</p> "+- "<p class='tour'> <span class='tryIt'>Try It!</span></p>"+- "<ul class='tour'>"+- "<li>Click on the <i class=\"productsIcon selected icon-add\"></i> tab.</li>"+- "<li>Select \"Fires\" from the drop down list.</li>"+- "<li>Type \"aqua\" in the search box.</li>"+- "<li>Add the \"Fires (Day and Night) Aqua/MODIS Fire and Thermal Anomalies\" overlay.</li>"+- "<li>Click on the <i class=\"productsIcon selected icon-download\"></i> tab to see what data can be downloaded.</li>"+- "<li>Click on the <i class=\"productsIcon selected icon-active\"></i> tab to see the layers that have been added.</li>"+- "</ul>"+- "</br>"+- "</div>";- document.getElementById("wv").innerHTML = overlayText;-- var dateText = "<div class=\"tour\">"+- "<h3>Date Slider</h3>"+- "</br></br>"+- "<p class='tour'>The <span class='highlight'>Date Slider</span> is used to show imagery that was observed on a specific date. You can click the slider to choose a date or drag the slider to view changes over time.</p>"+- "<p class='tour'><span class='tryIt'>Try It!</span></p>"+- "<p class='tour'>Use the date slider to change the date to 2012 Aug 23.</p>"+- "</div>";- document.getElementById("datePanel").innerHTML = dateText;-- var toolbarText = "<div>"+- "<h3>Toolbar</h3>"+- "</br></br>"+- "<p>The toolbar provides several additional utilities for interacting with @NAME@.</p>"+- "<table class=\"tour\">"+- "<tr>" +- "<td style='text-align: center'><i class='fa fa-link fa-2x'></i></td>"+- "<td><p class=\"tour\">The permalink icon lets you create a permanent, shareable link to a particular view in @NAME@.</p></td>"+- "</tr>" +- "<tr>" +- "<td style='text-align: center'><i class='fa fa-globe fa-2x'></i></td>"+- "<td><p class=\"tour\">The globe icon lets you change between Arctic, geographic, and Antarctic projections of the world.</p></td>"+- "</tr>" +- "<tr>" +- "<td style='text-align: center'><i class='fa fa-camera fa-2x'></i></td>"+- "<td><p class=\"tour\">The camera icon lets you download an image of your current view in @NAME@. User-selected palettes are not yet supported with this feature.</p></td>"+- "</tr>" +- "<tr>" +- "<td style='text-align: center'><i class='fa fa-info-circle fa-2x'></i></td>"+- "<td><p class=\"tour\">The information icon provides you with more information on @NAME@ and its data sources.</p></td>"+- "</tr>" +- "</table>" +- "</br>"+- "</div>";- document.getElementById("toolbarPanel").innerHTML = toolbarText;-- var mapText = "<div>"+- "<h3>Map</h3>"+- "</br></br>"+- "<p class='tour\'>There are several ways you can interact with the map to pan or zoom.</p>"+- "<p class='tour\'>To pan, drag the map.</p>"+- "<p class='tour\'>To zoom:</p>"+- "<ul class='tour\'>"+- "<li>Use the mouse wheel</li>"+- "<li>Use the +/- icons on the right</li>"+- "<li>Double-click (centers and zooms)</li>"+- "<li>Shift-click-drag (zooms in on a box)</li>"+- "</ul>"+- "</br>"+- "<p class='tour'><span class='tryIt'>Try It!</span></p>"+- "<p class='tour\'>Move the map to North America and zoom in on northern California, USA.</p>"+- "<img src=\"images/tour-fire-location.png\" alt=\"Location\" width=\"200\" class=\"splash\"/>"+- "</br>"+- "</div>";-- document.getElementById("mapPanel").innerHTML = mapText;- */var mapAnchor = document.getElementById("mapPanelTourAnchor");if(!mapAnchor) {//console.log("creating mapanchor");@@ -238,23 +102,9 @@ wv.tour = wv.tour || function(models, ui, config) {}var endTour = function() {- var $dialog = wv.ui.getDialog();- var conclusionText = "<div class=\"splash\">"+- "<center>"+- "<p class='splashwelcome'>You have now completed a tour of @NAME@! If you followed the “Try It” steps, you’re now looking at fires in northern California as they were observed by satellites on August 23, 2012. You can use the tools in any order. We hope you continue exploring! <p>"+- "<br/>" +- "<p class='splashwelcome'><a class='feedback'>Contact us</a> if you have any questions about @NAME@.</p>" +- "<br/>"+- "<table class='tour'>"+- "<tr>"+- "<td rowspan=\"2\" colspan=\"2\"><button id='repeat' type='button' class='repeatTour'>Repeat Tour</button></td>"+- "<td rowspan=\"2\" colspan=\"2\"><button id='done' type='button' class='done'>Done!</button></td>"+- "</tr>"+- "</table>"+- "</center>"+- "</div>";+ wv.ui.close();+ $dialog = $("#wv-tour-end");$dialog- .html(conclusionText).dialog({title: "Finished!",dialogClass: "tour",diff --git a/web/pages/tour.html b/web/pages/tour.htmlindex 619465f66..d3b9c56a8 100644--- a/web/pages/tour.html+++ b/web/pages/tour.html@@ -1,3 +1,56 @@+<!-- INTRODUCTION -->++<div id="wv-tour-intro" class="splash">+<center>+<p class="splashwelcome">+This application allows you to interactively browse global satellite imagery+within hours of it being acquired. Use the features described below to find+interesting imagery, save and share what you find, and download the underlying+data.+</p>+</br></br>+<table id="splashTable" class="splash">+ <tr>+ <td><img src="images/tour/layer-picker-0.7.png" alt="Layer Picker" width="150" height="93" class="splash"/></td>+ <td><img src="images/tour/time-slider-0.7.png" alt="Time Slider" width="150" height="78" class="splash"/></td>+ <td><img src="images/tour/toolbar-0.7.png" alt="Toolbar" width="124" height="50" class="splash"/></td>+ <td><img src="images/tour/map-0.7.png" alt="Map" width="100" height="75" class="splash"/></td>+ </tr>+ <tr class='splash-info'>+ <td class='splash-info'><p class="splash">Use the <span class="highlight">Layer Picker</span> on the left to choose the type of imagery to display on the map. It also has a tab to download the underlying data.</p></td>+ <td class='splash-info'><p class="splash">Use the <span class="highlight">Time Slider</span> on the bottom to choose the date of the observations.</p></td>+ <td class='splash-info'><p class="splash">Use the <span class="highlight">Tool Bar</span> at the top to see other tools for changing and saving the view.</p></td>+ <td class='splash-info'><p class="splash">Use the <span class="highlight">Map</span> itself to pan or zoom in on an area.</p></td>+ </tr>+ <tr>+ <td><p></p></td>+ </tr>+ <tr>+ <td rowspan="2" colspan="4">+ <p style='text-align:center;'>+ <button id='takeTour' type='button' class="takeTour">Take Tour</button>+ <button id='skipTour' type='button' class="skipTour">Skip Tour</button>+ </p>+ </td>+ </tr>+ <tr></tr>+ <tr id="wv-tour-skip">+ <td colspan='2'>+ <p id='dontShowP' class="splash">+ <input id='dontShowAgain' type='checkbox'>+ Do not show again (Access from+ <i class='fa fa-info-circle fa-fw'></i> menu)+ </p>+ </td>+ </tr>+</table>+</center>+</div>++<!-- TOUR PANELS -->+<ol id="joyRideTipContent" class="tour">++<!-- Timeline --><li id="wv-tour-timeline" data-id="timeline-footer" data-button="Next" data-options="tipLocation:top;tipAnimation:fade;nubPosition:bottom;bordered:true"><div><h3>Timeline</h3>@@ -5,13 +58,15 @@</div></li>-<li id="wv-tour-date-entry" data-id="timeline" data-button="Next" data-options="tipLocation:top;tipAnimation:fade;nubPosition:bottom;prevButton:true;bordered:true">+<!-- Timeline - Continued -->+<li id="wv-tour-timline-continued" data-id="timeline" data-button="Next" data-options="tipLocation:top;tipAnimation:fade;nubPosition:bottom;prevButton:true;bordered:true"><div>- <h3>Date Entry</h3>+ <h3>Timeline - Continued</h3><p>More text about the tour</p></div></li>+<!-- Layer Picker - Base Layers --><li id="wv-tour-base-layers" data-id="productsBaseLayers" data-button="Next" data-options="tipLocation:right;nubPosition:left;tipAnimation:fade;prevButton:true;bordered:true"><div class="tour"><h3>Layer Picker - Base Layers</h3>@@ -40,6 +95,7 @@ one at a time.</div></li>+<!-- Layer Picker - Continued --><li id="wv-tour-overlay-layers" class="wide" data-id="productsOverlays" data-button="Next" data-options="tipLocation:right;nubPosition:left;tipAnimation:fade;prevButton:true;bordered:true;class:wide"><div class="tour"><h3>Layer Picker - Continued</h3>@@ -73,6 +129,7 @@ layers you are currently viewing.</div></li>+<!-- Map --><li id="wv-tour-map" data-id="mapPanelTourAnchor" data-button="Next" data-options="tipLocation:left;nubPosition:left;prevButton:true;bordered:true"><div class="tour"><h3>Map</h3>@@ -100,6 +157,7 @@ Move the map to North America and zoom in on northern California, USA.<img src="images/tour-fire-location.png" alt="Location" class="wv-tour-map"/></li>+<!-- Toolbar --><li id="wv-tour-toolbar" class="toolbarTip" data-id="wv-toolbar" data-button="Finish" data-options="tipLocation:bottom;nubPosition:top;tipAnimation:fade;prevButton:true;bordered:true;class:toolbar"><div class="tour"><h3>Toolbar</h3>@@ -131,3 +189,33 @@ The toolbar provides several additional utilities for interacting with @NAME@.</table></div></li>++</ol>++<!-- TOUR END -->+<div id="wv-tour-end" class="splash">+<center>+<p class='splashwelcome'>+ You have now completed a tour of @NAME@! If you followed the “Try It”+ steps, you’re now looking at fires in northern California as they were+ observed by satellites on August 23, 2012. You can use the tools in any+ order. We hope you continue exploring!+</p>+<br/>+<p class='splashwelcome'>+ <a class='feedback'>Contact us</a> if you have any questions+ about @NAME@.+</p>+<br/>+<table class='tour'>+ <tr>+ <td rowspan="2" colspan="2">+ <button id='repeat' type='button' class='repeatTour'>Repeat Tour</button>+ </td>+ <td rowspan="2" colspan="2">+ <button id='done' type='button' class='done'>Done!</button>+ </td>+ </tr>+</table>+</center>+</div>