Interactive interface for browsing global, full-resolution satellite imagery
Basics of tour working again
Mike McGann757695ff6c3b
diff --git a/src/css/splash.css b/src/css/splash.cssindex d05ed88a8..a81dd6f93 100644--- a/src/css/splash.css+++ b/src/css/splash.css@@ -2,6 +2,10 @@/*#splash_c {background-color:rgba(180, 205, 205, 1); }#conclusionPanel_c {background-color:rgba(38, 43, 49, 1); }*/+body {+ position: static;+}+#joyRideTipContent { display: none; }#splash_c div{background-color:rgba(175, 181, 196, 1); }@@ -9,6 +13,18 @@.yui-skin-sam .yui-panel-container .bd .splash h3{ color:rgb(38, 43, 49); font: 18px "Gill Sans", sans-serif; font-weight:400; text-decoration:none; }+.tour .ui-dialog-content {+ background: #AFB5C4+}++.tour .ui-dialog-titlebar {+ display: none;+}++.tour h3 {+ font: 400 18px "Gill Sans",sans-serif+}+img.splash{display:block;margin-left:auto;diff --git a/src/index.html b/src/index.htmlindex 5b2d46b3a..6a82689ef 100644--- a/src/index.html+++ b/src/index.html@@ -39,8 +39,8 @@<!-- link.dev --> <link type="text/css" rel="Stylesheet" href="ext/palettes/jquery.dd-3.3/jquery.dd.css"><!-- link.prod --> <!-- <link type="text/css" rel="Stylesheet" href="ext/palettes/jquery.dd-3.3/jquery.dd.min.css"> -->- <!-- link.dev --> <!--<link type="text/css" rel="Stylesheet" href="ext/tour/joyride-2.0.3-2/joyride.css">-->- <!-- xxxx.prod --> <!-- <link type="text/css" rel="Stylesheet" href="ext/tour/joyride-2.0.3-2/joyride.min.css"> -->+ <!-- link.dev --> <link type="text/css" rel="Stylesheet" href="ext/tour/joyride-2.0.3-2/joyride.css">+ <!-- link.prod --> <!-- <link type="text/css" rel="Stylesheet" href="ext/tour/joyride-2.0.3-2/joyride.min.css"> --><!-- link.dev --> <link type="text/css" rel="Stylesheet" href="ext/image/jcrop-0.9.10-p1/jcrop.css"><!-- link.prod --> <!-- <link type="text/css" rel="Stylesheet" href="ext/image/jcrop-0.9.10-p1/jcrop.min.css"> -->diff --git a/src/js/ui/wv.ui.info.js b/src/js/ui/wv.ui.info.jsindex dde90e641..0a379f7b2 100644--- a/src/js/ui/wv.ui.info.js+++ b/src/js/ui/wv.ui.info.js@@ -15,7 +15,7 @@var wv = wv || {};wv.ui = wv.ui || {};-wv.ui.info = wv.ui.info || (function() {+wv.ui.info = wv.ui.info || (function(ui) {var selector = "#wv-info-button";var $button = $("<button></button>")@@ -58,6 +58,10 @@ wv.ui.info = wv.ui.info || (function() {wv.ui.about.show();});+ $tour.click(function() {+ ui.tour.start();+ });+$button.click(function() {$(".ui-menu").hide();$button.tooltip("close").tooltip("disable");diff --git a/src/js/ui/wv.ui.js b/src/js/ui/wv.ui.jsindex 08921d99b..05fd2f480 100644--- a/src/js/ui/wv.ui.js+++ b/src/js/ui/wv.ui.js@@ -178,7 +178,7 @@ wv.ui = (function(self) {}$dialog.remove();}- $dialog = $("<div data-boo='yeah'></div>");+ $dialog = $("<div></div>");$("body").append($dialog);return $dialog;};diff --git a/src/js/wv.main.js b/src/js/wv.main.jsindex f68cabb20..e94e56a80 100644--- a/src/js/wv.main.js+++ b/src/js/wv.main.js@@ -168,7 +168,7 @@ $(function() {errorReport();wv.debug.error(parameters);- wv.ui.info();+ ui.info = wv.ui.info(ui);models.wv.events.trigger("startup");};diff --git a/src/js/wv.tour.js b/src/js/wv.tour.jsindex 4fe02119f..a56606bd8 100644--- a/src/js/wv.tour.js+++ b/src/js/wv.tour.js@@ -20,6 +20,7 @@ wv.tour = wv.tour || function(models, ui) {var conclusionPanel = null;var splashOverlay = null;+ var active = false;var init = function() {$("#wv-tour").click(function() {@@ -62,16 +63,13 @@ wv.tour = wv.tour || function(models, ui) {}/* --- Set Up --- */+ if ( active ) {+ $('#joyRideTipContent').joyride("destroy");+ }var padding = 15; // padding - used for all of the tour windowsvar pos, width, height, xval, yval; // helpful calculation vars- // splash screen overlay- if(splashOverlay){- splashOverlay.destroy();- }- splashOverlay = new YAHOO.widget.Panel("splash", { zIndex:1020, visible:false, modal:true, draggable:false, } );-var finalRow = "";if(introduction) {finalRow = "<td><p id='dontShowP' class=\"splash\"><input id='dontShowAgain' type='checkbox'>Do not show again</p></td>";@@ -110,9 +108,24 @@ wv.tour = wv.tour || function(models, ui) {"</center>"+"</div>";+ var $startDialog = wv.ui.getDialog();+ $startDialog+ .html(item)+ .dialog({+ dialogClass: "tour",+ modal: true,+ width: 700,+ height: 530,+ draggable: false,+ resizable: false+ });+ active = true;+ /*+ splashOverlay = new YAHOO.widget.Panel("splash", { zIndex:1020, visible:false, modal:true, draggable:false, } );+splashOverlay.setBody(item);splashOverlay.show();-+ *//* set up all of the callout panels */var productText = "<div>"+@@ -220,16 +233,9 @@ wv.tour = wv.tour || function(models, ui) {owner.appendChild(mapAnchor);}-- /* conclusion screen after completing the tour */- if(conclusionPanel){- conclusionPanel.destroy();- }- conclusionPanel = new YAHOO.widget.Panel("conclusionPanel", { zIndex:1020,- visible:false,- modal:true,- draggable:false});- var conclusionText = "<div class=\"splash\">"++ var endTour = function() {+ var $dialog = wv.ui.getDialog();+ var conclusionText = "<div class=\"splash\">"+"<center>"+"<h3>Finished!</h3>"+"</br></br>"+@@ -241,28 +247,38 @@ wv.tour = wv.tour || function(models, ui) {"<td rowspan=\"2\" colspan=\"2\"><button id='done' type='button' class='done'>Done!</button></td>"+"</tr>"+"</table>"+- "</center>"+- "</div>";-- conclusionPanel.setBody(conclusionText);-+ "</center>"++ "</div>";+ $dialog+ .html(conclusionText)+ .dialog({+ dialogClass: "tour",+ modal: true,+ width: 600,+ height: 215,+ draggable: false,+ resizable: false+ });+ $("#repeat").click(repeatTour);+ $("#done").click(handleDone);+ active = false;+ };/** Restart the tour at the beginning.*/var repeatTour = function(e) {e.stopPropagation();+ $(".ui-dialog-content").dialog("close");$('#joyRideTipContent').joyride({adjustForPhone:false,bordered:true,includepage:true,template : {'link':'<a href="#" class="joyride-close-tip">X</a>'},postStepCallback : function (index, tip) {if(index == 4) {- conclusionPanel.show();- conclusionPanel.center();+ endTour();}}});- conclusionPanel.hide();};/*@@ -270,22 +286,22 @@ wv.tour = wv.tour || function(models, ui) {*/var handleDone = function(e) {e.stopPropagation();- conclusionPanel.hide();+ $(".ui-dialog-content").dialog("close");};/** Close the splash and go straight to worldview.*/var handleSkipTour = function() {- splashOverlay.hide();+ active = false;+ $(".ui-dialog-content").dialog("close");};var onStop = function(index, tip, button) {- console.log(index, tip, button);+ //console.log(index, tip, button);setTourState();if(index == 4 && button !== "previous") {- conclusionPanel.show();- conclusionPanel.center();+ endTour();}};@@ -294,7 +310,7 @@ wv.tour = wv.tour || function(models, ui) {*/var handleTakeTour = function(e) {e.stopPropagation();- splashOverlay.hide();+ $(".ui-dialog-content").dialog("close");initTourState();$('#joyRideTipContent').joyride({adjustForPhone:false,@@ -319,16 +335,17 @@ wv.tour = wv.tour || function(models, ui) {});// assign events and start+ $("#takeTour").click(handleTakeTour);+ $("#skipTour").click(handleSkipTour);+ $("#dontShowAgain").click(setDoNotShow);++ /*YAHOO.util.Event.on('takeTour', 'click', handleTakeTour);YAHOO.util.Event.on('skipTour', 'click', handleSkipTour);YAHOO.util.Event.on('dontShowAgain', 'click', setDoNotShow);YAHOO.util.Event.on('repeat', 'click', repeatTour);YAHOO.util.Event.on('done', 'click', handleDone);-- splashOverlay.render(document.body);- conclusionPanel.render(document.body);- splashOverlay.show();- splashOverlay.center();+ */};var initTourState = function() {@@ -342,7 +359,7 @@ wv.tour = wv.tour || function(models, ui) {var setTourState = function() {ui.sidebar.expandNow();ui.sidebar.selectTab("active");- ui.dateSliders.expand();+ //ui.dateSliders.expand();models.proj.selectDefault();};