From fcfe9729384a322fadbf1ef5985c9cd877249120 Mon Sep 17 00:00:00 2001 From: sanjayk03-dev Date: Sun, 28 Jan 2024 14:19:06 +0530 Subject: [PATCH] added id to textarea --- src/js/macros.js | 2 +- src/pug/templates/macros.pug | 18 +++++++++--------- src/stylus/style.styl | 1 - 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/js/macros.js b/src/js/macros.js index 8fce0ff..239306c 100644 --- a/src/js/macros.js +++ b/src/js/macros.js @@ -224,7 +224,7 @@ module.exports = { const defaultValue = this.config.macros[this.tab - 1]; document.getElementById(`macros-name-${this.tab - 1}`).value = defaultValue.name; document.getElementById(`macros-color-${this.tab - 1}`).value = defaultValue.color; - document.getElementsByClassName("new-gcode").value = ""; + document.getElementById("gcode-field").value = ""; this.$set("newGcode[this.tab - 1]", ""); this.$set("selectedValues[this.tab - 1]", "default"); }, diff --git a/src/pug/templates/macros.pug b/src/pug/templates/macros.pug index 9040c0d..907eab8 100644 --- a/src/pug/templates/macros.pug +++ b/src/pug/templates/macros.pug @@ -83,7 +83,7 @@ script#macros-template(type="text/x-template") .fa.fa-trash br .gcodeContainer - textarea.new-gcode( :value='newGcode[tab-1]' @input="updateNewGcode") + textarea.new-gcode(id="gcode-field", :value='newGcode[tab-1]' @input="updateNewGcode") section#content2.tab-content .macros-form @@ -111,7 +111,7 @@ script#macros-template(type="text/x-template") .fa.fa-trash br .gcodeContainer - textarea.new-gcode( :value='newGcode[tab-1]' @input="updateNewGcode") + textarea.new-gcode(id="gcode-field", :value='newGcode[tab-1]' @input="updateNewGcode") section#content3.tab-content .macros-form @@ -139,7 +139,7 @@ script#macros-template(type="text/x-template") .fa.fa-trash br .gcodeContainer - textarea.new-gcode( :value='newGcode[tab-1]' @input="updateNewGcode") + textarea.new-gcode(id="gcode-field", :value='newGcode[tab-1]' @input="updateNewGcode") section#content4.tab-content .macros-form @@ -167,7 +167,7 @@ script#macros-template(type="text/x-template") .fa.fa-trash br .gcodeContainer - textarea.new-gcode( :value='newGcode[tab-1]' @input="updateNewGcode") + textarea.new-gcode(id="gcode-field", :value='newGcode[tab-1]' @input="updateNewGcode") section#content5.tab-content .macros-form @@ -195,7 +195,7 @@ script#macros-template(type="text/x-template") .fa.fa-trash br .gcodeContainer - textarea.new-gcode( :value='newGcode[tab-1]' @input="updateNewGcode") + textarea.new-gcode(id="gcode-field", :value='newGcode[tab-1]' @input="updateNewGcode") section#content6.tab-content .macros-form @@ -223,7 +223,7 @@ script#macros-template(type="text/x-template") .fa.fa-trash br .gcodeContainer - textarea.new-gcode( :value='newGcode[tab-1]' @input="updateNewGcode") + textarea.new-gcode(id="gcode-field", :value='newGcode[tab-1]' @input="updateNewGcode") section#content7.tab-content .macros-form @@ -251,7 +251,7 @@ script#macros-template(type="text/x-template") .fa.fa-trash br .gcodeContainer - textarea.new-gcode( :value='newGcode[tab-1]' @input="updateNewGcode") + textarea.new-gcode(id="gcode-field", :value='newGcode[tab-1]' @input="updateNewGcode") section#content8.tab-content .macros-form @@ -279,9 +279,9 @@ script#macros-template(type="text/x-template") .fa.fa-trash br .gcodeContainer - textarea.new-gcode( :value='newGcode[tab-1]' @input="updateNewGcode") + textarea.new-gcode( id="gcode-field",:value='newGcode[tab-1]' @input="updateNewGcode") - button.submit-macros.button-success(title="Save Macros",@click="confirmSave=true",:disabled="!edited") Save + button.submit-macros.button-secondary(title="Save Macros",@click="confirmSave=true",:disabled="!edited") Save button.submit-macros(title="Cancel Macros",@click="cancelMacros",style="margin-left:5px") Cancel button.submit-macros(title="Cancel Macros",@click="printState",style="margin-left:5px") Print State diff --git a/src/stylus/style.styl b/src/stylus/style.styl index 6bd8726..20b170a 100644 --- a/src/stylus/style.styl +++ b/src/stylus/style.styl @@ -693,7 +693,6 @@ span.unit width 140px margin-top 30px font-weight normal - color #fff border 0