Skip to content

Commit f7d3e9e

Browse files
committed
added demo and fixed dependencies
1 parent 9568f50 commit f7d3e9e

12 files changed

+1821
-54
lines changed

app/angular-bootstrap-tour.js

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,22 @@
6969

7070
}
7171

72+
/**
73+
* Converts a stringified boolean to a JS boolean
74+
*
75+
* @param string
76+
* @returns {*}
77+
*/
78+
function stringToBoolean(string) {
79+
if (string === 'true') {
80+
return true;
81+
} else if (string === 'false') {
82+
return false;
83+
}
84+
85+
return string;
86+
}
87+
7288
/**
7389
* Helper function that attaches proper compiled template to options
7490
*
@@ -127,8 +143,9 @@
127143

128144
angular.forEach(keys, function (key) {
129145
if (attrs[key]) {
146+
options[key] = stringToBoolean(attrs[key]);
130147
attrs.$observe(key, function (newValue) {
131-
options[key] = newValue;
148+
options[key] = stringToBoolean(newValue);
132149
});
133150
}
134151
});
@@ -235,7 +252,7 @@
235252
//Pass static options through or use defaults
236253
var tour = {},
237254
events = 'onStart onEnd afterGetState afterSetState afterRemoveState onShow onShown onHide onHidden onNext onPrev onPause onResume'.split(' '),
238-
options = 'name container keyboard storage debug redirect duration basePath placement backdrop orphan'.split(' ');
255+
options = 'name container keyboard storage debug redirect duration basePath backdrop orphan'.split(' ');
239256

240257
//Pass interpolated values through
241258
TourHelpers.attachInterpolatedValues(attrs, tour, options);

bower.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-bootstrap-tour",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"main": "dist/angular-bootstrap-tour.js",
55
"ignore": [
66
".editorconfig",
@@ -16,7 +16,12 @@
1616
],
1717
"dependencies": {
1818
"angular": "~1.2.23",
19-
"bootstrap-tour": "~0.9.3"
19+
"bootstrap-tour": "~0.9.3",
20+
"jquery": "1.11.1",
21+
"bootstrap": "3.0.3"
2022
},
21-
"devDependencies": {}
23+
"devDependencies": {
24+
"html5shiv": "~3.7.2",
25+
"respond": "~1.4.2"
26+
}
2227
}

0 commit comments

Comments
 (0)