minor changes for #ec10
This commit is contained in:
parent
4234ae107c
commit
8a1e0a0e7f
4 changed files with 20 additions and 39 deletions
|
@ -73,7 +73,7 @@
|
|||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
<div><button name="addUUID"><img src="images/add.png" alt="add" /> UUID hinzufügen</button> <button name="newEntity"><img src="images/star.png" alt="new" /> Entity erstellen</button></div>
|
||||
<div><button name="addUUID"><img src="images/add.png" alt="add" /> UUID abonnieren</button> <button name="newEntity"><img src="images/star.png" alt="new" /> Entity erstellen</button></div>
|
||||
</div>
|
||||
<h3><img src="images/wrench.png" alt="" /> Optionen</h3>
|
||||
<div id="options">
|
||||
|
|
|
@ -69,43 +69,24 @@ Entity.prototype.showDetails = function() {
|
|||
* @todo implement/test
|
||||
*/
|
||||
Entity.prototype.getDOM = function() {
|
||||
var properties = $('<table><thead><th>Key</th><th>Value</th></thead></table');
|
||||
|
||||
$.each(entity, function(key, value) {
|
||||
properties.append($('<tr>')
|
||||
.append($('<td>')
|
||||
.addClass('key')
|
||||
.text(key)
|
||||
)
|
||||
.append($('<td>')
|
||||
.addClass('value')
|
||||
.text(value)
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
var entity = getDefinition(entities, type);
|
||||
|
||||
entity.required.each(function(index, property) {
|
||||
var property = getDefinition(properties, property);
|
||||
|
||||
if (property) {
|
||||
$('#properties')
|
||||
.append($('<tr>')
|
||||
.addClass('required')
|
||||
.append($('<td>')
|
||||
.append($('<label>')
|
||||
.attr('for', property.name)
|
||||
.text(property.translation.de + ':')
|
||||
)
|
||||
)
|
||||
.append($('<td>').append(getPropertyDOM(property)))
|
||||
.append($('<td>').text('(*)'))
|
||||
);
|
||||
var table = $('<table><thead><tr><th>Key</th><th>Value</th></tr></thead></table>');
|
||||
var data = $('<tbody>');
|
||||
|
||||
for (var property in this) {
|
||||
if (this.hasOwnProperty(property) && property != 'data' && property != 'children') {
|
||||
data.append($('<tr>')
|
||||
.append($('<td>')
|
||||
.addClass('key')
|
||||
.text(property)
|
||||
)
|
||||
.append($('<td>')
|
||||
.addClass('value')
|
||||
.text(this[property])
|
||||
)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
// TODO optional properties
|
||||
}
|
||||
return table.append(data);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
vz.wui.init = function() {
|
||||
// start auto refresh timer
|
||||
window.setInterval(this.refresh, 5000);
|
||||
window.setInterval(this.refresh, 3000);
|
||||
|
||||
// initialize dropdown accordion
|
||||
$('#accordion h3').click(function() {
|
||||
|
|
|
@ -43,7 +43,7 @@ vz.options.plot = {
|
|||
//symbol: 'square'
|
||||
symbol: function(ctx, x, y, radius, shadow) { // just draw simple pixels
|
||||
ctx.lineWidth = 1;
|
||||
ctx.strokeRect(x-0.5, y-0.5, 1, 1);
|
||||
ctx.strokeRect(x-1, y-1, 2, 2);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue