Skip to content

Commit

Permalink
Ui::SendToConsole
Browse files Browse the repository at this point in the history
  • Loading branch information
nummi committed Sep 10, 2019
1 parent bf6d7d5 commit 8b8c7a5
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 22 deletions.
2 changes: 1 addition & 1 deletion app/templates/components/promise-item.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
Stack Trace
</button>
{{else}}
{{ui/send-to-console action=sendValueToConsole param=model}}
<Ui::SendToConsole @action={{sendValueToConsole}} @param={{model}} />
{{/if}}
</div>
{{else}}
Expand Down
16 changes: 8 additions & 8 deletions app/templates/components/route-cell-objects.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
Route
</span>

{{ui/send-to-console
action=@sendRouteHandlerToConsole
param=@route.value.routeHandler.name
}}
<Ui::SendToConsole
@action={{@sendRouteHandlerToConsole}}
@param={{@route.value.routeHandler.name}}
/>

{{#if route.value.controller.exists}}
<span
Expand All @@ -21,9 +21,9 @@
Controller
</span>

{{ui/send-to-console
action=@sendControllerToConsole
param=@route.value.controller.name
}}
<Ui::SendToConsole
@action={{@sendControllerToConsole}}
@param={{@route.value.controller.name}}
/>
{{/if}}
</div>
2 changes: 1 addition & 1 deletion app/templates/container-type-toolbar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<Ui::ToolbarDivider />

{{ui/send-to-console action=(action "sendContainerToConsole")}}
<Ui::SendToConsole @action={{action "sendContainerToConsole"}} />

<Ui::ToolbarDivider />

Expand Down
4 changes: 1 addition & 3 deletions app/templates/container-types/index-toolbar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@

<Ui::ToolbarDivider />

{{ui/send-to-console
action=(action "sendContainerToConsole")
}}
<Ui::SendToConsole @action={{action "sendContainerToConsole"}} />
</div>
10 changes: 2 additions & 8 deletions lib/ui/addon/components/send-to-console.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ import layout from '../templates/components/send-to-console';

export default Component.extend({
layout,
tagName: 'button',
classNames: ['send-to-console', 'js-send-to-console-btn'],
attributeBindings: ['title'],
title: 'Send to Console',
action: 'sendValueToConsole',
click() {
this.action(this.get('param'));
}
tagName: ''
});

8 changes: 7 additions & 1 deletion lib/ui/addon/templates/components/send-to-console.hbs
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
{{svg-jar "send-with-text" width="20px" height="10px"}}
<button
class="send-to-console js-send-to-console-btn"
title="Send to Console"
{{on "click" (fn @action @param)}}
>
{{svg-jar "send-with-text" width="20px" height="10px"}}
</button>

0 comments on commit 8b8c7a5

Please sign in to comment.