Skip to content

Commit

Permalink
proxy actions upwards, bump version to 0.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
raycohen committed Aug 29, 2014
1 parent e58f750 commit 996f7d8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/components/draggable-each.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ export default Ember.CollectionView.extend(Ember.TargetActionSupport, {
}),
controller: Ember.ObjectProxy.create({
content: this.get('controller'),
container: this.container
container: this.container,
send: function() {
var content = this.get('content');
content.send.apply(content, arguments);
}
}),
_view: Ember.ObjectProxy.create({
content: this
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "draggable-each",
"version": "0.0.3",
"version": "0.0.4",
"directories": {
"doc": "doc",
"test": "test"
Expand Down
3 changes: 3 additions & 0 deletions tests/dummy/app/controllers/using-item-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ export default Ember.ArrayController.extend({
this.forEach(function(itemController){
itemController.set('status', 'moved x' + numMoves);
});
},
remove: function(item){
this.get('content').removeObject(item);
}
}
});
1 change: 1 addition & 0 deletions tests/dummy/app/templates/using-item-controller.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

{{#draggable-each context=this handleSelector=".draggable-item-handle" itemWasMoved="itemWasMoved"}}
<div class="draggable-item-handle">{{name}}</div>
<button class="remove" {{action "remove" this}}>remove</button>
view.elementId:{{view.elementId}} (X)
({{status}})
{{/draggable-each}}
Expand Down

0 comments on commit 996f7d8

Please sign in to comment.