Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
origin-web-common
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Java-于龙
origin-web-common
Commits
98a33d9f
Commit
98a33d9f
authored
Jun 12, 2017
by
David Taylor
Committed by
GitHub
Jun 12, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #102 from jeff-phillips-18/tour
Allow functions to be used for guided tour values
parents
d5edcf0e
22b8b24c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
1 deletions
+16
-1
origin-web-common-ui.js
dist/origin-web-common-ui.js
+5
-0
origin-web-common.js
dist/origin-web-common.js
+5
-0
origin-web-common.min.js
dist/origin-web-common.min.js
+1
-1
guidedTourService.js
src/ui-services/guidedTourService.js
+5
-0
No files found.
dist/origin-web-common-ui.js
View file @
98a33d9f
...
@@ -1691,6 +1691,11 @@ angular.module('openshiftCommonUI').factory('GuidedTourService', function() {
...
@@ -1691,6 +1691,11 @@ angular.module('openshiftCommonUI').factory('GuidedTourService', function() {
if
(
angular
.
isUndefined
(
step
.
yOffset
)
&&
(
step
.
placement
===
'right'
||
step
.
placement
===
'left'
))
{
if
(
angular
.
isUndefined
(
step
.
yOffset
)
&&
(
step
.
placement
===
'right'
||
step
.
placement
===
'left'
))
{
step
.
yOffset
=
-
45
;
step
.
yOffset
=
-
45
;
}
}
step
.
title
=
_
.
isFunction
(
step
.
title
)
?
step
.
title
()
:
step
.
title
;
step
.
content
=
_
.
isFunction
(
step
.
content
)
?
step
.
content
()
:
step
.
content
;
step
.
target
=
_
.
isFunction
(
step
.
target
)
?
step
.
target
()
:
step
.
target
;
step
.
placement
=
_
.
isFunction
(
step
.
placement
)
?
step
.
placement
()
:
step
.
placement
;
});
});
}
}
...
...
dist/origin-web-common.js
View file @
98a33d9f
...
@@ -4825,6 +4825,11 @@ angular.module('openshiftCommonUI').factory('GuidedTourService', function() {
...
@@ -4825,6 +4825,11 @@ angular.module('openshiftCommonUI').factory('GuidedTourService', function() {
if
(
angular
.
isUndefined
(
step
.
yOffset
)
&&
(
step
.
placement
===
'right'
||
step
.
placement
===
'left'
))
{
if
(
angular
.
isUndefined
(
step
.
yOffset
)
&&
(
step
.
placement
===
'right'
||
step
.
placement
===
'left'
))
{
step
.
yOffset
=
-
45
;
step
.
yOffset
=
-
45
;
}
}
step
.
title
=
_
.
isFunction
(
step
.
title
)
?
step
.
title
()
:
step
.
title
;
step
.
content
=
_
.
isFunction
(
step
.
content
)
?
step
.
content
()
:
step
.
content
;
step
.
target
=
_
.
isFunction
(
step
.
target
)
?
step
.
target
()
:
step
.
target
;
step
.
placement
=
_
.
isFunction
(
step
.
placement
)
?
step
.
placement
()
:
step
.
placement
;
});
});
}
}
...
...
dist/origin-web-common.min.js
View file @
98a33d9f
...
@@ -2069,7 +2069,7 @@ $("#guided_tour_backdrop").remove(), angular.isFunction(hopscotchConfig.onTourEn
...
@@ -2069,7 +2069,7 @@ $("#guided_tour_backdrop").remove(), angular.isFunction(hopscotchConfig.onTourEn
}
}
function
setupSteps
()
{
function
setupSteps
()
{
_
.
forEach
(
hopscotchConfig
.
steps
,
function
(
step
)
{
_
.
forEach
(
hopscotchConfig
.
steps
,
function
(
step
)
{
step
.
onNextOrig
=
step
.
onNext
,
step
.
onPrevOrig
=
step
.
onPrev
,
step
.
onNext
=
onStepNext
,
step
.
onPrev
=
onStepPrev
,
step
.
fixedElement
=
!
0
,
!
angular
.
isUndefined
(
step
.
yOffset
)
||
"right"
!==
step
.
placement
&&
"left"
!==
step
.
placement
||
(
step
.
yOffset
=
-
45
);
step
.
onNextOrig
=
step
.
onNext
,
step
.
onPrevOrig
=
step
.
onPrev
,
step
.
onNext
=
onStepNext
,
step
.
onPrev
=
onStepPrev
,
step
.
fixedElement
=
!
0
,
!
angular
.
isUndefined
(
step
.
yOffset
)
||
"right"
!==
step
.
placement
&&
"left"
!==
step
.
placement
||
(
step
.
yOffset
=
-
45
)
,
step
.
title
=
_
.
isFunction
(
step
.
title
)
?
step
.
title
()
:
step
.
title
,
step
.
content
=
_
.
isFunction
(
step
.
content
)
?
step
.
content
()
:
step
.
content
,
step
.
target
=
_
.
isFunction
(
step
.
target
)
?
step
.
target
()
:
step
.
target
,
step
.
placement
=
_
.
isFunction
(
step
.
placement
)
?
step
.
placement
()
:
step
.
placement
;
});
});
}
}
function
onStepNext
()
{
function
onStepNext
()
{
...
...
src/ui-services/guidedTourService.js
View file @
98a33d9f
...
@@ -57,6 +57,11 @@ angular.module('openshiftCommonUI').factory('GuidedTourService', function() {
...
@@ -57,6 +57,11 @@ angular.module('openshiftCommonUI').factory('GuidedTourService', function() {
if
(
angular
.
isUndefined
(
step
.
yOffset
)
&&
(
step
.
placement
===
'right'
||
step
.
placement
===
'left'
))
{
if
(
angular
.
isUndefined
(
step
.
yOffset
)
&&
(
step
.
placement
===
'right'
||
step
.
placement
===
'left'
))
{
step
.
yOffset
=
-
45
;
step
.
yOffset
=
-
45
;
}
}
step
.
title
=
_
.
isFunction
(
step
.
title
)
?
step
.
title
()
:
step
.
title
;
step
.
content
=
_
.
isFunction
(
step
.
content
)
?
step
.
content
()
:
step
.
content
;
step
.
target
=
_
.
isFunction
(
step
.
target
)
?
step
.
target
()
:
step
.
target
;
step
.
placement
=
_
.
isFunction
(
step
.
placement
)
?
step
.
placement
()
:
step
.
placement
;
});
});
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment