Implemented indicators

This commit is contained in:
Borys Levytskyi
2015-04-04 17:00:06 +03:00
parent 960b61de03
commit fab8668993
8 changed files with 82 additions and 36 deletions

View File

@@ -79,11 +79,15 @@ app.compose(function() {
app.controller('configPanelCtrl', {
onViewAttached: function (){
var chk = this.viewElement.querySelector('#displayBytes');
chk.checked = app.emphasizeBytes;
chk.addEventListener('change', function(evt){
app.emphasizeBytes = evt.srcElement.checked === true;
})
var self = this;
self.update();
app.cmdConfig.observe(function(){
self.update();
});
},
update: function () {
var emIndicator = this.viewElement.querySelector('#emphasizeBytes');
emIndicator.style.display = app.cmdConfig.emphasizeBytes ? '' : 'none';
}
});