'use strict'; /** * Services for each tour step when you unlock features */ angular.module('habitrpg').factory('Guide', ['$rootScope', 'User', '$timeout', '$state', function($rootScope, User, $timeout, $state) { var chapters = { intro: [ [ //0 { state: 'tasks', element: ".task-column.todos", content: window.env.t('tourWelcome'), placement: "top" } ], [ //1 { state: 'tasks', element: '.sticky-wrapper', content: window.env.t('tourExp'), placement: 'bottom' }, { state: 'tasks', element: ".task-column.dailys", content: window.env.t('tourDailies'), placement: "top" } ], [ //2 { orphan: true, content: window.env.t('tourCron'), placement: 'bottom' }, { state: 'tasks', element: '.meter.health', content: window.env.t('tourHP'), placement: 'bottom' }, { state: 'tasks', element: ".task-column.habits", content: window.env.t('tourHabits'), placement: "right" } ], [ //3 { state: 'tasks', element: ".hero-stats", content: window.env.t('tourStats') }, { state: 'tasks', element: ".task-column.rewards", content: window.env.t('tourGP'), placement: 'left' } ], [ //4 { state: 'tasks', element: '.main-herobox', content: window.env.t('tourAvatar'), placement: 'bottom' } ], [ //5 { state: 'options.profile.avatar', orphan: true, content: window.env.t('tourScrollDown') }, { element: "ul.toolbar-nav", backdrop:false, content: window.env.t('tourMuchMore'), placement: "bottom", final: true, //onHidden: function(){ // $rootScope.$watch('user.flags.customizationsNotification', _.partial(goto, 'intro', 4)); //} } ] ], classes: [ [ { state: 'options.inventory.equipment', element: '.equipment-tab', title: window.env.t('classGear'), content: window.env.t('classGearText', {klass: User.user.stats.class}) }, { state: 'options.profile.stats', element: ".allocate-stats", title: window.env.t('stats'), content: window.env.t('classStats') }, { state: 'options.profile.stats', element: ".auto-allocate", title: window.env.t('autoAllocate'), placement: 'left', content: window.env.t('autoAllocateText') }, { element: ".meter.mana", title: window.env.t('spells'), content: window.env.t('spellsText') + " " + window.env.t('toDo') + "." }, { orphan: true, title: window.env.t('readMore'), content: window.env.t('moreClass') + " Wikia.", final: true } ] ] } _.each(chapters, function(chapter, k){ _(chapter).flatten().each(function(step) { step.content = "