mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2026-02-01 16:44:39 +01:00
Merge branch 'master' of https://github.com/BorisLevitskiy/bitwisecmd into gh-pages
This commit is contained in:
@@ -13,7 +13,7 @@ app.compose(function() {
|
||||
this.viewElement.focus();
|
||||
|
||||
this.viewElement.addEventListener('keyup', function (args) {
|
||||
var inpt = args.srcElement;
|
||||
var inpt = args.target;
|
||||
|
||||
if (args.keyCode != 13 || inpt.value.trim().length == 0) {
|
||||
return;
|
||||
@@ -30,7 +30,7 @@ app.compose(function() {
|
||||
if(args.keyCode == 38) {
|
||||
|
||||
if (self.history.length > self.historyIndex) { // up
|
||||
args.srcElement.value = self.history[self.historyIndex++];
|
||||
args.target.value = self.history[self.historyIndex++];
|
||||
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ app.compose(function() {
|
||||
if(args.keyCode == 40) {
|
||||
|
||||
if(self.historyIndex > 0) { // up
|
||||
args.srcElement.value = self.history[--self.historyIndex];
|
||||
args.target.value = self.history[--self.historyIndex];
|
||||
}
|
||||
|
||||
args.preventDefault();
|
||||
|
||||
@@ -39,8 +39,8 @@ app.compose(function () {
|
||||
var binCell = row.insertCell();
|
||||
binCell.className = 'bin';
|
||||
|
||||
decCell.innerText = o;
|
||||
binCell.innerText = formatter.toBinaryString(o, maxLen);
|
||||
decCell.textContent = o;
|
||||
binCell.textContent = formatter.toBinaryString(o, maxLen);
|
||||
});
|
||||
|
||||
colorizeBits(table);
|
||||
@@ -86,7 +86,7 @@ app.compose(function () {
|
||||
function colorizeBits(container) {
|
||||
var list = container.querySelectorAll('.bin');
|
||||
Array.prototype.forEach.call(list, function(el){
|
||||
var bin = el.innerText;
|
||||
var bin = el.textContent;
|
||||
|
||||
el.innerHTML = bin
|
||||
.replace(/(\d{8})/g, '<span class="byte">$1</span>')
|
||||
|
||||
@@ -33,11 +33,11 @@
|
||||
element.checked = model[propertyName];
|
||||
|
||||
element.addEventListener('changed', function (e) {
|
||||
model[propertyName] = e.srcElement.checked == true;
|
||||
model[propertyName] = e.target.checked == true;
|
||||
});
|
||||
|
||||
model.observe(propertyName, function (property, value) {
|
||||
if (window.event && window.event.srcElement == element) {
|
||||
if (window.event && window.event.target == element) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -50,11 +50,11 @@
|
||||
input.value = model[propertyName];
|
||||
|
||||
input.addEventListener('keyup', function (e) {
|
||||
model[propertyName] = e.srcElement.value;
|
||||
model[propertyName] = e.target.value;
|
||||
});
|
||||
|
||||
model.observe(propertyName, function (property, value) {
|
||||
if (window.event && window.event.srcElement == input) {
|
||||
if (window.event && window.event.target == input) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user