Compare commits

...

2 Commits

Author SHA1 Message Date
kplaczek
5e33b072d6 Merge branch 'issue-1' of http://pi.techtube.pl:3000/krzysiej/paper-pi into issue-1
# Conflicts:
#	public/js/printer.js
2018-04-04 19:59:28 +02:00
kplaczek
bcc445f75a issue #1 reset form resets selected icon to empty 2018-04-04 19:57:07 +02:00

View File

@@ -1,4 +1,4 @@
var content, preview; var content, preview, selfPrinter;
var Printer = function () { var Printer = function () {
@@ -9,7 +9,6 @@ var Printer = function () {
content = this.content = document.querySelector('.js-content'); content = this.content = document.querySelector('.js-content');
selfPrinter = this; selfPrinter = this;
this.reset.addEventListener('click', this.clear); this.reset.addEventListener('click', this.clear);
@@ -23,14 +22,7 @@ var Printer = function () {
document.querySelectorAll('.icon').forEach(function (e) { document.querySelectorAll('.icon').forEach(function (e) {
e.addEventListener('click', function () { e.addEventListener('click', function () {
selfPrinter.selectIcon(this.title); selfPrinter.selectIcon(this.title);
// document.querySelectorAll('.icon').forEach(function (e, i) {
// e.classList.remove('selected');
// });
// document.querySelector('#icon').value = this.title;
// this.classList.add('selected');
}); });
}) })