Skip to content

Commit e1f6134

Browse files
committed
added tour config to demo
1 parent 34f6b3d commit e1f6134

10 files changed

+30
-26
lines changed

app/tour_config_provider.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* global angular: false */
22

3-
(function angularBootstrapTour(app) {
3+
(function (app) {
44
'use strict';
55

66
app.provider('TourConfig', [function () {

app/tour_controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* global angular: false */
22

3-
(function angularBootstrapTour(app) {
3+
(function (app) {
44
'use strict';
55

66
app.controller('TourController', ['$filter', '$timeout', function ($filter, $timeout) {

app/tour_directive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* global angular: false */
22

3-
(function angularBootstrapTour(app) {
3+
(function (app) {
44
'use strict';
55

66
function directive () {

app/tour_helpers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* global angular: false */
22

3-
(function angularBootstrapTour(app) {
3+
(function (app) {
44
'use strict';
55

66
app.factory('TourHelpers', ['$templateCache', '$compile', 'TourConfig', function ($templateCache, $compile, TourConfig) {
@@ -154,7 +154,7 @@
154154
*/
155155
helpers.getAttrName = function (option) {
156156
if (TourConfig.get('prefixOptions')) {
157-
return TourConfig.prefix + option.charAt(0).toUpperCase() + option.substr(1);
157+
return TourConfig.get('prefix') + option.charAt(0).toUpperCase() + option.substr(1);
158158
} else {
159159
return option;
160160
}

app/tour_step_directive.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* global angular: false */
22

3-
(function angularBootstrapTour(app) {
3+
(function (app) {
44
'use strict';
55

66
function directive() {
@@ -18,7 +18,7 @@
1818
stepId: attrs.tourStep
1919
},
2020
events = 'onShow onShown onHide onHidden onNext onPrev onPause onResume'.split(' '),
21-
options = 'content title path animation container placement backdrop redirect orphan reflex path nextStep prevStep nextPath prevPath'.split(' '),
21+
options = 'content title path animation container placement backdrop redirect orphan reflex nextStep prevStep nextPath prevPath'.split(' '),
2222
orderWatch,
2323
skipWatch;
2424

demo/angular-bootstrap-tour.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/* global angular: false */
1818

19-
(function angularBootstrapTour(app) {
19+
(function (app) {
2020
'use strict';
2121

2222
app.provider('TourConfig', [function () {
@@ -48,7 +48,7 @@
4848

4949
/* global angular: false */
5050

51-
(function angularBootstrapTour(app) {
51+
(function (app) {
5252
'use strict';
5353

5454
app.controller('TourController', ['$filter', '$timeout', function ($filter, $timeout) {
@@ -174,7 +174,7 @@
174174

175175
/* global angular: false */
176176

177-
(function angularBootstrapTour(app) {
177+
(function (app) {
178178
'use strict';
179179

180180
function directive () {
@@ -232,7 +232,7 @@
232232

233233
/* global angular: false */
234234

235-
(function angularBootstrapTour(app) {
235+
(function (app) {
236236
'use strict';
237237

238238
app.factory('TourHelpers', ['$templateCache', '$compile', 'TourConfig', function ($templateCache, $compile, TourConfig) {
@@ -386,7 +386,7 @@
386386
*/
387387
helpers.getAttrName = function (option) {
388388
if (TourConfig.get('prefixOptions')) {
389-
return TourConfig.prefix + option.charAt(0).toUpperCase() + option.substr(1);
389+
return TourConfig.get('prefix') + option.charAt(0).toUpperCase() + option.substr(1);
390390
} else {
391391
return option;
392392
}
@@ -400,11 +400,11 @@
400400

401401
/* global angular: false */
402402

403-
(function angularBootstrapTour(app) {
403+
(function (app) {
404404
'use strict';
405405

406406
function directive() {
407-
return ['TourHelpers', '$location', '$rootScope', function (TourHelpers, $location, $rootScope) {
407+
return ['TourHelpers', '$location', function (TourHelpers, $location) {
408408

409409
return {
410410
restrict: 'EA',
@@ -418,7 +418,7 @@
418418
stepId: attrs.tourStep
419419
},
420420
events = 'onShow onShown onHide onHidden onNext onPrev onPause onResume'.split(' '),
421-
options = 'content title path animation container placement backdrop redirect orphan reflex path nextStep prevStep nextPath prevPath'.split(' '),
421+
options = 'content title path animation container placement backdrop redirect orphan reflex nextStep prevStep nextPath prevPath'.split(' '),
422422
orderWatch,
423423
skipWatch;
424424

demo/app.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(function (app) {
22

3-
app.config(['$routeProvider', function ($routeProvider) {
3+
app.config(['$routeProvider', 'TourConfigProvider', function ($routeProvider, TourConfigProvider) {
44

55
$routeProvider
66
.when('/docs', {
@@ -19,6 +19,10 @@
1919
redirectTo: '/docs'
2020
});
2121

22+
//These are defaults
23+
TourConfigProvider.set('prefixOptions', false);
24+
TourConfigProvider.set('prefix', 'bsTour');
25+
2226
}]);
2327

2428
}(angular.module('app', ['bm.bsTour', 'ngRoute'])));

demo/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ <h4 class="modal-title">Source Code</h4>
154154
<script src="bower_components/angular-route/angular-route.js"></script>
155155
<!--endbower-->
156156

157-
<script src="app.js"></script>
158157
<script src="angular-bootstrap-tour.js"></script>
158+
<script src="app.js"></script>
159159
<!--<script src="bootswatch.js"></script>-->
160160

161161
</body>

dist/angular-bootstrap-tour.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/* global angular: false */
1818

19-
(function angularBootstrapTour(app) {
19+
(function (app) {
2020
'use strict';
2121

2222
app.provider('TourConfig', [function () {
@@ -48,7 +48,7 @@
4848

4949
/* global angular: false */
5050

51-
(function angularBootstrapTour(app) {
51+
(function (app) {
5252
'use strict';
5353

5454
app.controller('TourController', ['$filter', '$timeout', function ($filter, $timeout) {
@@ -174,7 +174,7 @@
174174

175175
/* global angular: false */
176176

177-
(function angularBootstrapTour(app) {
177+
(function (app) {
178178
'use strict';
179179

180180
function directive () {
@@ -232,7 +232,7 @@
232232

233233
/* global angular: false */
234234

235-
(function angularBootstrapTour(app) {
235+
(function (app) {
236236
'use strict';
237237

238238
app.factory('TourHelpers', ['$templateCache', '$compile', 'TourConfig', function ($templateCache, $compile, TourConfig) {
@@ -386,7 +386,7 @@
386386
*/
387387
helpers.getAttrName = function (option) {
388388
if (TourConfig.get('prefixOptions')) {
389-
return TourConfig.prefix + option.charAt(0).toUpperCase() + option.substr(1);
389+
return TourConfig.get('prefix') + option.charAt(0).toUpperCase() + option.substr(1);
390390
} else {
391391
return option;
392392
}
@@ -400,11 +400,11 @@
400400

401401
/* global angular: false */
402402

403-
(function angularBootstrapTour(app) {
403+
(function (app) {
404404
'use strict';
405405

406406
function directive() {
407-
return ['TourHelpers', '$location', '$rootScope', function (TourHelpers, $location, $rootScope) {
407+
return ['TourHelpers', '$location', function (TourHelpers, $location) {
408408

409409
return {
410410
restrict: 'EA',
@@ -418,7 +418,7 @@
418418
stepId: attrs.tourStep
419419
},
420420
events = 'onShow onShown onHide onHidden onNext onPrev onPause onResume'.split(' '),
421-
options = 'content title path animation container placement backdrop redirect orphan reflex path nextStep prevStep nextPath prevPath'.split(' '),
421+
options = 'content title path animation container placement backdrop redirect orphan reflex nextStep prevStep nextPath prevPath'.split(' '),
422422
orderWatch,
423423
skipWatch;
424424

dist/angular-bootstrap-tour.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)