Skip to content

Commit 6184e54

Browse files
committed
highlight elements in modals modals, cleanup
1 parent bb0178c commit 6184e54

6 files changed

Lines changed: 214 additions & 167 deletions

File tree

README.md

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,21 @@ An angular [bower](http://bower.io/) component for creating simple tutorials.
44

55
##Installation##
66

7+
###Build###
8+
79
bower install angular-tutorial
8-
cd [repo location]
10+
cd bower_components/angular-tutorial
911
npm install && bower install && grunt
12+
13+
###Include Dependencies###
14+
15+
Angular Tutorial depends on [UI Bootstrap](http://angular-ui.github.io/bootstrap/)'s Modal and [Bootstrap](http://getbootstrap.com/)'s tooltip (we're forced to use Bootstrap's native tooltip until UI Bootstrap's tooltip supports programmatic triggers).
16+
17+
Make sure they are included in the page along with the `angular-tutorial` source:
18+
19+
<script type="text/javascript" src="bower_components/bootstrap/js/tooltip.js"></script>
20+
<script type="text/javascript" src="bower_components/angular-ui-bootstrap/dist/ui-bootstrap-custom-tpls-0.10.0.js"></script>
21+
<script type="text/javascript" src="bower_components/angular-tutorial/angular-tutorial.js"></script>
1022

1123
##Usage##
1224

@@ -27,7 +39,6 @@ Register a tutorial:
2739
(
2840
"tutorial1", //id
2941
{}, //config
30-
"My Tutorial", //name
3142
[ //steps
3243
{
3344
type: "showMessage",
@@ -58,31 +69,35 @@ The `waitForClick` step type tells the tutorial to wait for one of the specified
5869

5970
Properties
6071

61-
- `selectors` One or more [css selectors](http://www.w3schools.com/cssref/css_selectors.asp) to target (Array)
62-
- `tooltips` Tooltips to show for the corresponding `selector` (Array)
63-
- Tooltip properties:
64-
- `text` Text to display in the tooltip (String)
65-
- `placement` One of top, right, bottom or left (String)
72+
- `highlight` One or more [css selectors](http://www.w3schools.com/cssref/css_selectors.asp) to hightlight via a cutout in the backdrop (defaults to `targets` if unspecified) (Array)
73+
- `targets` One or more [css selectors](http://www.w3schools.com/cssref/css_selectors.asp) representing click targets (Array)
74+
- `tooltips` Tooltips to show (Array)
75+
Tooltip Properties
76+
- `selector` CSS selector to affix the tooltip to (String, required)
77+
- `text` Text to display in the tooltip (String)
78+
- `placement` One of top, right, bottom or left (String)
6679

6780
####waitForNavigate#####
6881

6982
The `waitForNavigate` step type tells the tutorial to wait for a change to `$location.path()`.
7083

7184
Properties
72-
73-
- `path` The value `$location.path()` must be set to to continue (String, required)
74-
- `selectors` One or more [css selectors](http://www.w3schools.com/cssref/css_selectors.asp) to target (Array)
85+
86+
- `highlight` One or more [css selectors](http://www.w3schools.com/cssref/css_selectors.asp) to hightlight via a cutout in the backdrop (defaults to `targets` if unspecified) (Array)
87+
- `path` The change in `$location.path()` to wait for (String, required)
88+
- `targets` One or more [css selectors](http://www.w3schools.com/cssref/css_selectors.asp) representing click targets (Array)
7589
- `tooltips` Tooltips to show for the corresponding `selector` (Array)
76-
- Tooltip properties:
77-
- `text` Text to display in the tooltip (String)
78-
- `placement` One of top, right, bottom or left (String)
90+
Tooltip Properties
91+
- `selector` CSS selector to affix the tooltip to (String, required)</li>
92+
- `text` Text to display in the tooltip (String)
93+
- `placement` One of top, right, bottom or left (String)
7994

8095
####showMessage####
81-
96+
8297
The `showMessage` step type tells the tutorial to show a message using [ui-bootstrap](http://angular-ui.github.io/bootstrap/)'s `$modal` service
8398

8499
Properties
85-
100+
86101
- `message` The message to display (String/Object, required)
87102
If the message is an Object, the following properties are supported
88103
- `message` Text to display in the tooltip (String, required)

0 commit comments

Comments
 (0)