Proper form reseting after printing.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
var content, preview, selfPrinter;
|
var content, title, preview, selfPrinter;
|
||||||
var Printer = function () {
|
var Printer = function () {
|
||||||
|
|
||||||
|
|
||||||
@@ -8,6 +8,7 @@ var Printer = function () {
|
|||||||
this.delete = document.querySelector('.js-delete');
|
this.delete = document.querySelector('.js-delete');
|
||||||
|
|
||||||
content = this.content = document.querySelector('.js-content');
|
content = this.content = document.querySelector('.js-content');
|
||||||
|
title = this.title = document.querySelector('input[name="title"]');
|
||||||
|
|
||||||
|
|
||||||
selfPrinter = this;
|
selfPrinter = this;
|
||||||
@@ -56,6 +57,7 @@ var Printer = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.clear = function () {
|
this.clear = function () {
|
||||||
|
selfPrinter.title.value = '';
|
||||||
selfPrinter.content.innerHTML = '';
|
selfPrinter.content.innerHTML = '';
|
||||||
selfPrinter.selectIcon('empty');
|
selfPrinter.selectIcon('empty');
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user