|
31 | 31 | that inject Ember into the <code>head</code> of the page. |
32 | 32 | </p> |
33 | 33 |
|
34 | | -<button type="button" id="toggle-title" {{action 'toggleTitle'}}>Toggle Title</button> |
| 34 | +<button type="button" id="toggle-title" {{on "click" this.toggleTitle}}>Toggle Title</button> |
35 | 35 | <label> |
36 | 36 | Favicon: <Input @value={{this.favicon}} class="favicon" /> |
37 | 37 | </label> |
38 | 38 |
|
39 | 39 | <div class='example' id='example-modal'> |
40 | 40 | <h2>Modal Example</h2> |
41 | 41 | {{!-- BEGIN-SNIPPET modal --}} |
42 | | - <button type="button" {{action 'toggleModal'}}>Toggle Modal</button> |
| 42 | + <button type="button" {{on "click" this.toggleModal}}>Toggle Modal</button> |
43 | 43 | {{#current-user as |user|}} |
44 | 44 | <label> |
45 | 45 | Username: <Input @value={{user.username}} class="username" /> |
46 | 46 | </label> |
47 | 47 | {{#if this.isShowingModal}} |
48 | 48 | {{#ember-wormhole to='modals'}} |
49 | 49 | {{#if this.isShowingOverlay}} |
50 | | - <div role="button" class="overlay" {{action 'toggleModal'}}></div> |
| 50 | + <div role="button" class="overlay" {{on "click" this.toggleModal}}></div> |
51 | 51 | {{/if}} |
52 | 52 | <div class="dialog"> |
53 | 53 | <h1>Hi, I'm a simple modal dialog</h1> |
54 | 54 | <p>Here we have some content which is bound from the context |
55 | 55 | where the wormhole component was used: "{{user.username}}"</p> |
56 | | - <button type="button" {{action 'toggleModal'}}>Close</button> |
57 | | - <button type="button" {{action 'toggleOverlay'}}>Toggle Overlay</button> |
| 56 | + <button type="button" {{on "click" this.toggleModal}}>Close</button> |
| 57 | + <button type="button" {{on "click" this.toggleOverlay}}>Toggle Overlay</button> |
58 | 58 | </div> |
59 | 59 | {{/ember-wormhole}} |
60 | 60 | {{/if}} |
|
66 | 66 | <h2>Sidebar Example</h2> |
67 | 67 | {{!-- BEGIN-SNIPPET sidebar --}} |
68 | 68 | {{#current-user as |user|}} |
69 | | - <button type="button" {{action 'toggleSidebarContent'}}>Toggle Sidebar Content</button> |
70 | | - <button type="button" {{action 'switchSidebars'}}>Switch Sidebars From Without</button> |
71 | | - <button type="button" {{action 'toggleInPlace'}}>Toggle In Place</button> |
| 69 | + <button type="button" {{on "click" this.toggleSidebarContent}}>Toggle Sidebar Content</button> |
| 70 | + <button type="button" {{on "click" this.switchSidebars}}>Switch Sidebars From Without</button> |
| 71 | + <button type="button" {{on "click" this.toggleInPlace}}>Toggle In Place</button> |
72 | 72 | <label> |
73 | 73 | First Name: <Input @value={{user.firstName}} class="first-name" /> |
74 | 74 | </label> |
|
80 | 80 | <h1>Epic sidebar action</h1> |
81 | 81 | <p>Here we have some content which is bound from the context |
82 | 82 | where the wormhole component was used: "{{user.fullName}}"</p> |
83 | | - <button type="button" {{action 'toggleSidebarContent'}}>Hide Sidebar Content</button> |
84 | | - <button type="button" {{action 'switchSidebars'}}>Switch Sidebars From Within</button> |
| 83 | + <button type="button" {{on "click" this.toggleSidebarContent}}>Hide Sidebar Content</button> |
| 84 | + <button type="button" {{on "click" this.switchSidebars}}>Switch Sidebars From Within</button> |
85 | 85 | {{/ember-wormhole}} |
86 | 86 | {{/if}} |
87 | 87 | {{/current-user}} |
|
0 commit comments