3
* author: Anthony DIllon
6
function WelcomeSystem($parent){
11
this.init = function(){
14
$('#welcome #welcome-screen ul a').bind('click',function(e){
15
_this.startTour($(this).attr('class'));
18
$('#welcome #welcome-screen .explore-mode').bind('click',function(e){
19
_this.startTour('explore-mode');
22
$('#welcome #welcome-screen .tour-mode').bind('click',function(e){
23
_this.startTour('tour-mode');
26
$('#welcome #welcome-screen .close').bind('click',function(e){
27
_this.startTour('explore-mode');
29
$('#welcome #welcome-screen').show();
30
var hash = window.location.hash;
31
if (hash != undefined) {
32
_this.startTour(hash.substring(1));
36
this.startTour = function(tourId) {
41
_parent.guidedTourSystem.setCurrentIndex(0);
42
_parent.systemMenu.handleMenuClick('home');
47
_parent.guidedTourSystem.setCurrentIndex(1);
48
_parent.systemMenu.handleMenuClick('firefox');
53
_parent.guidedTourSystem.setCurrentIndex(2);
54
_parent.systemMenu.handleMenuClick('email');
59
_parent.guidedTourSystem.setCurrentIndex(3);
60
_parent.systemMenu.handleMenuClick('shotwell');
65
_parent.guidedTourSystem.setCurrentIndex(4);
66
_parent.systemMenu.handleMenuClick('software');
68
case 'create-documents':
71
_parent.guidedTourSystem.setCurrentIndex(5);
72
_parent.systemMenu.handleMenuClick('writer');
74
case 'create-presentations':
77
_parent.guidedTourSystem.setCurrentIndex(6);
78
_parent.systemMenu.handleMenuClick('impress');
80
case 'create-spreadsheets':
83
_parent.guidedTourSystem.setCurrentIndex(7);
84
_parent.systemMenu.handleMenuClick('calc');
93
_parent.guidedTourSystem.setCurrentIndex(0);
94
_parent.systemMenu.handleMenuClick('home');
100
$('#tour-guide .explore-to-welcome').bind('click',function(){
103
$('#tour-guide .explore-to-welcome').bind('mouseover',function(){
104
$('#tour-guide .explore-tooltip-welcome').show();
106
$('#tour-guide .explore-to-welcome').bind('mouseout',function(){
107
$('#tour-guide .explore-tooltip-welcome').hide();
109
$('#tour-guide .explore-to-download').bind('mouseover',function(){
110
$('#tour-guide .explore-tooltip-download').show();
112
$('#tour-guide .explore-to-download').bind('mouseout',function(){
113
$('#tour-guide .explore-tooltip-download').hide();
115
$('#tour-guide .explore-to-download').bind('click',function(){
116
_parent.errorMessage.open();
118
/*if($('#tour-guide').is(':visible')){
119
$('.explore-to-welcome').css('bottom',210);
120
$('.explore-to-download').css('bottom',150);
122
$('.explore-to-welcome').css('bottom',80);
123
$('.explore-to-download').css('bottom',20);
127
this.open = function(){
129
$('#welcome').show();
133
this.center = function(){
134
var windowHeight = 575;//$('#welcome #welcome-screen').outerWidth(true);
135
var left = ($(document).width() / 2) - (windowHeight / 2);
136
var top = Math.max(24,($(document).height() / 2) - (windowHeight / 2));
137
$('#welcome #welcome-screen').css('left',left);
138
$('#welcome #welcome-screen').css('top',top);
141
this.resize = function(){
145
this.isOpen = function(){