Skip to content

Commit

Permalink
fixed: #29
Browse files Browse the repository at this point in the history
  • Loading branch information
LukaszWatroba committed Oct 30, 2015
1 parent 4274442 commit d37863f
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 8 deletions.
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,52 @@ vAccordion manages keyboard focus and adds some common aria-* attributes. BUT yo

</v-accordion>
```

```html
<v-accordion multiple control="myAccordion" onexpand="expandCb(index, id)">
<v-pane id="myPane1">
<v-pane-header>
First pane header
</v-pane-header>

<v-pane-content>
First pane content
</v-pane-content>
</v-pane>

<v-pane id="myPane2">
<v-pane-header>
Second pane header
</v-pane-header>

<v-pane-content>
Second pane content

<v-accordion multiple control="mySubAccordion">
<v-pane id="mySubPane1">
<v-pane-header inactive>
First pane header
<button ng-click="$pane.toggle()">Toggle me</button>
</v-pane-header>

<v-pane-content>
First pane content
</v-pane-content>
</v-pane>
</v-accordion>
</v-pane-content>
</v-pane>
</v-accordion>
```

```js
myApp.controller('myAccordionController', function ($scope) {

$scope.expandCb = function (index, id) {
if (id === 'pane1') {
$scope.mySubAccordion.collapse('mySubPane1');
}
};

});
```
2 changes: 1 addition & 1 deletion dist/v-accordion.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* vAccordion - AngularJS multi-level accordion component
* @version v1.4.0
* @version v1.4.1
* @link http://lukaszwatroba.github.io/v-accordion
* @author Łukasz Wątroba <l@lukaszwatroba.com>
* @license MIT License, http://www.opensource.org/licenses/MIT
Expand Down
4 changes: 2 additions & 2 deletions dist/v-accordion.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* vAccordion - AngularJS multi-level accordion component
* @version v1.4.0
* @version v1.4.1
* @link http://lukaszwatroba.github.io/v-accordion
* @author Łukasz Wątroba <l@lukaszwatroba.com>
* @license MIT License, http://www.opensource.org/licenses/MIT
Expand Down Expand Up @@ -461,7 +461,7 @@ function vPaneDirective ($timeout, $animate, accordionConfig) {
accordionCtrl.addPane(scope);

function emitEvent (eventName) {
eventName = (angular.isDefined(accordionId)) ? accordionId + ':' + eventName : 'vAccoridion:' + eventName;
eventName = (angular.isDefined(accordionId)) ? accordionId + ':' + eventName : 'vAccordion:' + eventName;
scope.$emit(eventName);
}

Expand Down
2 changes: 1 addition & 1 deletion dist/v-accordion.min.css

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

4 changes: 2 additions & 2 deletions dist/v-accordion.min.js

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "v-accordion",
"description": "vAccordion - AngularJS multi-level accordion component",
"version": "1.4.0",
"version": "1.4.1",
"author": "Łukasz Wątroba <l@lukaszwatroba.com>",
"license": "MIT",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion src/vAccordion/directives/v-pane.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function vPaneDirective ($timeout, $animate, accordionConfig) {
accordionCtrl.addPane(scope);

function emitEvent (eventName) {
eventName = (angular.isDefined(accordionId)) ? accordionId + ':' + eventName : 'vAccoridion:' + eventName;
eventName = (angular.isDefined(accordionId)) ? accordionId + ':' + eventName : 'vAccordion:' + eventName;
scope.$emit(eventName);
}

Expand Down

0 comments on commit d37863f

Please sign in to comment.