Skip to content

Commit aad353e

Browse files
author
Dat Pham
committed
Merge remote-tracking branch 'upstream/master'
2 parents 78f7730 + c9b3533 commit aad353e

12 files changed

Lines changed: 257 additions & 93 deletions

‎.travis.yml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
nguage: node_js
1+
language: node_js
22
node_js:
3-
- "4.2.4"
3+
- "5"
44

55
before_script:
6-
- npm install
76
- npm install -g bower
87
- npm install -g grunt
98

‎CHANGELOG.md‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,42 @@
1+
<a name="1.1.1"></a>
2+
# 1.1.1 (2017-06-07)
3+
4+
- Update README.md to expose $broadcasts the Wizard offers.
5+
6+
7+
<a name="1.1.0"></a>
8+
# 1.1.0 (2017-06-07)
9+
10+
- Update README.md to explain Edit Mode.
11+
- Add `wz-heading-title` attribute to each step.
12+
13+
14+
<a name="1.0.2"></a>
15+
# 1.0.2 (2017-06-06)
16+
17+
- Update README.md to update Repository URLs
18+
19+
20+
<a name="1.0.1"></a>
21+
# 1.0.2 (2017-06-06)
22+
23+
- Update CDN instructions on README.md
24+
25+
26+
<a name="1.0.0"></a>
27+
# 1.0.0 (2017-06-06)
28+
29+
- `canExit` and `canEnter` functions may now be strings.
30+
- `setEditMode(mode)` methoda added to wizard so a user can explicitly set the edit mode on a wizard.
31+
- Main files in bower.json no longer reference minified files.
32+
- Travis CI config files updated to allow CI automated testing to pass
33+
- npm package versions updated.
34+
35+
## Updates
36+
37+
- Fix for Issue [#210](https://github.com/angular-wizard/angular-wizard/issues/210).
38+
- Newly enabled steps are set to complete.
39+
140
<a name="0.10.0"></a>
241
# 0.10.0 (2016-12-22)
342

‎CONTRIBUTE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ A fail does not necessarily mean a PR should be rejected, but it is a red flag t
2929
3. Update CHANGELOG.md with release notes for the changes in the this release
3030
4. Update version with `grunt bump` add the type flag otherwise a "patch" version change will be applied. e.g. `grunt bump --type=minor`
3131
5. Run `$ grunt build` and commit, this time including the new dist files.
32-
6. Tag the commit as a new release (like v2.18.0)
32+
6. Tag the commit as a new release (like v2.18.0) (eg. `$ git tag -a v0.0.2 -m "Release version 0.0.2"`)
3333
7. Push all the changes including tags (eg. `$ git push --tags`)
3434
8. Publish to npm with `$ npm publish ./`
3535
9. Add a new [Release in GitHub](https://github.com/angular-wizard/angular-wizard/releases)

‎README.md‎

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Build Status](https://travis-ci.org/angular-wizard/angular-wizard.svg?branch=master)](https://travis-ci.org/angular-wizard/angular-wizard) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/8a488d7e632d4d1ea973bfcd25ea15a0)](https://www.codacy.com/app/jc_2/angular-wizard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=angular-wizard/angular-wizard&amp;utm_campaign=Badge_Grade) [![Coverage Status](https://coveralls.io/repos/github/angular-wizard/angular-wizard/badge.svg?branch=master)](https://coveralls.io/github/angular-wizard/angular-wizard?branch=master) [![npm version](https://badge.fury.io/js/angular-wizard.svg)](https://badge.fury.io/js/angular-wizard) [![PayPal donate button](http://img.shields.io/paypal/donate.png?color=yellow)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=martin%40gon%2eto&lc=US&item_name=Martin%20Gontovnikas&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted "Donate once-off to this project using PayPal")
44
[![Donate on Gratipay](http://img.shields.io/gratipay/mgonto.svg)](https://gratipay.com/mgonto/)
55

6-
Angular-wizard is a component that will make it easy for you to create wizards in your app. You can check a running example of the wizard [by clicking here](http://mgonto.github.io/angular-wizard/)
6+
Angular-wizard is a component that will make it easy for you to create wizards in your app. You can check a running example of the wizard [by clicking here](http://angular-wizard.github.io/angular-wizard/)
77

88
# How do I add this to my project?
99
You can download this by:
@@ -15,12 +15,12 @@ You can download this by:
1515

1616
````html
1717
<!-- Use LATEST folder to always get the latest version-->
18-
<script type="text/javascript" src="http://cdn.jsdelivr.net/angular.wizard/latest/angular-wizard.min.js"></script>
19-
<link rel="stylesheet" type="text/css" href="http://cdn.jsdelivr.net/angular.wizard/latest/angular-wizard.min.css">
18+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/angular-wizard@latest/dist/angular-wizard.min.js"></script>
19+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/angular-wizard@latest/dist/angular-wizard.min.css">
2020

2121
<!-- Or use TAG number for specific version -->
22-
<script type="text/javascript" src="http://cdn.jsdelivr.net/angular.wizard/0.6.1/angular-wizard.min.js"></script>
23-
<link rel="stylesheet" type="text/css" href="http://cdn.jsdelivr.net/angular.wizard/0.6.1/angular-wizard.min.css">
22+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/angular-wizard@1.1.1/dist/angular-wizard.min.js"></script>
23+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/angular-wizard@1.1.1/dist/angular-wizard.min.css">
2424
````
2525

2626
The dist folder contains the following files:
@@ -47,7 +47,7 @@ angular.module('your-app', ['mgo-angular-wizard']);
4747
Now, in some HTML for a controller, you can just add a wizard as follows:
4848

4949
````html
50-
<wizard on-finish="finishedWizard()">
50+
<wizard on-finish="finishedWizard()" on-cancel="cancelledWizard()">
5151
<wz-step wz-title="Starting">
5252
<h1>This is the first step</h1>
5353
<p>Here you can use whatever you want. You can use other directives, binding, etc.</p>
@@ -73,6 +73,7 @@ Let's go step by step to see how this works.
7373

7474
1) You need to declare a master `wizard` directive. This wizard directive, has the following options as attributes:
7575
* **on-finish**: Here you can put a function to be called when the wizard is finished. The syntax here is very similar to `ng-click`
76+
* **on-cancel**: Here you can put a function to be called when the wizard is cancelled. The syntax here is very similar to `ng-click`
7677
* **name**: The name of the wizard. By default, it's called "Default wizard". It's used for the `WizardHandler` which we'll explain later.
7778
* **edit-mode**: If set to true, this will set the wizard as edit mode. Edit mode means that all steps have been completed and the user can now navigate to and modify any step. Defaults to false.
7879
* **hide-indicators**: If set to true, the indicators in the bottom of the page showing the current page and allowing navigation for the wizard will be hidden. Defaults to false.
@@ -82,6 +83,7 @@ Let's go step by step to see how this works.
8283

8384
2) Inside the wizard, we can have as many steps as we want. Each step MUST have a title which is going to be used to identify it. Inside each step, we can put whatever we want. Other directives, bindings, controls, forms, etc. Each step can have the following attributes (we will go into detail on each further below):
8485
* **wz-title:** A unique title used for identifying each step.
86+
* **wz-heading-title** A heading title display above step indicators
8587
* **canenter**
8688
* **canexit**
8789
* **wz-disabled**
@@ -91,7 +93,7 @@ Let's go step by step to see how this works.
9193

9294
3) Inside the step, we now see a button which has a `wz-next` attribute. That means that clicking that button will send the user to the next step of wizard. Similar to `wz-next`, we have the following attributes:
9395
* **wz-previous**: Goes to the previous step
94-
* **wz-cancel**: Goes back to the first step
96+
* **wz-cancel**: Calls on-cancel if defined, otherwise the default action is to go back to the first step
9597
* **wz-finish**: Finishes the wizard and calls the on-finish later on. It's important to note that if we're in the last step and we put `wz-next` it'll be the same as putting `wz-finish` as the wizard will know we're at the last screen.
9698
* **wz-reset**: This will reset the wizard meaning bring the user to the first step and reset each step to being incomplete.
9799

@@ -110,7 +112,7 @@ A step can be conditionally disabled and may change at any time either adding it
110112

111113
HTML
112114
````html
113-
<wizard on-finish="finishedWizard()">
115+
<wizard on-finish="finishedWizard()" on-cancel="cancelledWizard()">
114116
<wz-step wz-title="Starting" wz-disabled="{{disabled}}">
115117
<h1>This is the first step</h1>
116118
<p>Here you can use whatever you want. You can use other directives, binding, etc.</p>
@@ -143,7 +145,7 @@ The wzStep directive has the following options as attributes:
143145

144146
HTML
145147
````html
146-
<wizard on-finish="finishedWizard()">
148+
<wizard on-finish="finishedWizard()" on-cancel="cancelledWizard()">
147149
<wz-step wz-title="Starting" canexit="exitValidation">
148150
<h1>This is the first step</h1>
149151
<p>Here you can use whatever you want. You can use other directives, binding, etc.</p>
@@ -219,6 +221,17 @@ The functions available in the `wizard()` are:
219221
* **currentStep()**: This returns an Object which is the current step you are on.
220222
* **totalStepCount()**: This returns an Number which is the total number of **enabled** steps.
221223
* **getEnabledSteps()**: This returns an Array which is the **enabled** steps.
224+
* **setEditMode(boolean)**: Set the edit mode of the wizard. Setting editMode to `true` will make ALL steps accessible, setting edit mode to `false` will make all steps with an index lower than the latest "completed" step accessible.
225+
226+
## Events
227+
Angular Wizard emits the following events on the `scope` and pass an object with the step info and the index as argument:
228+
- `wizard:stepChanged`: When succeed changing the current step
229+
- `wizard:stepChangeFailed`: When changing step and either fails `canexit` of leaving step or `canenter` of arriving step.
230+
````javascript
231+
$scope.$on('wizard:stepChanged',function(event, args) {
232+
console.log(args);
233+
}
234+
````
222235

223236
## Navigation bar
224237

@@ -245,10 +258,10 @@ The available variables are:
245258

246259
# Live sample
247260

248-
You can check out a live sample of the Wizard [clicking here](http://mgonto.github.io/angular-wizard/)
261+
You can check out a live sample of the Wizard [clicking here](http://angular-wizard.github.io/angular-wizard/)
249262

250263
# Releases Notes
251-
Releases notes are together with releases in GitHub at: https://github.com/mgonto/angular-wizard/releases
264+
Releases notes are together with releases in GitHub at: https://github.com/angular-wizard/angular-wizard/releases
252265

253266

254267
# License
@@ -263,5 +276,5 @@ The above copyright notice and this permission notice shall be included in all c
263276
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
264277

265278

266-
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/mgonto/angular-wizard/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
279+
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/angular-wizard/angular-wizard/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
267280

‎bower.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "angular-wizard",
3-
"version": "0.10.0",
3+
"version": "1.1.1",
44
"main": [
5-
"./dist/angular-wizard.min.js",
6-
"./dist/angular-wizard.min.css"
5+
"./dist/angular-wizard.js",
6+
"./dist/angular-wizard.css"
77
],
88
"description": "Easy to use Wizard library for AngularJS ",
99
"repository": {

0 commit comments

Comments
 (0)