Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalo123 committed Apr 30, 2017
1 parent c59f3d0 commit 869cc68
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,14 @@ sap.ui.define([
var i18nModel = new ResourceModel({
bundleName: "gonzalo123.i18n.i18n"
});

this.getView().setModel(i18nModel, "i18n");
},

onStatusChange: function () {
var status = this.getView().getModel().oData.light.status
console.log("onStatusChange", status);
io.emit('mqtt', {
topic: 'sensors/arduino/light/change',
payload: (status ? "1" : "0")
payload: (this.getView().getModel().oData.light.status ? "1" : "0")
});
}
});
Expand Down
4 changes: 1 addition & 3 deletions www/gonzalo123/Component.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sap.ui.define(['jquery.sap.global', 'sap/ui/core/UIComponent'],
function (jQuery, UIComponent) {
"use strict";

var Component = UIComponent.extend("gonzalo123.Component", {
return UIComponent.extend("gonzalo123.Component", {
metadata: {
rootView: "gonzalo123.view.App",
routing: {
Expand All @@ -27,6 +27,4 @@ sap.ui.define(['jquery.sap.global', 'sap/ui/core/UIComponent'],
this.getTargets().display("main");
}
});

return Component;
});
4 changes: 1 addition & 3 deletions www/gonzalo123/controller/Controller.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,9 @@ sap.ui.define([
},

onStatusChange: function () {
var status = this.getView().getModel().oData.light.status
console.log("onStatusChange", status);
io.emit('mqtt', {
topic: 'sensors/arduino/light/change',
payload: (status ? "1" : "0")
payload: (this.getView().getModel().oData.light.status ? "1" : "0")
});
}
});
Expand Down
1 change: 0 additions & 1 deletion www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
}).placeAt("content");
});
</script>

</head>
<body class="sapUiBody" id="content">
</body>
Expand Down

0 comments on commit 869cc68

Please sign in to comment.