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

224
js_src/Help.js Normal file
View File

@ -0,0 +1,224 @@
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;
}
}

924
js_src/libs/jquery-joyride-2-1.js vendored Executable file
View File

@ -0,0 +1,924 @@
/*
* jQuery Foundation Joyride Plugin 2.1
* http://foundation.zurb.com
* Copyright 2013, ZURB
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
/*jslint unparam: true, browser: true, indent: 2 */
;(function ($, window, undefined) {
'use strict';
var defaults = {
'version' : '2.1',
'tipLocation' : 'bottom', // 'top' or 'bottom' in relation to parent
'nubPosition' : 'auto', // override on a per tooltip bases
'scroll' : true, // whether to scroll to tips
'scrollSpeed' : 300, // Page scrolling speed in milliseconds
'timer' : 0, // 0 = no timer , all other numbers = timer in milliseconds
'autoStart' : false, // true or false - false tour starts when restart called
'startTimerOnClick' : true, // true or false - true requires clicking the first button start the timer
'startOffset' : 0, // the index of the tooltip you want to start on (index of the li)
'nextButton' : true, // true or false to control whether a next button is used
'tipAnimation' : 'fade', // 'pop' or 'fade' in each tip
'pauseAfter' : [], // array of indexes where to pause the tour after
'tipAnimationFadeSpeed': 300, // when tipAnimation = 'fade' this is speed in milliseconds for the transition
'cookieMonster' : false, // true or false to control whether cookies are used
'cookieName' : 'joyride', // Name the cookie you'll use
'cookieDomain' : false, // Will this cookie be attached to a domain, ie. '.notableapp.com'
'cookiePath' : false, // Set to '/' if you want the cookie for the whole website
'localStorage' : false, // true or false to control whether localstorage is used
'localStorageKey' : 'joyride', // Keyname in localstorage
'tipContainer' : 'body', // Where will the tip be attached
'modal' : false, // Whether to cover page with modal during the tour
'expose' : false, // Whether to expose the elements at each step in the tour (requires modal:true)
'postExposeCallback' : $.noop, // A method to call after an element has been exposed
'preRideCallback' : $.noop, // A method to call before the tour starts (passed index, tip, and cloned exposed element)
'postRideCallback' : $.noop, // A method to call once the tour closes (canceled or complete)
'preStepCallback' : $.noop, // A method to call before each step
'postStepCallback' : $.noop, // A method to call after each step
'template' : { // HTML segments for tip layout
'link' : '<a href="#close" class="joyride-close-tip">X</a>',
'timer' : '<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',
'tip' : '<div class="joyride-tip-guide"><span class="joyride-nub"></span></div>',
'wrapper' : '<div class="joyride-content-wrapper" role="dialog"></div>',
'button' : '<a href="#" class="joyride-next-tip"></a>',
'modal' : '<div class="joyride-modal-bg"></div>',
'expose' : '<div class="joyride-expose-wrapper"></div>',
'exposeCover': '<div class="joyride-expose-cover"></div>'
}
},
Modernizr = Modernizr || false,
settings = {},
methods = {
init : function (opts) {
return this.each(function () {
if ($.isEmptyObject(settings)) {
settings = $.extend(true, defaults, opts);
// non configurable settings
settings.document = window.document;
settings.$document = $(settings.document);
settings.$window = $(window);
settings.$content_el = $(this);
settings.$body = $(settings.tipContainer);
settings.body_offset = $(settings.tipContainer).position();
settings.$tip_content = $('> li', settings.$content_el);
settings.paused = false;
settings.attempts = 0;
settings.tipLocationPatterns = {
top: ['bottom'],
bottom: [], // bottom should not need to be repositioned
left: ['right', 'top', 'bottom'],
right: ['left', 'top', 'bottom']
};
// are we using jQuery 1.7+
methods.jquery_check();
// can we create cookies?
if (!$.isFunction($.cookie)) {
settings.cookieMonster = false;
}
// generate the tips and insert into dom.
if ( (!settings.cookieMonster || !$.cookie(settings.cookieName) ) &&
(!settings.localStorage || !methods.support_localstorage() || !localStorage.getItem(settings.localStorageKey) ) ) {
settings.$tip_content.each(function (index) {
methods.create({$li : $(this), index : index});
});
// show first tip
if(settings.autoStart)
{
if (!settings.startTimerOnClick && settings.timer > 0) {
methods.show('init');
methods.startTimer();
} else {
methods.show('init');
}
}
}
settings.$document.on('click.joyride', '.joyride-next-tip, .joyride-modal-bg', function (e) {
e.preventDefault();
if (settings.$li.next().length < 1) {
methods.end();
} else if (settings.timer > 0) {
clearTimeout(settings.automate);
methods.hide();
methods.show();
methods.startTimer();
} else {
methods.hide();
methods.show();
}
});
settings.$document.on('click.joyride', '.joyride-close-tip', function (e) {
e.preventDefault();
methods.end();
});
settings.$window.bind('resize.joyride', function (e) {
if(settings.$li){
if(settings.exposed && settings.exposed.length>0){
var $els = $(settings.exposed);
$els.each(function(){
var $this = $(this);
methods.un_expose($this);
methods.expose($this);
});
}
if (methods.is_phone()) {
methods.pos_phone();
} else {
methods.pos_default();
}
}
});
} else {
methods.restart();
}
});
},
// call this method when you want to resume the tour
resume : function () {
methods.set_li();
methods.show();
},
nextTip: function(){
if (settings.$li.next().length < 1) {
methods.end();
} else if (settings.timer > 0) {
clearTimeout(settings.automate);
methods.hide();
methods.show();
methods.startTimer();
} else {
methods.hide();
methods.show();
}
},
tip_template : function (opts) {
var $blank, content, $wrapper;
opts.tip_class = opts.tip_class || '';
$blank = $(settings.template.tip).addClass(opts.tip_class);
content = $.trim($(opts.li).html()) +
methods.button_text(opts.button_text) +
settings.template.link +
methods.timer_instance(opts.index);
$wrapper = $(settings.template.wrapper);
if (opts.li.attr('data-aria-labelledby')) {
$wrapper.attr('aria-labelledby', opts.li.attr('data-aria-labelledby'))
}
if (opts.li.attr('data-aria-describedby')) {
$wrapper.attr('aria-describedby', opts.li.attr('data-aria-describedby'))
}
$blank.append($wrapper);
$blank.first().attr('data-index', opts.index);
$('.joyride-content-wrapper', $blank).append(content);
return $blank[0];
},
timer_instance : function (index) {
var txt;
if ((index === 0 && settings.startTimerOnClick && settings.timer > 0) || settings.timer === 0) {
txt = '';
} else {
txt = methods.outerHTML($(settings.template.timer)[0]);
}
return txt;
},
button_text : function (txt) {
if (settings.nextButton) {
txt = $.trim(txt) || 'Next';
txt = methods.outerHTML($(settings.template.button).append(txt)[0]);
} else {
txt = '';
}
return txt;
},
create : function (opts) {
// backwards compatibility with data-text attribute
var buttonText = opts.$li.attr('data-button') || opts.$li.attr('data-text'),
tipClass = opts.$li.attr('class'),
$tip_content = $(methods.tip_template({
tip_class : tipClass,
index : opts.index,
button_text : buttonText,
li : opts.$li
}));
$(settings.tipContainer).append($tip_content);
},
show : function (init) {
var opts = {}, ii, opts_arr = [], opts_len = 0, p,
$timer = null;
// are we paused?
if (settings.$li === undefined || ($.inArray(settings.$li.index(), settings.pauseAfter) === -1)) {
// don't go to the next li if the tour was paused
if (settings.paused) {
settings.paused = false;
} else {
methods.set_li(init);
}
settings.attempts = 0;
if (settings.$li.length && settings.$target.length > 0) {
if(init){ //run when we first start
settings.preRideCallback(settings.$li.index(), settings.$next_tip );
if(settings.modal){
methods.show_modal();
}
}
settings.preStepCallback(settings.$li.index(), settings.$next_tip );
// parse options
opts_arr = (settings.$li.data('options') || ':').split(';');
opts_len = opts_arr.length;
for (ii = opts_len - 1; ii >= 0; ii--) {
p = opts_arr[ii].split(':');
if (p.length === 2) {
opts[$.trim(p[0])] = $.trim(p[1]);
}
}
settings.tipSettings = $.extend({}, settings, opts);
settings.tipSettings.tipLocationPattern = settings.tipLocationPatterns[settings.tipSettings.tipLocation];
if(settings.modal && settings.expose){
methods.expose();
}
// scroll if not modal
if (!/body/i.test(settings.$target.selector) && settings.scroll) {
methods.scroll_to();
}
if (methods.is_phone()) {
methods.pos_phone(true);
} else {
methods.pos_default(true);
}
$timer = $('.joyride-timer-indicator', settings.$next_tip);
if (/pop/i.test(settings.tipAnimation)) {
$timer.outerWidth(0);
if (settings.timer > 0) {
settings.$next_tip.show();
$timer.animate({
width: $('.joyride-timer-indicator-wrap', settings.$next_tip).outerWidth()
}, settings.timer);
} else {
settings.$next_tip.show();
}
} else if (/fade/i.test(settings.tipAnimation)) {
$timer.outerWidth(0);
if (settings.timer > 0) {
settings.$next_tip.fadeIn(settings.tipAnimationFadeSpeed);
settings.$next_tip.show();
$timer.animate({
width: $('.joyride-timer-indicator-wrap', settings.$next_tip).outerWidth()
}, settings.timer);
} else {
settings.$next_tip.fadeIn(settings.tipAnimationFadeSpeed);
}
}
settings.$current_tip = settings.$next_tip;
// Focus next button for keyboard users.
$('.joyride-next-tip', settings.$current_tip).focus();
methods.tabbable(settings.$current_tip);
// skip non-existent targets
} else if (settings.$li && settings.$target.length < 1) {
methods.show();
} else {
methods.end();
}
} else {
settings.paused = true;
}
},
// detect phones with media queries if supported.
is_phone : function () {
if (Modernizr) {
return Modernizr.mq('only screen and (max-width: 767px)');
}
return (settings.$window.width() < 767) ? true : false;
},
support_localstorage : function () {
if (Modernizr) {
return Modernizr.localstorage;
} else {
return !!window.localStorage;
}
},
hide : function () {
if(settings.modal && settings.expose){
methods.un_expose();
}
if(!settings.modal){
$('.joyride-modal-bg').hide();
}
settings.$current_tip.hide();
settings.postStepCallback(settings.$li.index(), settings.$current_tip);
},
set_li : function (init) {
if (init) {
settings.$li = settings.$tip_content.eq(settings.startOffset);
methods.set_next_tip();
settings.$current_tip = settings.$next_tip;
} else {
settings.$li = settings.$li.next();
methods.set_next_tip();
}
methods.set_target();
},
set_next_tip : function () {
settings.$next_tip = $('.joyride-tip-guide[data-index=' + settings.$li.index() + ']');
},
set_target : function () {
var cl = settings.$li.attr('data-class'),
id = settings.$li.attr('data-id'),
$sel = function () {
if (id) {
return $(settings.document.getElementById(id));
} else if (cl) {
return $('.' + cl).filter(":visible").first();
} else {
return $('body');
}
};
settings.$target = $sel();
},
scroll_to : function () {
var window_half, tipOffset;
window_half = settings.$window.height() / 2;
tipOffset = Math.ceil(settings.$target.offset().top - window_half + settings.$next_tip.outerHeight());
$("html, body").stop().animate({
scrollTop: tipOffset
}, settings.scrollSpeed);
},
paused : function () {
if (($.inArray((settings.$li.index() + 1), settings.pauseAfter) === -1)) {
return true;
}
return false;
},
destroy : function () {
if(!$.isEmptyObject(settings)){
settings.$document.off('.joyride');
}
$(window).off('.joyride');
$('.joyride-close-tip, .joyride-next-tip, .joyride-modal-bg').off('.joyride');
$('.joyride-tip-guide, .joyride-modal-bg').remove();
clearTimeout(settings.automate);
settings = {};
},
restart : function () {
if(!settings.autoStart)
{
if (!settings.startTimerOnClick && settings.timer > 0) {
methods.show('init');
methods.startTimer();
} else {
methods.show('init');
}
settings.autoStart = true;
}
else
{
methods.hide();
settings.$li = undefined;
methods.show('init');
}
},
pos_default : function (init) {
var half_fold = Math.ceil(settings.$window.height() / 2),
tip_position = settings.$next_tip.offset(),
$nub = $('.joyride-nub', settings.$next_tip),
nub_width = Math.ceil($nub.outerWidth() / 2),
nub_height = Math.ceil($nub.outerHeight() / 2),
toggle = init || false;
// tip must not be "display: none" to calculate position
if (toggle) {
settings.$next_tip.css('visibility', 'hidden');
settings.$next_tip.show();
}
if (!/body/i.test(settings.$target.selector)) {
var
topAdjustment = settings.tipSettings.tipAdjustmentY ? parseInt(settings.tipSettings.tipAdjustmentY) : 0,
leftAdjustment = settings.tipSettings.tipAdjustmentX ? parseInt(settings.tipSettings.tipAdjustmentX) : 0;
if (methods.bottom()) {
settings.$next_tip.css({
top: (settings.$target.offset().top + nub_height + settings.$target.outerHeight() + topAdjustment),
left: settings.$target.offset().left - settings.$next_tip.outerWidth() + leftAdjustment});
if (/right/i.test(settings.tipSettings.nubPosition)) {
settings.$next_tip.css('left', settings.$target.offset().left + settings.$target.outerWidth());
}
methods.nub_position($nub, settings.tipSettings.nubPosition, 'top');
} else if (methods.top()) {
settings.$next_tip.css({
top: (settings.$target.offset().top - settings.$next_tip.outerHeight() - nub_height - topAdjustment),
left: settings.$target.offset().left - (settings.$next_tip.outerWidth() * .8) + leftAdjustment});
methods.nub_position($nub, settings.tipSettings.nubPosition, 'bottom');
} else if (methods.right()) {
settings.$next_tip.css({
top: settings.$target.offset().top + topAdjustment,
left: (settings.$target.outerWidth() + settings.$target.offset().left + nub_width) + leftAdjustment});
methods.nub_position($nub, settings.tipSettings.nubPosition, 'left');
} else if (methods.left()) {
settings.$next_tip.css({
top: settings.$target.offset().top + topAdjustment,
left: (settings.$target.offset().left - settings.$next_tip.outerWidth() - nub_width) - leftAdjustment});
methods.nub_position($nub, settings.tipSettings.nubPosition, 'right');
}
if (!methods.visible(methods.corners(settings.$next_tip)) && settings.attempts < settings.tipSettings.tipLocationPattern.length) {
$nub.removeClass('bottom')
.removeClass('top')
.removeClass('right')
.removeClass('left');
settings.tipSettings.tipLocation = settings.tipSettings.tipLocationPattern[settings.attempts];
settings.attempts++;
methods.pos_default(true);
}
} else if (settings.$li.length) {
methods.pos_modal($nub);
}
if (toggle) {
settings.$next_tip.hide();
settings.$next_tip.css('visibility', 'visible');
}
},
pos_phone : function (init) {
var tip_height = settings.$next_tip.outerHeight(),
tip_offset = settings.$next_tip.offset(),
target_height = settings.$target.outerHeight(),
$nub = $('.joyride-nub', settings.$next_tip),
nub_height = Math.ceil($nub.outerHeight() / 2),
toggle = init || false;
$nub.removeClass('bottom')
.removeClass('top')
.removeClass('right')
.removeClass('left');
if (toggle) {
settings.$next_tip.css('visibility', 'hidden');
settings.$next_tip.show();
}
if (!/body/i.test(settings.$target.selector)) {
if (methods.top()) {
settings.$next_tip.offset({top: settings.$target.offset().top - tip_height - nub_height});
$nub.addClass('bottom');
} else {
settings.$next_tip.offset({top: settings.$target.offset().top + target_height + nub_height});
$nub.addClass('top');
}
} else if (settings.$li.length) {
methods.pos_modal($nub);
}
if (toggle) {
settings.$next_tip.hide();
settings.$next_tip.css('visibility', 'visible');
}
},
pos_modal : function ($nub) {
methods.center();
$nub.hide();
methods.show_modal();
},
show_modal : function() {
if ($('.joyride-modal-bg').length < 1) {
$('body').append(settings.template.modal).show();
}
if (/pop/i.test(settings.tipAnimation)) {
$('.joyride-modal-bg').show();
} else {
$('.joyride-modal-bg').fadeIn(settings.tipAnimationFadeSpeed);
}
},
expose: function(){
var expose,
exposeCover,
el,
origCSS,
randId = 'expose-'+Math.floor(Math.random()*10000);
if (arguments.length>0 && arguments[0] instanceof $){
el = arguments[0];
} else if(settings.$target && !/body/i.test(settings.$target.selector)){
el = settings.$target;
} else {
return false;
}
if(el.length < 1){
if(window.console){
console.error('element not valid', el);
}
return false;
}
expose = $(settings.template.expose);
settings.$body.append(expose);
// console.log("JOYRIDE >> EXPOSE INFO >> el[0].clientWidth: " + el[0].clientWidth + ", el: " , el , ", el[0]: " , el[0] , ", el.offset: " , el.offset() , ", el.clientWidth: " + el.clientWidth + ", el.outerWidth: " + el.outerWidth(true))
expose.css({
top: el.offset().top,
left: el.offset().left,
width: el[0].clientWidth,
height: el[0].clientHeight
// width: el.outerWidth(true),
// height: el.outerHeight(true)
});
exposeCover = $(settings.template.exposeCover);
origCSS = {
zIndex: el.css('z-index'),
position: el.css('position')
};
el.css('z-index',expose.css('z-index')*1+1);
if(origCSS.position == 'static'){
el.css('position','relative');
}
el.data('expose-css',origCSS);
exposeCover.css({
top: el.offset().top,
left: el.offset().left,
width: el.outerWidth(true),
height: el.outerHeight(true)
});
settings.$body.append(exposeCover);
expose.addClass(randId);
exposeCover.addClass(randId);
if(settings.tipSettings['exposeClass']){
expose.addClass(settings.tipSettings['exposeClass']);
exposeCover.addClass(settings.tipSettings['exposeClass']);
}
el.data('expose', randId);
settings.postExposeCallback(settings.$li.index(), settings.$next_tip, el);
methods.add_exposed(el);
},
un_expose: function(){
var exposeId,
el,
expose ,
origCSS,
clearAll = false;
if (arguments.length>0 && arguments[0] instanceof $){
el = arguments[0];
} else if(settings.$target && !/body/i.test(settings.$target.selector)){
el = settings.$target;
} else {
return false;
}
if(el.length < 1){
if(window.console){
console.error('element not valid', el);
}
return false;
}
exposeId = el.data('expose');
expose = $('.'+exposeId);
if(arguments.length>1){
clearAll = arguments[1];
}
if(clearAll === true){
$('.joyride-expose-wrapper,.joyride-expose-cover').remove();
} else {
expose.remove();
}
origCSS = el.data('expose-css');
if(origCSS.zIndex == 'auto'){
el.css('z-index', '');
} else {
el.css('z-index',origCSS.zIndex);
}
if(origCSS.position != el.css('position')){
if(origCSS.position == 'static'){// this is default, no need to set it.
el.css('position', '');
} else {
el.css('position',origCSS.position);
}
}
el.removeData('expose');
el.removeData('expose-z-index');
methods.remove_exposed(el);
},
add_exposed: function(el){
settings.exposed = settings.exposed || [];
if(el instanceof $){
settings.exposed.push(el[0]);
} else if(typeof el == 'string'){
settings.exposed.push(el);
}
},
remove_exposed: function(el){
var search;
if(el instanceof $){
search = el[0]
} else if (typeof el == 'string'){
search = el;
}
settings.exposed = settings.exposed || [];
for(var i=0; i<settings.exposed.length; i++){
if(settings.exposed[i] == search){
settings.exposed.splice(i,1);
return;
}
}
},
center : function () {
var $w = settings.$window;
settings.$next_tip.css({
top : ((($w.height() - settings.$next_tip.outerHeight()) / 2) + $w.scrollTop()),
left : ((($w.width() - settings.$next_tip.outerWidth()) / 2) + $w.scrollLeft())
});
return true;
},
bottom : function () {
return /bottom/i.test(settings.tipSettings.tipLocation);
},
top : function () {
return /top/i.test(settings.tipSettings.tipLocation);
},
right : function () {
return /right/i.test(settings.tipSettings.tipLocation);
},
left : function () {
return /left/i.test(settings.tipSettings.tipLocation);
},
corners : function (el) {
var w = settings.$window,
window_half = w.height() / 2,
tipOffset = Math.ceil(settings.$target.offset().top - window_half + settings.$next_tip.outerHeight()),//using this to calculate since scroll may not have finished yet.
right = w.width() + w.scrollLeft(),
offsetBottom = w.height() + tipOffset,
bottom = w.height() + w.scrollTop(),
top = w.scrollTop();
if(tipOffset < top){
if (tipOffset <0 ){
top = 0;
} else {
top = tipOffset;
}
}
if(offsetBottom > bottom){
bottom = offsetBottom;
}
return [
el.offset().top < top,
right < el.offset().left + el.outerWidth(),
bottom < el.offset().top + el.outerHeight(),
w.scrollLeft() > el.offset().left
];
},
visible : function (hidden_corners) {
var i = hidden_corners.length;
while (i--) {
if (hidden_corners[i]) return false;
}
return true;
},
nub_position : function (nub, pos, def) {
if (pos === 'auto') {
nub.addClass(def);
} else {
nub.addClass(pos);
}
},
startTimer : function () {
if (settings.$li.length) {
settings.automate = setTimeout(function () {
methods.hide();
methods.show();
methods.startTimer();
}, settings.timer);
} else {
clearTimeout(settings.automate);
}
},
end : function () {
if (settings.cookieMonster) {
$.cookie(settings.cookieName, 'ridden', { expires: 365, domain: settings.cookieDomain, path: settings.cookiePath });
}
if (settings.localStorage) {
localStorage.setItem(settings.localStorageKey, true);
}
if (settings.timer > 0) {
clearTimeout(settings.automate);
}
if(settings.modal && settings.expose){
methods.un_expose();
}
if (settings.$current_tip) {
settings.$current_tip.hide();
}
if (settings.$li) {
settings.postStepCallback(settings.$li.index(), settings.$current_tip);
settings.postRideCallback(settings.$li.index(), settings.$current_tip);
}
$('.joyride-modal-bg').hide();
},
jquery_check : function () {
// define on() and off() for older jQuery
if (!$.isFunction($.fn.on)) {
$.fn.on = function (types, sel, fn) {
return this.delegate(sel, types, fn);
};
$.fn.off = function (types, sel, fn) {
return this.undelegate(sel, types, fn);
};
return false;
}
return true;
},
outerHTML : function (el) {
// support FireFox < 11
return el.outerHTML || new XMLSerializer().serializeToString(el);
},
version : function () {
return settings.version;
},
tabbable : function (el) {
$(el).on('keydown', function( event ) {
if (!event.isDefaultPrevented() && event.keyCode &&
// Escape key.
event.keyCode === 27 ) {
event.preventDefault();
methods.end();
return;
}
// Prevent tabbing out of tour items.
if ( event.keyCode !== 9 ) {
return;
}
var tabbables = $(el).find(":tabbable"),
first = tabbables.filter(":first"),
last = tabbables.filter(":last");
if ( event.target === last[0] && !event.shiftKey ) {
first.focus( 1 );
event.preventDefault();
} else if ( event.target === first[0] && event.shiftKey ) {
last.focus( 1 );
event.preventDefault();
}
});
}
};
$.fn.joyride = function (method) {
if (methods[method]) {
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
} else if (typeof method === 'object' || !method) {
return methods.init.apply(this, arguments);
} else {
$.error('Method ' + method + ' does not exist on jQuery.joyride');
}
};
}(jQuery, this));

View File

@ -22,17 +22,17 @@ img {
}
#landscape {
position:absolute;
background-color: #fff;
// 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;
// z-index: 5;
overflow: hidden;
margin: 0px auto;
margin: 0 auto;
outline: 2px solid #5e8c71;
box-shadow: 0 0 8px rgba(8, 8, 8, 0.25);
}

View File

@ -2,7 +2,7 @@
.leftpanel {
position: absolute;
width: 17%;
/* background-color: rgba(67, 204, 67, 0.4);*/
// background-color: rgba(67, 204, 67, 0.4);
top: 0px;
left: 0px;
bottom: 0px;

View File

@ -2,7 +2,7 @@
.rightpanel {
position: absolute;
width: 17%;
/* background-color: rgba(255, 0, 254, 0.4);*/
// background-color: rgba(255, 0, 254, 0.4);
top: 0;
right: 0;
bottom: 0;

39
less/help.less Normal file
View File

@ -0,0 +1,39 @@
#helpContainer {
display: none;
margin: 0;
padding: 0;
}
// info -> on first visit
.joyride-tip-guide {
&.d3dInfoWelcomePanel {
width: 460px;
padding: 25px;
}
}
/*
.my-tour-overlay {
display: none;
background: #666;
opacity: 0.6;
z-index: 9997;
min-height: 100%;
height: 100%;
position: fixed;
top: 0; right: 0; bottom: 0; left: 0;
// outline: 4px solid #f80;
// box-shadow: 0 0 14px rgba( 255, 0, 255, 1.0 );
}
.my-tour-highlight {
background: #fff;
// position: relative;
border-radius: 4px;
// outline: 4px solid #08f;
// box-shadow: 0 0 14px rgba( 255, 0, 255, 1.0 );
z-index: 9998;
}
*/

273
less/help_joyride-2.1.less Normal file
View File

@ -0,0 +1,273 @@
/* Artfully masterminded by ZURB */
body {
/*position: relative;*/
}
//#joyRideTipContent { display: none; }
//
//.joyRideTipContent { display: none; }
/* Default styles for the container */
.joyride-tip-guide {
position: absolute;
// background: #000;
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-family: "HelveticaNeue", "Helvetica Neue", "Helvetica", Helvetica, Arial, Lucida, sans-serif;
font-weight: normal;
border-radius: 10px;
border: 3px solid #5FCE4F;
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;
-moz-border-radius: 0;
-webkit-border-radius: 0;
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;
// box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
}
.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: #000;
border-color: rgba(67, 216, 20, 1.0);
// 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;
}
.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: #000;
border-color: rgba(67, 216, 20, 1.0) !important;
// border-color: rgba(0,0,0,0.8) !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: #000;
border-color: rgba(67, 216, 20, 1.0) !important;
// border-color: rgba(0,0,0,0.8) !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: #000;
border-color: rgba(67, 216, 20, 1.0) !important;
// border-color: rgba(0,0,0,0.8) !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 {
//}
.joyride-tip-guide {
h1, h2, h3, h4, h5, h6 {
line-height: 1.25;
margin: 0;
font-weight: bold;
color: #2DDF34;
// color: #fff;
}
}
.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: rgb(255,255,255);
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: rgb(255,255,255);
border: solid 1px rgb(0,60,180);
background: rgb(0,99,255);
background: -moz-linear-gradient(top, rgb(0,99,255) 0%, rgb(0,85,214) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(0,99,255)), color-stop(100%,rgb(0,85,214)));
background: -webkit-linear-gradient(top, rgb(0,99,255) 0%,rgb(0,85,214) 100%);
background: -o-linear-gradient(top, rgb(0,99,255) 0%,rgb(0,85,214) 100%);
background: -ms-linear-gradient(top, rgb(0,99,255) 0%,rgb(0,85,214) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0063ff', endColorstr='#0055d6',GradientType=0 );
background: linear-gradient(top, rgb(0,99,255) 0%,rgb(0,85,214) 100%);
text-shadow: 0 -1px 0 rgba(0,0,0,0.5);
border-radius: 2px;
box-shadow: 0px 1px 0px rgba(255,255,255,0.3) inset;
}
.joyride-next-tip:hover {
color: rgb(255,255,255) !important;
border: solid 1px rgb(0,60,180) !important;
background: rgb(43,128,255);
background: -moz-linear-gradient(top, rgb(43,128,255) 0%, rgb(29,102,211) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(43,128,255)), color-stop(100%,rgb(29,102,211)));
background: -webkit-linear-gradient(top, rgb(43,128,255) 0%,rgb(29,102,211) 100%);
background: -o-linear-gradient(top, rgb(43,128,255) 0%,rgb(29,102,211) 100%);
background: -ms-linear-gradient(top, rgb(43,128,255) 0%,rgb(29,102,211) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2b80ff', endColorstr='#1d66d3',GradientType=0 );
background: linear-gradient(top, rgb(43,128,255) 0%,rgb(29,102,211) 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(255,255,255,0.4) !important;
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;
// color: rgba(255,255,255,0.9) !important;
}
.joyride-modal-bg {
position: fixed;
height: 100%;
width: 100%;
// background: rgb(0,0,0);
// background: transparent;
background: rgba(0,0,0, 0.30);
// -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
// filter: alpha(opacity=50);
// opacity: 0.5;
z-index: 100;
display: none;
top: 0;
left: 0;
cursor: pointer;
}
.joyride-expose-wrapper {
background-color: #ffffff;
position: absolute;
z-index: 102;
-moz-box-shadow: 0px 0px 30px #ffffff;
-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;
}

View File

@ -1,5 +1,8 @@
// IMPORTS
//@import "normalize.min.less";
//@import "jquery-tourbus.less";
@import "help_joyride-2.1.less";
@import "help.less";
@import "base.less";
@import "settingsPopup.less";
@import "message.less";
@ -23,5 +26,3 @@
@media only screen and (orientation:portrait) {
@import "portrait.less";
}
@import "jquery-tourbus.less";

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