From f1216cf04b35cf63ee08c18581daa7c9a73cbf70 Mon Sep 17 00:00:00 2001
From: rkenyon1969
Date: Wed, 7 Sep 2016 11:12:03 -0400
Subject: [PATCH 01/37] modified centerTour.js and tour.js to support changes
to tour in Hud
---
app/js/tour/centerTour.js | 100 ++++++++++++++++++++++++++++++--------
app/js/tour/tour.js | 22 +++++----
2 files changed, 93 insertions(+), 29 deletions(-)
diff --git a/app/js/tour/centerTour.js b/app/js/tour/centerTour.js
index 2a83f64e8..329419d0b 100644
--- a/app/js/tour/centerTour.js
+++ b/app/js/tour/centerTour.js
@@ -1,15 +1,31 @@
'use strict';
-var {CENTER_URL} = require('ozp-react-commons/OzoneConfig');
+var {CENTER_URL, HUD_URL} = require('ozp-react-commons/OzoneConfig');
CENTER_URL = `/${CENTER_URL.match(/http.?:\/\/[^/]*\/(.*?)\/?$/)[1]}/`;
var PubSub = require('browser-pubsub');
var tourCh = new PubSub('tour');
var ObjectDB = require('object-db');
-var tourDB = new ObjectDB('ozp_tour');
+// rjk
+var tourDBMain = new ObjectDB('ozp_tour').init();
+var tourDB = tourDBMain.get();
+var contentLocalHUD = '';
+var contentLocalStart = '';
-var ProfileSearchActions = require('../actions/ProfileSearchActions');
+console.log(tourDBMain);
+console.log(tourDB);
+
+if (typeof tourDB.hud !== 'undefined' && (tourDB.hud.ran === true || tourDB.hud.startHudTour === true)){
+ contentLocalStart = "Continue tour";
+}else{
+ contentLocalStart = "Start the tour";
+}
+if (typeof tourDB.hud !== 'undefined' && (tourDB.hud.ran === true)){
+ contentLocalHUD = '';
+}
+
+var ProfileSearchActions = require('../actions/ProfileSearchActions');
var readyObject = {};
// HACK: for some reason window.localstorage is lost in this file.
@@ -30,12 +46,12 @@ const meTour = new Tour({
//0
{
title: "Welcome. ",
- content: "This simple tour guides you through the toolbar items and introduces you to the primary components of the system: The Center, HUD, and Webtop. These three components enable you to discover, bookmark, rate, review, organize and launch mission and business applications from across the enterprise.",
+ content: "This simple tour guides you through the toolbar items and introduces you to the primary components of the system: The HUD, Center and Webtop. These three components enable you to discover, bookmark, rate, review, organize and launch mission and business applications from across the enterprise.",
orphan: true,
onShown: function(){
$('#welcome').focus();
},
- template: '
Welcome to
'
+ template: '
Welcome to
'
},
//1
{
@@ -45,6 +61,9 @@ const meTour = new Tour({
placement: "bottom",
onShown: function(){
$('#tourstop-hud').focus();
+ if(tourDB.global_ran===true){
+ meTour.goTo(7);
+ }
},
backdropContainer: ".navbar-fixed-top",
backdropPadding: 0
@@ -111,18 +130,24 @@ const meTour = new Tour({
},
onHidden: function() {
$("#tourstop-global-menu").removeClass("open");
+ },
+ onNext: function() {
+ tourDBMain.set({
+ global_ran: true
+ });
}
},
//7
{
element: "#tourstop-center-search",
title: "Search and Filter",
- content: "Use keywords and filters to explore listings. When you enter a search term, the system looks for your term in the listing's name, description, tags, etc.",
- placement: "bottom",
+ content: "Use keywords and filters like listings type and organizations to explore listings. When you enter a search term, the system looks for your term in the listing's name, description, tags, etc.",
+ placement: "left",
onShown: function(){
$('#tourstop-center-search').focus();
},
backdropContainer: "#header"
+ //backdropContainer: ".form-group .Search"
},
//8
{
@@ -161,7 +186,7 @@ const meTour = new Tour({
},
onNext: function() {
var nextStep = function() {
- meTour.goTo(11);
+ meTour.goTo(12);
};
(function checkStatus() {
if (readyObject.overviewLoaded) {
@@ -173,6 +198,34 @@ const meTour = new Tour({
}
},
//11
+ {
+ path: `${CENTER_URL}#/home/?%2F%3F=`,
+ element: ".Discovery__SearchResults .listing:first, .infiniteScroll",
+ title: "Bookmark Listings for HUD tour steps",
+ content: "Hover over 3 tiles to bookmark them to your HUD. The tiles will be used to complete the tour in HUD.",
+ placement: "top",
+ orphan:true,
+ //backdrop: false,
+ onShown: function() {
+ $(".Discovery__SearchResults .listing:first .slide-up, .infiniteScroll .listing:first .slide-up").css("top", "0px");
+ },
+ onHide: function() {
+ $(".Discovery__SearchResults .listing:first .slide-up, .infiniteScroll .listing:first .slide-up").css("top", "137px");
+ },
+ onNext: function() {
+ var nextStep = function() {
+ meTour.goTo(12);
+ };
+ (function checkStatus() {
+ if (readyObject.overviewLoaded) {
+ nextStep();
+ } else {
+ setTimeout(checkStatus, 100);
+ }
+ })();
+ }
+ },
+ //12
{
path: `${CENTER_URL}#/home/?%2F%3F=&listing=1&action=view&tab=overview`,
element: ".modal-body",
@@ -187,7 +240,7 @@ const meTour = new Tour({
tourCh.publish({
overviewLoaded: false
});
- meTour.goTo(12);
+ meTour.goTo(13);
};
(function checkStatus() {
if (readyObject.reviewsLoaded) {
@@ -200,10 +253,9 @@ const meTour = new Tour({
onPrev: function() {
$(".quickview").modal("hide");
meTour.goTo(10);
-
}
},
- //12
+ //13
{
path: `${CENTER_URL}#/home/?%2F%3F=&listing=1&action=view&tab=reviews`,
element: ".modal-body .nav .active",
@@ -218,7 +270,7 @@ const meTour = new Tour({
tourCh.publish({
reviewsLoaded: false
});
- meTour.goTo(13);
+ meTour.goTo(14);
};
(function checkStatus() {
if (readyObject.detailsLoaded) {
@@ -230,7 +282,7 @@ const meTour = new Tour({
},
onPrev: function() {
var prevStep = function() {
- meTour.goTo(11);
+ meTour.goTo(12);
};
(function checkStatus() {
if (readyObject.overviewLoaded) {
@@ -241,7 +293,7 @@ const meTour = new Tour({
})();
}
},
- //13
+ //14
{
path: `${CENTER_URL}#/home/?%2F%3F=&listing=1&action=view&tab=details`,
element: ".modal-body .nav .active",
@@ -256,7 +308,7 @@ const meTour = new Tour({
tourCh.publish({
detailsLoaded: false
});
- meTour.goTo(14);
+ meTour.goTo(15);
};
(function checkStatus() {
if (readyObject.resourcesLoaded) {
@@ -268,7 +320,7 @@ const meTour = new Tour({
},
onPrev: function() {
var prevStep = function() {
- meTour.goTo(12);
+ meTour.goTo(13);
};
(function checkStatus() {
if (readyObject.reviewsLoaded) {
@@ -279,24 +331,32 @@ const meTour = new Tour({
})();
}
},
- //14
+ //15
{
path: `${CENTER_URL}#/home/?%2F%3F=&listing=1&action=view&tab=resources`,
element: ".modal-body .nav .active",
title: "Listing Resources",
- content: "If the listing includes instructions like user manuals and contact information, you will find it here.Thank you for taking the time to tour AppsMall.",
+ content: "If the listing includes instructions like user manuals and contact information, you will find it here. Thank you for taking the time to tour AppsMall.",
placement: "bottom",
backdropContainer: ".modal-content",
backdropPadding: 0,
orphan:true,
- template: '
',
+ template: '
'+ contentLocalHUD +'
',
+ onShow: function() {
+ tourDBMain.set({
+ center: {
+ ran: true,
+ startCenterTour: true
+ }
+ });
+ },
onNext: function() {meTour.end();},
onPrev: function() {
var prevStep = function() {
tourCh.publish({
resourcesLoaded: false
});
- meTour.goTo(13);
+ meTour.goTo(14);
};
(function checkStatus() {
if (readyObject.detailsLoaded) {
diff --git a/app/js/tour/tour.js b/app/js/tour/tour.js
index 9dfaed1b6..3cd73da3f 100644
--- a/app/js/tour/tour.js
+++ b/app/js/tour/tour.js
@@ -3,19 +3,22 @@ var ProfileSearchActions = require('../actions/ProfileSearchActions');
var $ = require('jquery');
var ObjectDB = require('object-db');
+var tourDB = new ObjectDB('ozp_tour').init();
// Setup our LocalstorageDB we will use this to talk between Center,
// Webtop and Hud tours.
-var tourDB = new ObjectDB('ozp_tour').init({
- center: {
- ran: false,
- startCenterTour: false
- }
-});
+//var tourDB = new ObjectDB('ozp_tour').init({ // rjk
+if (typeof tourDB.db.data.center === 'undefined') {
+ tourDB.set({
+ center: {
+ ran: false,
+ startCenterTour: false
+ }
+ });
+}
var { globalTour, centerTour } = require('./');
-
var centerStatus = tourDB.get('center');
var initTour = function() {
@@ -32,7 +35,8 @@ ProfileSearchActions.tourCheck.listen(() => {
tourDB.set({
center: {
ran: true
- }
+ },
+ center_ran:true
});
});
@@ -41,5 +45,5 @@ ProfileSearchActions.tourCheck.listen(() => {
$(document).on('click', '#tour-start', function(e){
e.preventDefault();
- centerTour.restart().goTo(1);
+ centerTour.restart().goTo(0);
});
From e69f88539aa2cd6d12d83fdc6d5d33a0965642c6 Mon Sep 17 00:00:00 2001
From: rkenyon1969
Date: Wed, 7 Sep 2016 13:30:54 -0400
Subject: [PATCH 02/37] fix: new code to redirect at end of center tour
---
app/js/tour/centerTour.js | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/app/js/tour/centerTour.js b/app/js/tour/centerTour.js
index 329419d0b..0914b406b 100644
--- a/app/js/tour/centerTour.js
+++ b/app/js/tour/centerTour.js
@@ -12,9 +12,6 @@ var tourDB = tourDBMain.get();
var contentLocalHUD = '';
var contentLocalStart = '';
-console.log(tourDBMain);
-console.log(tourDB);
-
if (typeof tourDB.hud !== 'undefined' && (tourDB.hud.ran === true || tourDB.hud.startHudTour === true)){
contentLocalStart = "Continue tour";
}else{
@@ -350,7 +347,13 @@ const meTour = new Tour({
}
});
},
- onNext: function() {meTour.end();},
+ onNext: function(){
+ if (typeof tourDB.hud === 'undefined' || tourDB.hud.ran === false){
+ document.location.href = HUD_URL;
+ }else{
+ meTour.end();
+ }
+ },
onPrev: function() {
var prevStep = function() {
tourCh.publish({
From e7e7da77f91936050eeb5080f5e5a136d0062a5d Mon Sep 17 00:00:00 2001
From: rkenyon1969
Date: Wed, 7 Sep 2016 13:50:06 -0400
Subject: [PATCH 03/37] fix: centerTour.js
---
app/js/tour/centerTour.js | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/js/tour/centerTour.js b/app/js/tour/centerTour.js
index 0914b406b..0cd60ea35 100644
--- a/app/js/tour/centerTour.js
+++ b/app/js/tour/centerTour.js
@@ -369,6 +369,9 @@ const meTour = new Tour({
}
})();
}
+ },
+ {
+ title: "end holder"
}
]
});
From 7f3d4f86ce3786fc32218fa1b76d9f03a0d279eb Mon Sep 17 00:00:00 2001
From: rkenyon1969
Date: Wed, 7 Sep 2016 16:23:06 -0400
Subject: [PATCH 04/37] Fix: reset global_ran when restarting tour
---
app/js/tour/tour.js | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/js/tour/tour.js b/app/js/tour/tour.js
index 3cd73da3f..49b4f51a4 100644
--- a/app/js/tour/tour.js
+++ b/app/js/tour/tour.js
@@ -45,5 +45,8 @@ ProfileSearchActions.tourCheck.listen(() => {
$(document).on('click', '#tour-start', function(e){
e.preventDefault();
+ tourDB.set({
+ global_ran: false
+ });
centerTour.restart().goTo(0);
});
From a512cf24372ef4de6ff6c09c1553547aae80cd12 Mon Sep 17 00:00:00 2001
From: Matt Wisniewski
Date: Thu, 8 Sep 2016 12:40:06 -0400
Subject: [PATCH 05/37] Update centerTour.js
---
app/js/tour/centerTour.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/js/tour/centerTour.js b/app/js/tour/centerTour.js
index 0cd60ea35..d6ae283fd 100644
--- a/app/js/tour/centerTour.js
+++ b/app/js/tour/centerTour.js
@@ -6,7 +6,7 @@ CENTER_URL = `/${CENTER_URL.match(/http.?:\/\/[^/]*\/(.*?)\/?$/)[1]}/`;
var PubSub = require('browser-pubsub');
var tourCh = new PubSub('tour');
var ObjectDB = require('object-db');
-// rjk
+
var tourDBMain = new ObjectDB('ozp_tour').init();
var tourDB = tourDBMain.get();
var contentLocalHUD = '';
From 6aa82a9c83ce0a8be373f912af1b161c31f1a82a Mon Sep 17 00:00:00 2001
From: Matt Wisniewski
Date: Thu, 8 Sep 2016 12:42:04 -0400
Subject: [PATCH 06/37] Update centerTour.js
---
app/js/tour/centerTour.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/js/tour/centerTour.js b/app/js/tour/centerTour.js
index d6ae283fd..be31e1334 100644
--- a/app/js/tour/centerTour.js
+++ b/app/js/tour/centerTour.js
@@ -9,7 +9,7 @@ var ObjectDB = require('object-db');
var tourDBMain = new ObjectDB('ozp_tour').init();
var tourDB = tourDBMain.get();
-var contentLocalHUD = '';
+var contentLocalHUD = ``;
var contentLocalStart = '';
if (typeof tourDB.hud !== 'undefined' && (tourDB.hud.ran === true || tourDB.hud.startHudTour === true)){
From d84edc0159af6db01859fb6630ea4d61737b340d Mon Sep 17 00:00:00 2001
From: Manny Rivera
Date: Fri, 9 Sep 2016 15:22:40 -0400
Subject: [PATCH 07/37] release-1.1.43
---
CHANGELOG.md | 9 +++++++++
package.json | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a48e6560c..4aa8b660d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+### 1.1.43 (2016-09-09)
+
+
+#### Bug Fixes
+
+* centerTour.js ([e7e7da77](https://github.com/ozone-development/ozp-center.git/commit/e7e7da77f91936050eeb5080f5e5a136d0062a5d))
+* new code to redirect at end of center tour ([e69f8853](https://github.com/ozone-development/ozp-center.git/commit/e69f88539aa2cd6d12d83fdc6d5d33a0965642c6))
+
+
### 1.1.42 (2016-09-01)
diff --git a/package.json b/package.json
index c3ce50446..4855830ad 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "center-ui",
- "version": "1.1.42",
+ "version": "1.1.43",
"repository": {
"type": "git",
"url": "https://github.com/ozone-development/ozp-center.git"
From e14c4e5ad69a7a20750d46bcf29c07c3ec26fd2a Mon Sep 17 00:00:00 2001
From: Andrew Konsowski
Date: Thu, 15 Sep 2016 08:47:44 -0400
Subject: [PATCH 08/37] fix(index):added a check to see if we should display
webtop
---
app/js/components/NavBar/index.jsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/app/js/components/NavBar/index.jsx b/app/js/components/NavBar/index.jsx
index cd3cc1572..69d206ddd 100644
--- a/app/js/components/NavBar/index.jsx
+++ b/app/js/components/NavBar/index.jsx
@@ -51,7 +51,9 @@ var NavBar = React.createClass({