Add close add-entry panel on entered.

This commit is contained in:
kor 2018-08-10 05:00:34 +12:00
parent d024cc4b9a
commit 246618d0d5

View File

@ -99,6 +99,8 @@ if (window.showAdd != undefined && window.showAdd)
content = content.replace(/ /g, ' '); // replace tabs/spaces
// var content = content.replace(/\u00a0/g, ' ');
ipcRenderer.send('write', "\r\n" + "\r\n" + content);
this.setOverlay(false);
this.clearForm();
});
for (var i = 0; i < this.keys.length; i++)
@ -115,6 +117,14 @@ if (window.showAdd != undefined && window.showAdd)
}, 100);
}
this.clearForm = function()
{
for (var i = 0; i < this.keys.length; i++)
{
this.elementList[this.keys[i]].elem.value = '';
}
}
this.setupElement = function(key, desc, type)
{
this.elementList[key] = { key: key, desc: desc, type: type, added: false};