diff --git a/docs-web/src/main/webapp/src/app/docs/app.js b/docs-web/src/main/webapp/src/app/docs/app.js index c6e1c90a..f1e2544a 100644 --- a/docs-web/src/main/webapp/src/app/docs/app.js +++ b/docs-web/src/main/webapp/src/app/docs/app.js @@ -7,7 +7,7 @@ angular.module('docs', // Dependencies ['ui.router', 'ui.bootstrap', 'dialog', 'ngProgress', 'monospaced.qrcode', 'yaru22.angular-timeago', 'ui.validate', 'ui.sortable', 'restangular', 'ngSanitize', 'ngTouch', 'colorpicker.module', 'ngFileUpload', 'pascalprecht.translate', - 'tmh.dynamicLocale'] + 'tmh.dynamicLocale', 'ngOnboarding'] ) /** @@ -514,7 +514,7 @@ angular.module('docs', /** * Initialize ngProgress. */ -.run(function($rootScope, ngProgressFactory, $http) { +.run (function ($rootScope, ngProgressFactory, $http) { $rootScope.ngProgress = ngProgressFactory.createInstance(); // Watch for the number of XHR running @@ -527,6 +527,12 @@ angular.module('docs', $rootScope.ngProgress.start(); } }); +}) +/** + * Initialize ngOnboarding. + */ +.run (function ($rootScope) { + $rootScope.onboardingEnabled = false; }); if (location.search.indexOf("protractor") > -1) { diff --git a/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentDefault.js b/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentDefault.js index f6fbf074..5e211736 100644 --- a/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentDefault.js +++ b/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentDefault.js @@ -142,4 +142,47 @@ angular.module('docs').controller('DocumentDefault', function ($scope, $rootScop }).then(function (data) { $scope.documentsWorkflow = data.documents; }); + + // Onboarding + $translate('onboarding.step1.title').then(function () { + if (localStorage.onboardingDisplayed || $(window).width() < 1000) { + return; + } + localStorage.onboardingDisplayed = true; + + $rootScope.onboardingEnabled = true; + + $rootScope.onboardingSteps = [ + { + title: $translate.instant('onboarding.step1.title'), + description: $translate.instant('onboarding.step1.description'), + position: "centered", + width: 300 + }, + { + title: $translate.instant('onboarding.step2.title'), + description: $translate.instant('onboarding.step2.description'), + attachTo: "#document-add-btn", + position: "right" + }, + { + title: $translate.instant('onboarding.step3.title'), + description: $translate.instant('onboarding.step3.description'), + attachTo: "#quick-upload-zone", + position: "left" + }, + { + title: $translate.instant('onboarding.step4.title'), + description: $translate.instant('onboarding.step4.description'), + attachTo: "#search-box", + position: "right" + }, + { + title: $translate.instant('onboarding.step5.title'), + description: $translate.instant('onboarding.step5.description'), + attachTo: "#navigation-tag", + position: "right" + } + ]; + }); }); \ No newline at end of file diff --git a/docs-web/src/main/webapp/src/index.html b/docs-web/src/main/webapp/src/index.html index c17f8f0d..47b3cd19 100644 --- a/docs-web/src/main/webapp/src/index.html +++ b/docs-web/src/main/webapp/src/index.html @@ -13,6 +13,7 @@ + @@ -49,6 +50,7 @@ + @@ -106,6 +108,8 @@ + +