Add custom operation icons

charithag 9 years ago
parent 545c132ef0
commit 8ab41c4e20

@ -19,7 +19,11 @@
</style>
{{#each control_operations}}
<a href="javascript:operationSelect('{{operation}}')">
<i class="fw fw-service"></i>
{{#if icon}}
<img src="{{@app.context}}/{{icon}}" style="width: 48px;"/>
{{else}}
<i class="fw fw-service"></i>
{{/if}}
<span>{{name}}</span>
</a>

@ -17,10 +17,9 @@
*/
function onRequest(context) {
var log = new Log("operation.js");
//var log = new Log("operation.js");
var operationModule = require("/app/modules/operation.js").operationModule;
var device = context.unit.params.device;
log.info(device);
var control_operations = operationModule.getControlOperations(device.type);
return {"control_operations": control_operations, "device": device};
}
Loading…
Cancel
Save