0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2025-06-11 09:23:17 +02:00

added a simple help layer to the app (jquery joyride)

This commit is contained in:
Adriaan Wormgoor
2013-10-23 06:46:07 +02:00
parent df98330259
commit d3029096a7
19 changed files with 2057 additions and 292 deletions

View File

@ -1,3 +1,288 @@
/* Artfully masterminded by ZURB */
body {
/*position: relative;*/
}
/* Default styles for the container */
.joyride-tip-guide {
position: absolute;
background: rgba(255, 255, 255, 0.92);
display: none;
color: #222;
width: 300px;
z-index: 101;
top: 0;
/* keeps the page from scrolling when calculating position */
left: 0;
font-weight: normal;
border-radius: 10px;
border: 3px solid #5FCE4F;
-webkit-box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}
.joyride-content-wrapper {
padding: 10px 10px 15px 15px;
}
/* Mobile */
@media only screen and (max-width: 767px) {
.joyride-tip-guide {
width: 95% !important;
border-radius: 0;
left: 2.5% !important;
}
.joyride-tip-guide-wrapper {
width: 100%;
}
}
/* Add a little css triangle pip, older browser just miss out on the fanciness of it */
.joyride-tip-guide span.joyride-nub {
display: block;
position: absolute;
right: 22px;
width: 0;
height: 0;
border: solid 14px;
}
.joyride-tip-guide span.joyride-nub.top {
/*
IE7/IE8 Don't support rgba so we set the fallback
border color here. However, IE7/IE8 are also buggy
in that the fallback color doesn't work for
border-bottom-color so here we set the border-color
and override the top,left,right colors below.
*/
border-color: #43d814;
border-top-color: transparent !important;
border-left-color: transparent !important;
border-right-color: transparent !important;
border-top-width: 0;
top: -14px;
bottom: 0;
}
.joyride-tip-guide span.joyride-nub.bottom {
/*
IE7/IE8 Don't support rgba so we set the fallback
border color here. However, IE7/IE8 are also buggy
in that the fallback color doesn't work for
border-top-color so here we set the border-color
and override the bottom,left,right colors below.
*/
border-color: #43d814 !important;
border-bottom-color: transparent !important;
border-left-color: transparent !important;
border-right-color: transparent !important;
border-bottom-width: 0;
bottom: -14px !important;
bottom: 0;
}
.joyride-tip-guide span.joyride-nub.right {
border-color: #43d814 !important;
border-top-color: transparent !important;
border-right-color: transparent !important;
border-bottom-color: transparent !important;
border-right-width: 0;
top: 22px;
bottom: 0;
left: auto;
right: -14px;
}
.joyride-tip-guide span.joyride-nub.left {
border-color: #43d814 !important;
border-top-color: transparent !important;
border-left-color: transparent !important;
border-bottom-color: transparent !important;
border-left-width: 0;
top: 22px;
left: -14px;
right: auto;
bottom: 0;
}
.joyride-tip-guide span.joyride-nub.top-right {
border-color: #000;
border-color: rgba(0, 0, 0, 0.8);
border-top-color: transparent !important;
border-left-color: transparent !important;
border-right-color: transparent !important;
border-top-width: 0;
top: -14px;
bottom: 0;
left: auto;
right: 28px;
}
/* Typography */
.joyride-tip-guide h1,
.joyride-tip-guide h2,
.joyride-tip-guide h3,
.joyride-tip-guide h4,
.joyride-tip-guide h5,
.joyride-tip-guide h6 {
line-height: 1.25;
margin: 0;
font-weight: bold;
color: #2DDF34;
}
.joyride-tip-guide h1 {
font-size: 30px;
}
.joyride-tip-guide h2 {
font-size: 26px;
}
.joyride-tip-guide h3 {
font-size: 22px;
}
.joyride-tip-guide h4 {
font-size: 18px;
}
.joyride-tip-guide h5 {
font-size: 16px;
}
.joyride-tip-guide h6 {
font-size: 14px;
}
.joyride-tip-guide p {
margin: 0 0 18px 0;
font-size: 14px;
line-height: 18px;
}
.joyride-tip-guide a {
color: #ffffff;
text-decoration: none;
border-bottom: dotted 1px rgba(255, 255, 255, 0.6);
}
.joyride-tip-guide a:hover {
color: rgba(255, 255, 255, 0.8);
border-bottom: none;
}
/* Button Style */
.joyride-tip-guide .joyride-next-tip {
width: auto;
padding: 6px 18px 4px;
font-size: 13px;
text-decoration: none;
color: #ffffff;
border: solid 1px #003cb4;
background: #0063ff;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #0063ff), color-stop(100%, #0055d6));
background: -webkit-linear-gradient(top, #0063ff 0%, #0055d6 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0063ff', endColorstr='#0055d6', GradientType=0);
background: -webkit-gradient(linear, top left, bottom left, from(#0063ff), to(#0055d6));
background: linear-gradient(top, #0063ff 0%, #0055d6 100%);
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5);
border-radius: 2px;
-webkit-box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.3) inset;
box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.3) inset;
}
.joyride-next-tip:hover {
color: #ffffff !important;
border: solid 1px #003cb4 !important;
background: #2b80ff;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b80ff), color-stop(100%, #1d66d3));
background: -webkit-linear-gradient(top, #2b80ff 0%, #1d66d3 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#2b80ff', endColorstr='#1d66d3', GradientType=0);
background: -webkit-gradient(linear, top left, bottom left, from(#2b80ff), to(#1d66d3));
background: linear-gradient(top, #2b80ff 0%, #1d66d3 100%);
}
.joyride-timer-indicator-wrap {
width: 50px;
height: 3px;
border: solid 1px rgba(255, 255, 255, 0.1);
position: absolute;
right: 17px;
bottom: 16px;
}
.joyride-timer-indicator {
display: block;
width: 0;
height: inherit;
background: rgba(255, 255, 255, 0.25);
}
.joyride-close-tip {
position: absolute;
right: 10px;
top: 10px;
color: rgba(0, 0, 0, 0.5) !important;
text-decoration: none;
font-family: Verdana, sans-serif;
font-size: 10px;
font-weight: bold;
border-bottom: none !important;
}
.joyride-close-tip:hover {
color: rgba(0, 0, 0, 0.9) !important;
}
.joyride-modal-bg {
position: fixed;
height: 100%;
width: 100%;
background: rgba(0, 0, 0, 0.3);
z-index: 100;
display: none;
top: 0;
left: 0;
cursor: pointer;
}
.joyride-expose-wrapper {
background-color: #ffffff;
position: absolute;
z-index: 102;
-webkit-box-shadow: 0px 0px 30px #ffffff;
box-shadow: 0px 0px 30px #ffffff;
border-radius: 5px;
}
.joyride-expose-cover {
background: transparent;
position: absolute;
z-index: 10000;
top: 0;
left: 0;
border-radius: 5px;
}
#helpContainer {
display: none;
margin: 0;
padding: 0;
}
.joyride-tip-guide.d3dInfoWelcomePanel {
width: 460px;
padding: 25px;
}
/*
GLOBAL CONTAINER
@ -34,17 +319,15 @@ img {
#landscape {
position: absolute;
background-color: #fff;
width: 100%;
max-width: 1024px;
max-height: 768px;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
z-index: 5;
top: 0;
bottom: 0;
left: 0;
right: 0;
overflow: hidden;
margin: 0px auto;
margin: 0 auto;
outline: 2px solid #5e8c71;
-webkit-box-shadow: 0 0 8px rgba(8, 8, 8, 0.25);
box-shadow: 0 0 8px rgba(8, 8, 8, 0.25);
@ -324,7 +607,6 @@ img {
.leftpanel {
position: absolute;
width: 17%;
/* background-color: rgba(67, 204, 67, 0.4);*/
top: 0px;
left: 0px;
bottom: 0px;
@ -378,7 +660,6 @@ img {
.rightpanel {
position: absolute;
width: 17%;
/* background-color: rgba(255, 0, 254, 0.4);*/
top: 0;
right: 0;
bottom: 0;
@ -879,180 +1160,4 @@ img {
width: auto;
/* for ie9 */
}
}
/* Tourbus leg definitions element */
.tourbus-legs {
display: none;
}
/* Container for tourbus leg */
.tourbus-leg {
position: absolute;
visibility: hidden;
top: 0;
border: 1px solid #E5E5E5;
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
border-radius: 4px;
background: white;
}
/* Interior of leg, clearfixed */
.tourbus-leg-inner {
padding: 20px;
position: relative;
zoom: 1;
}
.tourbus-leg-inner:before,
.tourbus-leg-inner:after {
content: "\0020";
display: block;
height: 0;
overflow: hidden;
}
.tourbus-leg-inner:after {
clear: both;
}
.prevnextBtn {
border: 1px solid #8e8e8e;
color: #252525;
border-radius: 4px;
padding: 4px 8px;
background-color: #eaeaea;
-webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.7);
box-shadow: 0 0 3px rgba(0, 0, 0, 0.7);
margin-right: 8px;
}
/*
remove top padding/margin on headings
because the interior of the leg has padding
*/
.tourbus-leg h1,
.tourbus-leg h2,
.tourbus-leg h3,
.tourbus-leg h4,
.tourbus-leg h5,
.tourbus-leg h6 {
margin-top: 0;
padding-top: 0;
}
/* Tourbus leg arrow */
.tourbus-arrow:before,
.tourbus-arrow:after {
border: solid rgba(0, 0, 0, 0);
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
border-color: transparent;
}
/* set the :after to be the _interior_ size of the arrow */
/* set the :before to be the _interior + desired border width_ */
.tourbus-arrow:after {
border-width: 14px;
}
.tourbus-arrow:before {
border-width: 16px;
}
/* Arrow background and border colors */
/*
change margin-top/left values here to
match the border width for :after above
border colors here are for the _interior_ of the arrow
*/
.tourbus-arrow-right:after {
border-right-color: #ffffff;
margin-top: -14px;
top: 50%;
}
.tourbus-arrow-left:after {
border-left-color: #ffffff;
margin-top: -14px;
top: 50%;
}
.tourbus-arrow-bottom:after {
border-bottom-color: #ffffff;
margin-left: -14px;
left: 50%;
}
.tourbus-arrow-top:after {
border-top-color: #ffffff;
margin-left: -14px;
left: 50%;
}
/*
change margin-top/left values here to
match the border width for :before above
border colors here are for the _border_ of the arrow
*/
.tourbus-arrow-right:before {
border-right-color: #e5e5e5;
margin-top: -16px;
top: 50%;
}
.tourbus-arrow-left:before {
border-left-color: #e5e5e5;
margin-top: -16px;
top: 50%;
}
.tourbus-arrow-bottom:before {
border-bottom-color: #e5e5e5;
margin-left: -16px;
left: 50%;
}
.tourbus-arrow-top:before {
border-top-color: #e5e5e5;
margin-left: -16px;
left: 50%;
}
/* you shouldn't need to change these */
.tourbus-arrow-right:after,
.tourbus-arrow-right:before {
right: 100%;
}
.tourbus-arrow-left:after,
.tourbus-arrow-left:before {
left: 100%;
}
.tourbus-arrow-bottom:after,
.tourbus-arrow-bottom:before {
bottom: 100%;
}
.tourbus-arrow-top:after,
.tourbus-arrow-top:before {
top: 100%;
}

File diff suppressed because one or more lines are too long

View File

@ -1,94 +1,64 @@
<div class="my-tour-overlay"></div>
<ol class='tourbus-legs' id='tour1'>
<!-- FIRST WELCOME -->
<li data-orientation='centered' data-highlight='true'>
<h2>Welcome to Doodle3D</h2>
<p>This is your first time starting the app. How about we show you around a bit?</p>
<a href='javascript:void(0);' class='prevnextBtn tourbus-next'>Yes</a>
<a href='javascript:void(0);' class='prevnextBtn endIntroTour'>No</a>
<!-- Tip Content -->
<ol id="help_d3dIntro">
<li data-button="OK" class="d3dInfoWelcomePanel">
<h1>Welcome to Doodle3D</h1>
<p></p>
<p>It looks like it's your first time here. How about we give you a quick tour?</p>
<p> </p>
</li>
<!-- LEFT PANEL -->
<li data-el='.leftpanel' data-orientation='right' data-width='300' data-highlight='true'>
<h2>Leftpanel</h2>
<p>Random text which makes it all seem like there's something to say...</p>
<!--<a href='javascript:void(0);' class='prevnextBtn tourbus-prev'>Previous...</a>-->
<a href='javascript:void(0);' class='prevnextBtn tourbus-next'>Next...</a>
<li data-class="leftpanel" class="custom" data-button="OK" data-options="tipLocation:right">
<h2>leftpanel</h2>
<p>You can control all the details for you tour stop. Any valid HTML will work inside of Joyride.</p>
<p><a href="#">linkme beautiful</a>.</p>
</li>
<li data-el='.new' data-orientation='right' data-width='300'>
<li data-class="btnNew" class="custom" data-text="Next" data-options="tipLocation:right">
<h2>New</h2>
<p>Random text which makes it all seem like there's something to say...</p>
<!--<a href='javascript:void(0);' class='prevnextBtn tourbus-prev'>Previous...</a>-->
<a href='javascript:void(0);' class='prevnextBtn tourbus-next'>Next...</a>
<p>You can control all the details for you tour stop. Any valid HTML will work inside of Joyride.</p>
<p><a href="#">linkme beautiful</a>.</p>
</li>
<li data-el='.prevnext' data-orientation='right' data-width='300'>
<h2>PrevNext</h2>
<p>Random text which makes it all seem like there's something to say...</p>
<!--<a href='javascript:void(0);' class='prevnextBtn tourbus-prev'>Previous...</a>-->
<a href='javascript:void(0);' class='prevnextBtn tourbus-next'>Next...</a>
</li>
<li data-el='.save' data-orientation='right' data-width='300'>
<li data-class="btnSave" data-button="Next" data-options="tipLocation:right">
<h2>Save</h2>
<p>Random text which makes it all seem like there's something to say...</p>
<!--<a href='javascript:void(0);' class='prevnextBtn tourbus-prev'>Previous...</a>-->
<a href='javascript:void(0);' class='prevnextBtn tourbus-next'>Next...</a>
<p>Get the details right by styling Joyride with a custom stylesheet!</p>
</li>
<li data-el='.oops' data-orientation='right' data-width='300'>
<li data-button="Next">
<h2>Modal</h2>
<p>It works as a modal too!</p>
</li>
<li data-class="btnOops" data-button="Next" data-options="tipLocation:right">
<h2>Oops</h2>
<p>Random text which makes it all seem like there's something to say...</p>
<!--<a href='javascript:void(0);' class='prevnextBtn tourbus-prev'>Previous...</a>-->
<a href='javascript:void(0);' class='prevnextBtn tourbus-next'>Next...</a>
<p>It works right aligned.</p>
</li>
<!-- RIGHT PANEL -->
<li data-el='.rightpanel' data-orientation='left' data-width='300' data-highlight='true'>
<h2>Leftpanel</h2>
<p>Random text which makes it all seem like there's something to say...</p>
<!--<a href='javascript:void(0);' class='prevnextBtn tourbus-prev'>Previous...</a>-->
<a href='javascript:void(0);' class='prevnextBtn tourbus-next'>Next...</a>
<li data-class="rightpanel" data-button="Next" data-options="tipLocation:left">
<h2>Print</h2>
<p>It works with classes, and only on the first visible element with that class.</p>
</li>
<li data-el='.print' data-orientation='left' data-width='300'>
<h2>print</h2>
<p>Random text which makes it all seem like there's something to say...</p>
<!--<a href='javascript:void(0);' class='prevnextBtn tourbus-prev'>Previous...</a>-->
<a href='javascript:void(0);' class='prevnextBtn tourbus-next'>Next...</a>
<li data-class="btnPrint" data-button="Next" data-options="tipLocation:left">
<h2>Print</h2>
<p>It works with classes, and only on the first visible element with that class.</p>
</li>
<li data-el='.stop' data-orientation='left' data-width='300'>
<h2>stop</h2>
<p>Random text which makes it all seem like there's something to say...</p>
<!--<a href='javascript:void(0);' class='prevnextBtn tourbus-prev'>Previous...</a>-->
<a href='javascript:void(0);' class='prevnextBtn tourbus-next'>Next...</a>
<li data-class="btnStop" data-button="Close" data-options="tipLocation:left">
<h2>Stop</h2>
<p>It works with classes, and only on the first visible element with that class.</p>
</li>
<li data-el='.progress' data-orientation='left' data-width='300'>
<h2>progress</h2>
<p>Random text which makes it all seem like there's something to say...</p>
<!--<a href='javascript:void(0);' class='prevnextBtn tourbus-prev'>Previous...</a>-->
<a href='javascript:void(0);' class='prevnextBtn tourbus-next'>Next...</a>
</li>
<li data-el='.thermo' data-orientation='left' data-width='300'>
<h2>thermo</h2>
<p>Random text which makes it all seem like there's something to say...</p>
<!--<a href='javascript:void(0);' class='prevnextBtn tourbus-prev'>Previous...</a>-->
<a href='javascript:void(0);' class='prevnextBtn tourbus-next'>Next...</a>
</li>
<li data-el='.info' data-orientation='left' data-width='300'>
<h2>info</h2>
<p>Random text which makes it all seem like there's something to say...</p>
<!--<a href='javascript:void(0);' class='prevnextBtn tourbus-prev'>Previous...</a>-->
<a href='javascript:void(0);' class='prevnextBtn tourbus-stop'>Got it...</a>
</li>
</ol>
<ol class='tourbus-legs' id='tour2'>
<li data-el='.info' data-orientation='left' data-width='200'>
<h2>INFO</h2>
<p>check out the info here anytime..</p>
<a href='javascript:void(0);' class='prevnextBtn tourbus-stop'>Got it</a>
<ol id="help_InfoReminder">
<li data-class="btnInfo" data-button="Got it" data-options="tipLocation:top">
<h2>Reminder</h2>
<p>You can always find this tour in the info window.</p>
</li>
</ol>
<!-- Tip Content -->
</ol>
<!--<ol id="joyrideTour">-->
<!--<li data-class="new" data-text="Next" class="custom" data-options="tipLocation:right">-->
<!--<h2>New</h2>-->
<!--<p>You can control all the details for you tour stop. Any valid HTML will work inside of Joyride.</p>-->
<!--<p><a href="#">linkme beautiful</a>.</p>-->
<!--</li>-->
<!--<li data-class="print" data-button="Close" data-options="tipLocation:left">-->
<!--<h2>Print</h2>-->
<!--<p>It works with classes, and only on the first visible element with that class.</p>-->
<!--</li>-->
<!--</ol>-->

View File

@ -11,8 +11,9 @@
<meta id="Viewport" name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
<link href="css/styles.css" rel="stylesheet" media="screen">
<link href="css/debug.css" rel="stylesheet" media="screen">
<link href="css/styles.min.css" rel="stylesheet" media="screen">
<link href="css/debug.min.css" rel="stylesheet" media="screen">
<!--<link href="css/joyride-2-1.css" rel="stylesheet" media="screen">-->
</head>
<body>
@ -53,15 +54,6 @@
<canvas id="thermometerCanvas" width="90" height="120"></canvas>
</div>
</div>
<!--<div id="thermometerContainer" class="clearfix">-->
<!--<canvas id="thermometerCanvas" width="90" height="120"></canvas>-->
<!--</div>-->
<!-- 2013-10-16 tmp backup
<div id="thermometerContainer">
<canvas id="thermometerCanvas" width="100" height="125"></canvas>
</div>
-->
<div class="btnsSettingsInfo">
<img class="btnSettings btn" src="img/buttons/btnSettings.png">
<img class="btnInfo btn" src="img/buttons/btnInfo.png">
@ -129,9 +121,15 @@
<div id="portrait">
<img class="vertImage" src="img/bg_vertical.png"/>
</div>
<script src="js/libs/jquery-1.8.3.min.js"></script>
<!--<script src="js/doodle3d-client.js"></script>-->
<script src="js/doodle3d-client.min.js"></script>
<div id="helpContainer"></div>
<script src="js/libs/jquery-1.9.1.min.js"></script>
<script src="js/libs/jquery-cookie.min.js"></script>
<!--<script src="js/jquery.scrollTo-min.js"></script>-->
<!--<script src="js/libs/imagesloaded-pkgd.min.js"></script>-->
<script src="../js_src/libs/jquery-joyride-2-1.js"></script>
<!--<script src="js/libs/jquery-joyride-2-1.min.js"></script>-->
<script src="js/doodle3d-client.js"></script>
<!--<script src="js/doodle3d-client.min.js"></script>-->
<!-- DEBUG -->
<!--

View File

@ -899,6 +899,230 @@ function UpdatePanel() {
self.networkMode = networkMode;
}
}
var grandTour;
function GrandTour(_name) {
console.log("GrandTour");
this.tour = "";
this.name = _name;
var self = this;
this.init = function() {
console.log("GrandTour >> f:init()");
this.tour = function() {
$('#help_d3dIntro').joyride({
autoStart: false,
modal: true,
expose: true,
'tipAdjustmentX': 15,
'tipAdjustmentY': 15,
'tipLocation': 'bottom', // 'top' or 'bottom' in relation to parent
'nubPosition': 'auto', // override on a per tooltip bases
'scrollSpeed': 300, // Page scrolling speed in ms
// 'timer': 2000, // 0 = off, all other numbers = time(ms)
'startTimerOnClick': true, // true/false to start timer on first click
'nextButton': true, // true/false for next button visibility
'tipAnimation': 'fade', // 'pop' or 'fade' in each tip
'pauseAfter': [], // array of indexes where to pause the tour after
'tipAnimationFadeSpeed': 250, // if 'fade'- speed in ms of transition
// 'cookieMonster': true, // true/false for whether cookies are used
// 'cookieDomain': false, // set to false or yoursite.com
// 'cookieName': 'Doodle3DFirstTime', // choose your own cookie name
// 'localStorage': true, //
// 'localStorageKey': 'Doodle3DFirstTime', // choose your own cookie name
'preRideCallback' : self.preRideCallback,
'postStepCallback': self.postStepCallback, // A method to call after each step
'postRideCallback': self.postRideCallback // a method to call once the tour closes
});
};
this.tour();
};
this.preRideCallback = function(index, tip) {
console.log("GrandTour >> f:preRideCallback() >> index: " + index);
if ($.cookie("Doodle3DFirstTime") == "ridden" && index == 0) {
console.log("we've been here before...");
// $(this).joyride('set_li', false, 1);
}
if ($.cookie("Doodle3DFirstTime") == 'ridden') {
console.log("we've been here before...");
$(this).joyride('set_li', false);
}
// if (index == 0) {
// console.log("...yeah");
// $(this).joyride('set_li', false, 1);
// }
};
this.postStepCallback = function(index, tip) {
console.log("GrandTour >> f:postStepCallback() >> index: " + index);
};
this.postRideCallback = function(index, tip) {
console.log("GrandTour >> f:postRideCallback() >> index: " + index);
$(document).trigger(helpTours.TOURFINISHED, self.name);
if (index < $(this)[0].$tip_content.length - 1) {
console.log("doPostRideCallback >> ENDED BEFORE END");
helpTours.startTour(helpTours.INFOREMINDER);
// infoReminderTour.start();
} else {
console.log("doPostRideCallback >> this is the end my friend...");
// we should be at the end...
$.cookie("Doodle3DFirstTime", 'ridden', { expires: 365, domain: false, path: '/' });
}
};
this.start = function() {
console.log("GrandTour >> f:start()");
$(window).joyride('restart');
// self.tour();
};
}
var infoReminderTour;
function InfoReminderTour(_name) {
console.log("InfoReminderTour");
this.tour = "";
this.name = _name;
var self = this;
this.init = function(callback) {
console.log("InfoReminderTour >> f:init()");
this.tour = function() {
$('#help_InfoReminder').joyride({
autoStart: false,
modal: true,
expose: true,
'tipAdjustmentX': 15,
'tipAdjustmentY': 15,
'tipLocation': 'left', // 'top' or 'bottom' in relation to parent
'nubPosition': 'auto', // override on a per tooltip bases
'scrollSpeed': 300, // Page scrolling speed in ms
'nextButton': true, // true/false for next button visibility
'tipAnimation': 'fade', // 'pop' or 'fade' in each tip
'tipAnimationFadeSpeed': 250, // if 'fade'- speed in ms of transition
'preRideCallback' : self.preRideCallback,
'postStepCallback': self.postStepCallback, // A method to call after each step
'postRideCallback': self.postRideCallback // a method to call once the tour closes
});
}
this.tour();
if (callback != undefined) callback();
};
this.preRideCallback = function(index, tip) {
console.log("InfoReminderTour >> f:preRideCallback() >> index: " + index + ", tip: " , tip);
};
this.postStepCallback = function(index, tip) {
console.log("InfoReminderTour >> f:postStepCallback() >> index: " + index + ", tip: " , tip);
};
this.postRideCallback = function(index, tip) {
console.log("InfoReminderTour >> f:postRideCallback() >> index: " + index + ", tip: " , tip);
$(document).trigger(helpTours.TOURFINISHED, self.name);
};
this.start = function() {
console.log("InfoReminderTour >> f:start()");
$(window).joyride('restart');
// self.tour();
};
}
function initHelp() {
console.log("f:initHelp()");
// grandTour = new GrandTour();
// infoReminderTour = new InfoReminderTour();
// first call inits the tour
// joyride2();
$("#helpContainer").load("helpcontent.html", function() {
console.log("helpContent loaded");
helpTours = new HelpTours();
helpTours.init();
// grandTour.init();
//// infoReminderTour.init();
//
// if ($.cookie("Doodle3DFirstTime") != "ridden") {
// console.log("intro tour has not been given yet > let's go!");
// setTimeout(grandTour.start, 1000);
// }
});
}
var helpTours;
function HelpTours() {
console.log("HelpTours");
this.WELCOMETOUR = "welcometour";
this.INFOREMINDER = "inforeminder";
this.TOURFINISHED = "tourfinished";
this.tourActive = false;
var self = this;
this.init = function() {
console.log("HelpTours >> f:init");
$(document).on(this.TOURFINISHED, this.tourEnded);
grandTour = new GrandTour(this.WELCOMETOUR);
infoReminderTour = new InfoReminderTour(this.INFOREMINDER);
if ($.cookie("Doodle3DFirstTime") != "ridden") {
console.log("HelpTours >> f:init >> intro tour has not been given yet > let's go! (this.WELCOMETOUR = " + this.WELCOMETOUR + ")");
setTimeout(this.startTour, 1000, this.WELCOMETOUR);
}
};
this.startTour = function(which) {
console.log("HelpTours >> f:startTour >> target to start: '" + which);
switch (which) {
case self.WELCOMETOUR:
// do welcometour
console.log("HelpTours >> f:startTour >> case this.WELCOMETOUR >> self.tourActive = " + self.tourActive);
if (this.tourActive) {
$(window).joyride('end');
this.tourActive = false;
}
$(window).joyride('destroy');
grandTour.init();
grandTour.start();
this.tourActive = true;
// $(window).joyride('restart');
break;
case self.INFOREMINDER:
// do info reminder
console.log("HelpTours >> f:startTour >> case self.INFOREMINDER >> self.tourActive = " + self.tourActive);
if (this.tourActive) {
$(window).joyride('end');
this.tourActive = false;
}
$(window).joyride('destroy');
infoReminderTour.init();
infoReminderTour.start();
this.tourActive = true;
break;
}
}
this.tourEnded = function(e, n) {
console.log("HelpTours >> f:tourEnded >> name: " + n);
this.tourActive = false;
}
}
function setTemperature(callback) {
if (callback != undefined) callback();
@ -1000,7 +1224,7 @@ function initButtonBehavior() {
$("#btnPrevious").css("opacity", "0.3");
btnNext.css("opacity", "0.3");
$("#btnSave").css("opacity", "0.3");
btnInfo.css("opacity", "0.3");
// btnInfo.css("opacity", "0.3");
// btnClear.click(function(e) {
// e.preventDefault();
@ -1125,6 +1349,7 @@ function initButtonBehavior() {
btnInfo.mouseup(function(e) {
e.preventDefault();
console.log("btnInfo mouse up");
helpTours.startTour(helpTours.WELCOMETOUR);
});
// DEBUG
@ -3322,6 +3547,7 @@ $(function() {
initSidebars();
initButtonBehavior();
initVerticalShapes();
initHelp();
thermometer.init($("#thermometerCanvas"), $("#thermometerContainer"));
progressbar.init($("#progressbarCanvas"), $("#progressbarCanvasContainer"));

File diff suppressed because one or more lines are too long

3
www/js/libs/jquery-1.9.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
www/js/libs/jquery-cookie.min.js vendored Normal file
View File

@ -0,0 +1 @@
!function(a,b,c){function d(a){return a}function e(a){return decodeURIComponent(a.replace(f," "))}var f=/\+/g;a.cookie=function(f,g,h){if(g!==c&&!/Object/.test(Object.prototype.toString.call(g))){if(h=a.extend({},a.cookie.defaults,h),null===g&&(h.expires=-1),"number"==typeof h.expires){var i=h.expires,j=h.expires=new Date;j.setDate(j.getDate()+i)}return g=String(g),b.cookie=[encodeURIComponent(f),"=",h.raw?g:encodeURIComponent(g),h.expires?"; expires="+h.expires.toUTCString():"",h.path?"; path="+h.path:"",h.domain?"; domain="+h.domain:"",h.secure?"; secure":""].join("")}h=g||a.cookie.defaults||{};for(var k,l=h.raw?d:e,m=b.cookie.split("; "),n=0;k=m[n]&&m[n].split("=");n++)if(l(k.shift())===f)return l(k.join("="));return null},a.cookie.defaults={},a.removeCookie=function(b,c){return null!==a.cookie(b,c)?(a.cookie(b,null,c),!0):!1}}(jQuery,document);

1
www/js/libs/jquery-joyride-2-1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,72 +0,0 @@
/*jshint eqnull:true */
/*!
* jQuery Cookie Plugin v1.2
* https://github.com/carhartl/jquery-cookie
*
* Copyright 2011, Klaus Hartl
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/GPL-2.0
*/
(function ($, document, undefined) {
var pluses = /\+/g;
function raw(s) {
return s;
}
function decoded(s) {
return decodeURIComponent(s.replace(pluses, ' '));
}
$.cookie = function (key, value, options) {
// key and at least value given, set cookie...
if (value !== undefined && !/Object/.test(Object.prototype.toString.call(value))) {
options = $.extend({}, $.cookie.defaults, options);
if (value === null) {
options.expires = -1;
}
if (typeof options.expires === 'number') {
var days = options.expires, t = options.expires = new Date();
t.setDate(t.getDate() + days);
}
value = String(value);
return (document.cookie = [
encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value),
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''
].join(''));
}
// key and possibly options given, get cookie...
options = value || $.cookie.defaults || {};
var decode = options.raw ? raw : decoded;
var cookies = document.cookie.split('; ');
for (var i = 0, parts; (parts = cookies[i] && cookies[i].split('=')); i++) {
if (decode(parts.shift()) === key) {
return decode(parts.join('='));
}
}
return null;
};
$.cookie.defaults = {};
$.removeCookie = function (key, options) {
if ($.cookie(key, options) !== null) {
$.cookie(key, null, options);
return true;
}
return false;
};
})(jQuery, document);