Rename the edit state button in more info to debug

This commit is contained in:
Paulus Schoutsen 2015-01-14 22:15:27 -08:00
parent 7f7c403e00
commit fd6ff4c8d3
4 changed files with 12 additions and 14 deletions

View File

@ -26,7 +26,7 @@
Polymer({
cardClicked: function() {
this.api.showStateCardDialog(this.stateObj.entity_id);
this.api.showmoreInfoDialog(this.stateObj.entity_id);
},
});

View File

@ -4,7 +4,7 @@
<link rel="import" href="../cards/state-card-content.html">
<link rel="import" href="../more-infos/more-info-content.html">
<polymer-element name="state-card-dialog" attributes="api">
<polymer-element name="more-info-dialog" attributes="api">
<template>
<ha-action-dialog id="dialog">
@ -20,8 +20,8 @@
<more-info-content stateObj="{{stateObj}}" api="{{api}}"></more-info-content>
</div>
<paper-button dismissive>Dismiss</paper-button>
<paper-button affirmative on-click={{editClicked}}>Edit State</paper-button>
<paper-button dismissive on-click={{editClicked}}>Debug</paper-button>
<paper-button affirmative>Dismiss</paper-button>
</ha-action-dialog>
</template>
@ -29,12 +29,6 @@
Polymer({
stateObj: {},
// domReady: function() {
// this.$.dialog.addEventListener('core-overlay-open-completed', function() {
// this.$.dialog.resizeHandler();
// }.bind(this));
// },
show: function(stateObj) {
this.stateObj = stateObj;
this.$.dialog.toggle();

View File

@ -13,6 +13,10 @@
<core-style ref='ha-dialog'></core-style>
<p>
This dialog will update the representation of the device within Home Assistant. This will not communicate with the actual device.
</p>
<div layout horizontal>
<div class='ha-form'>
<paper-input id="inputEntityID" label="Entity ID" floatingLabel="true" autofocus required></paper-input>

View File

@ -6,7 +6,7 @@
<link rel="import" href="dialogs/event-fire-dialog.html">
<link rel="import" href="dialogs/service-call-dialog.html">
<link rel="import" href="dialogs/state-set-dialog.html">
<link rel="import" href="dialogs/state-card-dialog.html">
<link rel="import" href="dialogs/more-info-dialog.html">
<script>
var ha = {};
@ -36,7 +36,7 @@
<event-fire-dialog id="eventDialog" api={{api}}></event-fire-dialog>
<service-call-dialog id="serviceDialog" api={{api}}></service-call-dialog>
<state-set-dialog id="stateSetDialog" api={{api}}></state-set-dialog>
<state-card-dialog id="stateCardDialog" api={{api}}></state-card-dialog>
<more-info-dialog id="moreInfoDialog" api={{api}}></more-info-dialog>
</template>
<script>
var domainsWithCard = ['thermostat'];
@ -395,8 +395,8 @@
},
// show dialogs
showStateCardDialog: function(entityId) {
this.$.stateCardDialog.show(this.getState(entityId));
showmoreInfoDialog: function(entityId) {
this.$.moreInfoDialog.show(this.getState(entityId));
},
showEditStateDialog: function(entityId) {