clearing text area while cancel
This commit is contained in:
@@ -108,7 +108,8 @@ module.exports = {
|
||||
|
||||
this.$set("selectedValues[this.tab - 1]", file.name);
|
||||
this.$dispatch("macros-edited");
|
||||
|
||||
console.log("file.name", file.name);
|
||||
console.log("file.name type: ", typeof file.name);
|
||||
SvelteComponents.showDialog("Upload", {
|
||||
file,
|
||||
onComplete: () => {
|
||||
@@ -192,8 +193,10 @@ module.exports = {
|
||||
this.$set("newGcode[this.tab - 1]", "");
|
||||
} else {
|
||||
api.delete(`file/${this.selectedValues[this.tab - 1]}`);
|
||||
// this.$set("newGcode[this.tab-1]", "");
|
||||
// this.$set("this.selectedValues[this.tab - 1]", "default");
|
||||
this.$set("newGcode[this.tab - 1]", "");
|
||||
this.$set("this.selectedValues[this.tab - 1]", "default");
|
||||
this.$set("selectedValues[this.tab - 1]", "default");
|
||||
this.config.macrosList = this.config.macrosList.filter(
|
||||
item => item.file_name !== this.selectedValues[this.tab - 1],
|
||||
);
|
||||
@@ -223,8 +226,8 @@ 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;
|
||||
this.$set("selectedValues[this.tab-1]", "default");
|
||||
this.$set("newGcode[this.tab - 1]", "");
|
||||
this.$set("selectedValues[this.tab - 1]", "default");
|
||||
},
|
||||
deleteAllMacros: async function () {
|
||||
this.config.macros = [
|
||||
|
||||
@@ -281,7 +281,7 @@ script#macros-template(type="text/x-template")
|
||||
.gcodeContainer
|
||||
textarea.new-gcode( :value='newGcode[tab-1]' @input="updateNewGcode")
|
||||
|
||||
button.submit-macros(title="Save Macros",@click="confirmSave=true",:disabled="!edited") Save
|
||||
button.submit-macros.button-success(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
|
||||
|
||||
@@ -693,7 +693,6 @@ span.unit
|
||||
width 140px
|
||||
margin-top 30px
|
||||
font-weight normal
|
||||
background-color #add1ad
|
||||
color #fff
|
||||
border 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user