Improved indicator

This commit is contained in:
Borys Levytskyi
2015-04-04 19:49:15 +03:00
parent ffe5e6d33d
commit 07024e4207
3 changed files with 10 additions and 3 deletions

View File

@@ -86,7 +86,13 @@ app.compose(function() {
},
update: function (cfg) {
var emIndicator = this.viewElement.querySelector('#emphasizeBytes');
emIndicator.style.display = cfg.emphasizeBytes ? '' : 'none';
var reg = /\son/g;
if(cfg.emphasizeBytes) {
emIndicator.classList.add("on");
} else {
emIndicator.classList.remove("on");
}
}
});

View File

@@ -21,7 +21,8 @@ code { font-size: 1.2em; font-weight: bold; }
.help { padding: 10px; background: #e0e0e0; }
.help ul { list-style-type: none; margin: 0; padding: 0; }
.configPnl .indicator { font-size: 0.7em; background: darkblue; color: white; padding: 2px; }
.configPnl .indicator { font-size: 0.7em; background: gray; color: white; padding: 2px; }
.configPnl .on { background: darkblue; }
.error { color: maroon; }

View File

@@ -46,7 +46,7 @@
<input id="in" type="text" class="expressionInput" data-controller="expressionInputCtrl" placeholder="type expression like '1>>2' or 'help' "/>
<span data-controller="configPanelCtrl" class="configPnl">
<span id="emphasizeBytes" class="indicator">Emphasize Bytes</span>
<span id="emphasizeBytes" class="indicator on"><strong>em:</strong> Emphasize Bytes</span>
</span>
</div>