Permalink
Browse files

fix(buttons): correctly named class and actions view model pan-framework

  • Loading branch information...
bas080
bas080 committed Jun 7, 2016
1 parent c88f5a2 commit 0e5f287d5fbcefd0d3ed351268c480e084cf080d
Showing with 22 additions and 17 deletions.
  1. +9 −0 src/frameworks/actions.js
  2. +10 −10 src/frameworks/bootstrap/actions.html
  3. +3 −7 src/frameworks/bootstrap/actions.js
@@ -0,0 +1,9 @@
//import {bindable, bindingMode} from 'aurelia-framework';
export class Actions {

activate(model) {
this.attribute = model.attribute;
this.model = model.value;
}

}
@@ -1,12 +1,12 @@
<template>

<div class="btn-group">
<button
class="btn btn-default"
repeat.for="action of attribute.actions"
click.delegate="onClick(action)">
${action.label}
</button>
</div>

<require from="./form-group.html"></require>
<form-group attribute.bind="attribute">
<div class="btn-group">
<button repeat.for="action of attribute.actions"
class="btn btn-default"
click.delegate="action.action($event)">
${action.label}
</button>
</div>
</form-group>
</template>
@@ -1,14 +1,10 @@
//import {bindable, bindingMode} from 'aurelia-framework';
import {Actions} from '../actions';

export class ActionsCustomComponent {
export class ActionsCustomElement extends Actions {

activate(model) {
this.attribute = model.attribute;
this.model = model.model;
}

onClick(action) {
action.action();
this.model = model.value;
}

}

0 comments on commit 0e5f287

Please sign in to comment.