Skip to content
Browse files

removed Ember.Link in favor of new `action` helpers

  • Loading branch information...
1 parent ebb9874 commit e8d8d4cd8754a102a5d4d0388c9e74c7cc28d0f2 @dgeb committed Jan 24, 2012
View
2 app/assets/javascripts/app/templates/contacts/edit.handlebars
@@ -7,4 +7,4 @@
{{submitButton "Create"}}
{{/if}}
{{/with}}
-{{#view Ember.Link action="cancelForm"}}Cancel{{/view}}
+<a href="#" {{action "cancelForm"}}>Cancel</a>
View
4 app/assets/javascripts/app/templates/contacts/list.handlebars
@@ -20,6 +20,6 @@
</tbody>
</table>
<div class="commands">
- {{#view Ember.Link action="showNew"}}New Contact{{/view}}
- {{#view Ember.Link action="refreshListing"}}Refresh Listing{{/view}}
+ <a href="#" {{action "showNew"}}>New Contact</a>
+ <a href="#" {{action "refreshListing"}}>Refresh Listing</a>
</div>
View
4 app/assets/javascripts/app/templates/contacts/show.handlebars
@@ -7,8 +7,8 @@
{{/if}}
<div class="commands">
{{#unless isEditing}}
- {{#view Ember.Link action="showEdit"}}Edit{{/view}}
- {{#view Ember.Link action="destroyRecord"}}Remove{{/view}}
+ <a href="#" {{action "showEdit"}}>Edit</a>
+ <a href="#" {{action "destroyRecord"}}>Remove</a>
{{/unless}}
</div>
</td>
View
3 app/assets/javascripts/app/views/contacts/show.js
@@ -3,9 +3,8 @@ App.ShowContactView = Ember.View.extend({
classNames: ['show-contact'],
tagName: 'tr',
- doubleClick: function(evt) {
+ doubleClick: function() {
this.showEdit();
- return false;
},
showEdit: function() {
View
0 app/assets/javascripts/lib/.gitkeep
No changes.
View
15 app/assets/javascripts/lib/ember-link.js
@@ -1,15 +0,0 @@
-Ember.Link = Ember.View.extend(Ember.TargetActionSupport, {
- classNames: ['ember-link'],
- tagName: 'a',
- attributeBindings: ['href'],
- href: '#',
- target: 'parentView',
- propagateEvents: false,
-
- click: function(evt) {
- if (this.triggerAction()) {
- evt.preventDefault();
- return Ember.get(this, 'propagateEvents');
- }
- }
-});

0 comments on commit e8d8d4c

Please sign in to comment.
Something went wrong with that request. Please try again.