Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions app/admin_components/adf-tutorial/app-tutorial.directive.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use strict';

angular.module('dfTutorial')


.directive('dfAppTutorial', ['MOD_TUTORIALS_ASSET_PATH', function (MOD_TUTORIALS_ASSET_PATH) {

return {
restrict: 'E',
scope: {
apiData: '=?'
},
templateUrl: MOD_TUTORIALS_ASSET_PATH + 'views/app-tutorial.html',
link: function (scope, elem, attrs) {

}
};
}]);
116 changes: 116 additions & 0 deletions app/admin_components/adf-tutorial/service-tutorial.directive.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
'use strict';

angular.module('dfTutorial')

.directive('dfServiceTutorial', ['MOD_TUTORIALS_ASSET_PATH', 'ngIntroService', function (MOD_TUTORIALS_ASSET_PATH, ngIntroService) {

return {
restrict: 'E',
scope: {
apiData: '=?'
},
templateUrl: MOD_TUTORIALS_ASSET_PATH + 'views/service-tutorial.html',
link: function (scope, elem, attrs) {

scope.IntroOptions = {
steps: [
{
element: document.querySelector('.tutorial-step-Services'),
intro: "Open the 'Services' tab."
},
{
element: '#step2',
intro: 'Here is hello 2'
}
],
showStepNumbers: true,
showBullets: false,
exitOnOverlayClick: false,
exitOnEsc: true,
nextLabel: 'next',
prevLabel: '<span style="color:green">Previous</span>',
skipLabel: 'Exit',
doneLabel: 'Thanks'
};


// $scope.CompletedEvent = function () {
// console.log('[directive] completed Event')
// }
// $scope.ExitEvent = function () {
// console.log('[directive] exit Event')
// }
// $scope.ChangeEvent = function (element) {
// console.log('[directive] change Event')
// console.info(element);
// }
// $scope.BeforeChangeEvent = function (element) {
// console.log('[directive] beforeChange Event')
// console.info(element);
// }
// $scope.AfterChangeEvent = function (element) {
// console.log('[directive] after change Event')
// console.info(element);
// }
// $scope.clearAndStartNewIntro = function () {
// $scope.IntroOptions = {
// steps: [
// {
// element: document.querySelector('#step1'),
// intro: "After being cleared, step 1"
// },
// {
// element: '#step2',
// intro: 'Setup and details :)',
// position: 'right'
// },
// {
// element: '.jumbotron',
// intro: 'We added a small feature, adding <pre>ng-intro-disable-button</pre> your buttons will be disabled when introJs is open :) <br><p style="color:red">if you\'re using anchor tags, you should prevent ng-click manually. </p> <p> <a target="_blank" href="https://github.com/mendhak/angular-intro.js/wiki/How-to-prevent-a-ng-click-event-when-a-tag--a--is-disabled%3F">click here for more details.</a></p>'
// }
// ],
// showStepNumbers: true,
// showBullets: true,
// exitOnOverlayClick: false,
// exitOnEsc: false,
// nextLabel: '<strong style="color:green">Next!</strong>',
// prevLabel: '<span style="color:red">Previous</span>',
// skipLabel: 'Skip',
// doneLabel: 'Done'
// };
//
//
// ngIntroService.clear();
// ngIntroService.setOptions($scope.IntroOptions);
//
// // ngIntroService.onComplete(function () {
// // console.log('update some cookie or localstorage.')
// // console.log(arguments)
// // })
// //
// // ngIntroService.onExit(function () {
// // console.log("[service] exit");
// // })
// //
// // ngIntroService.onBeforeChange(function (element) {
// // console.log("[service] before change");
// // console.info(element);
// // })
// //
// // ngIntroService.onChange(function (element) {
// // console.log("[service] on change");
// // console.info(element);
// //
// // })
// //
// // ngIntroService.onAfterChange(function (element) {
// // console.log("[service] after Change");
// // console.info(element);
// // })
//
// ngIntroService.start();
// }

}
};
}])
23 changes: 23 additions & 0 deletions app/admin_components/adf-tutorial/tutorial.controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'use strict';

angular.module('dfTutorial')

.controller('TutorialController', ['$scope', function ($scope) {

$scope.$parent.title = 'Tutorials';

$scope.links = [
{
name: 'service',
label: 'Service',
path: 'service-tutorial'
},
{
name: 'app',
label: 'App',
path: 'app-tutorial'
}
];
}])


22 changes: 22 additions & 0 deletions app/admin_components/adf-tutorial/tutorial.module.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
'use strict';

angular.module('dfTutorial', [])
.constant('MOD_TUTORIALS_ROUTER_PATH', '/tutorials')
.constant('MOD_TUTORIALS_ASSET_PATH', 'admin_components/adf-tutorial/')
.config(['$routeProvider', 'MOD_TUTORIALS_ROUTER_PATH', 'MOD_TUTORIALS_ASSET_PATH',
function ($routeProvider, MOD_TUTORIALS_ROUTER_PATH, MOD_TUTORIALS_ASSET_PATH) {
$routeProvider
.when(MOD_TUTORIALS_ROUTER_PATH, {
templateUrl: MOD_TUTORIALS_ASSET_PATH + 'views/main-tutorial.html',
controller: 'TutorialController',
resolve: {
checkUser: ['checkUserService', function (checkUserService) {
return checkUserService.checkUser();
}]
}
});
}])

.run([function () {

}])
4 changes: 4 additions & 0 deletions app/admin_components/adf-tutorial/views/app-tutorial.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<df-section-header data-title="'Apps tutorial'"></df-section-header>


<p>Will be soon :)</p>
9 changes: 9 additions & 0 deletions app/admin_components/adf-tutorial/views/main-tutorial.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div>
<div class="col-md-2 df-sidebar-nav">
<df-sidebar-nav></df-sidebar-nav>
</div>
<div class="col-md-10 df-section" data-ng-class="activeView.path === 'service-tutorial' ? 'df-section-3-round' : 'df-section-all-round'" df-fs-height >
<df-app-tutorial data-ng-if="activeView.path === 'app-tutorial'"></df-app-tutorial>
<df-service-tutorial data-ng-if="activeView.path === 'service-tutorial'" ></df-service-tutorial>
</div>
</div>
10 changes: 10 additions & 0 deletions app/admin_components/adf-tutorial/views/service-tutorial.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<df-section-header data-title="'Services tutorial'"></df-section-header>

<br>
<p>Services are where you set up REST API connections to databases, file storage, email, remote web services, and more.

</p>
<button class="btn btn-primary"
type="button" ng-intro-options="IntroOptions" ng-intro-method="startServiceTutorial"
ng-click="startServiceTutorial()">Let's go through 'Services'
</button>
5 changes: 3 additions & 2 deletions app/admin_components/adf-utility/views/df-component-nav.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="df-component-navbar">
<ul class="nav nav-pills pull-right visible-md visible-lg">
<li data-ng-repeat="link in options.links" data-ng-class="activeLink === link.name ? 'active' : ''">
<ul class="nav nav-pills pull-right visible-md visible-lg" >
<li class="tutorial-step-{{link.label}}" data-ng-repeat="link in options.links" data-ng-class="activeLink === link.name ? 'active' : ''">
<a href="#{{link.path}}" ng-click="reloadRoute(link.path)">{{link.label}}</a>
</li>
</ul>
Expand All @@ -15,6 +15,7 @@
<div class="panel-heading">
<button class="btn btn-default btn-xs" data-ng-click="closeMenu()">Cancel</button>
</div>
<!--//Todo Think about walkthrough guide when navbar is hidden and right burger menu is available -->
<ul class="list-group">
<li data-ng-repeat="link in options.links" class="list-group-item" data-ng-class="activeLink === link.name ? 'active' : ''">
<a href="#{{link.path}}" ng-click="reloadRoute(link.path)" >{{link.label}}</a>
Expand Down
4 changes: 4 additions & 0 deletions app/angular-intro.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@


<!-- build:css({.tmp,app}) styles/styles.css -->
<link href="introjs.css" rel="stylesheet">
<link rel="stylesheet" href="styles/sass/styles.css" />
<link rel="stylesheet" href="../bower_components/pnotify/dist/pnotify.css" />
<link rel="stylesheet" href="../bower_components/pnotify/dist/pnotify.buttons.css" />
Expand Down Expand Up @@ -94,6 +95,10 @@
<!-- endbower -->
<!-- endbuild -->

<script src="intro.min.js"></script>
<script src="angular-intro.js"></script>


<!-- build:js({.tmp,app}) scripts/app.js -->
<script src="admin_components/adf-user-management/dreamfactory-user-management.js"></script>
<script src="admin_components/adf-utility/dreamfactory-utility.js"></script>
Expand All @@ -116,6 +121,10 @@
<script src="admin_components/adf-table/dreamfactory-table.js"></script>
<script src="admin_components/adf-home/dreamfactory-home.js"></script>
<script src="admin_components/adf-limit/dreamfactory-limit.js"></script>
<script src="admin_components/adf-tutorial/tutorial.module.js"></script>
<script src="admin_components/adf-tutorial/tutorial.controller.js"></script>
<script src="admin_components/adf-tutorial/app-tutorial.directive.js"></script>
<script src="admin_components/adf-tutorial/service-tutorial.directive.js"></script>

<script src="scripts/app.js"></script>
<script src="scripts/controllers/main.js"></script>
Expand Down
Loading