add joyride translations
parent
bd5ef7fbc1
commit
46eefb7b18
|
@ -1357,6 +1357,12 @@
|
||||||
"CANCEL": "Cancel"
|
"CANCEL": "Cancel"
|
||||||
},
|
},
|
||||||
"JOYRIDE": {
|
"JOYRIDE": {
|
||||||
|
"NAV": {
|
||||||
|
"NEXT": "Next",
|
||||||
|
"BACK": "Back",
|
||||||
|
"SKIP": "Skip",
|
||||||
|
"DONE": "Done"
|
||||||
|
},
|
||||||
"DASHBOARD": {
|
"DASHBOARD": {
|
||||||
"STEP1": {
|
"STEP1": {
|
||||||
"TITLE": "Your project",
|
"TITLE": "Your project",
|
||||||
|
|
|
@ -19,23 +19,11 @@
|
||||||
|
|
||||||
taiga = @.taiga
|
taiga = @.taiga
|
||||||
|
|
||||||
JoyRideDirective = ($rootScope, currentUserService, joyRideService, $location) ->
|
JoyRideDirective = ($rootScope, currentUserService, joyRideService, $location, $translate) ->
|
||||||
link = (scope, el, attrs, ctrl) ->
|
link = (scope, el, attrs, ctrl) ->
|
||||||
unsuscribe = null
|
unsuscribe = null
|
||||||
intro = introJs()
|
intro = introJs()
|
||||||
|
|
||||||
#Todo: translate
|
|
||||||
intro.setOptions({
|
|
||||||
exitOnEsc: false,
|
|
||||||
exitOnOverlayClick: false,
|
|
||||||
showStepNumbers: false,
|
|
||||||
nextLabel: 'Next →',
|
|
||||||
prevLabel: '← Back',
|
|
||||||
skipLabel: 'Skip',
|
|
||||||
doneLabel: 'Done',
|
|
||||||
disableInteraction: true
|
|
||||||
})
|
|
||||||
|
|
||||||
intro.oncomplete () ->
|
intro.oncomplete () ->
|
||||||
$('html,body').scrollTop(0)
|
$('html,body').scrollTop(0)
|
||||||
|
|
||||||
|
@ -46,6 +34,17 @@ JoyRideDirective = ($rootScope, currentUserService, joyRideService, $location) -
|
||||||
if !config[next.joyride]
|
if !config[next.joyride]
|
||||||
return
|
return
|
||||||
|
|
||||||
|
intro.setOptions({
|
||||||
|
exitOnEsc: false,
|
||||||
|
exitOnOverlayClick: false,
|
||||||
|
showStepNumbers: false,
|
||||||
|
nextLabel: $translate.instant('JOYRIDE.NAV.NEXT') + ' →',
|
||||||
|
prevLabel: '← ' + $translate.instant('JOYRIDE.NAV.BACK'),
|
||||||
|
skipLabel: $translate.instant('JOYRIDE.NAV.SKIP'),
|
||||||
|
doneLabel: $translate.instant('JOYRIDE.NAV.DONE'),
|
||||||
|
disableInteraction: true
|
||||||
|
})
|
||||||
|
|
||||||
intro.setOption('steps', joyRideService.get(next.joyride))
|
intro.setOption('steps', joyRideService.get(next.joyride))
|
||||||
intro.start()
|
intro.start()
|
||||||
|
|
||||||
|
@ -78,7 +77,8 @@ JoyRideDirective.$inject = [
|
||||||
"$rootScope",
|
"$rootScope",
|
||||||
"tgCurrentUserService",
|
"tgCurrentUserService",
|
||||||
"tgJoyRideService",
|
"tgJoyRideService",
|
||||||
"$location"
|
"$location",
|
||||||
|
"$translate"
|
||||||
]
|
]
|
||||||
|
|
||||||
angular.module("taigaComponents").directive("tgJoyRide", JoyRideDirective)
|
angular.module("taigaComponents").directive("tgJoyRide", JoyRideDirective)
|
||||||
|
|
Loading…
Reference in New Issue