Skip to content

Commit 7740410

Browse files
committed
merge enter binding
1 parent 0259939 commit 7740410

File tree

2 files changed

+52
-53
lines changed

2 files changed

+52
-53
lines changed

src/components/Canvas.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@
151151
</div>
152152
<div class="formBox">
153153
<q-form autofocus v-on:submit.prevent="submitNote">
154+
<<<<<<< Updated upstream
154155
<q-input
155156
v-model="noteText"
156157
label="Add your note here"
@@ -175,6 +176,14 @@
175176
label="Close"
176177
@click="this.openNoteModal"
177178
/>
179+
=======
180+
<q-input v-model="noteText" label="Add your note here" filled dark autofocus true hide-bottom-space
181+
:hint="hint" @keyup.enter="submitNote"></q-input>
182+
<q-btn id="comp-btn" class="sidebar-btn" color="secondary" label="Submit Note"
183+
:disable="noteText.length > 0 ? false : true" @keyup.enter="submitNote" @click="submitNote" />
184+
<q-btn id="note-btn-close" class="sidebar-btn closeAction" label="Close"
185+
@click="this.openNoteModal" />
186+
>>>>>>> Stashed changes
178187
</q-form>
179188

180189
</div>
Lines changed: 43 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,34 @@
11
<template>
22
<div>
33

4-
<q-btn-dropdown class="attributeDropDown" color="primary" :label="attributeSelection">
4+
<q-btn-dropdown class="attributeDropDown" color="primary" :label="attributeSelection">
55
<q-list>
6-
<q-item clickable v-close-popup @click="changeAttribute('id')">
6+
<q-item clickable v-close-popup @keyup.enter="changeAttribute('id')" @click="changeAttribute('id')">
77
<q-item-section>
88
<q-item-label>ID</q-item-label>
99
</q-item-section>
1010
</q-item>
1111

12-
<q-item clickable v-close-popup @click="changeAttribute('class')">
12+
<q-item clickable v-close-popup @keyup.enter="changeAttribute('class')" @click="changeAttribute('class')">
1313
<q-item-section>
1414
<q-item-label>Class</q-item-label>
1515
</q-item-section>
1616
</q-item>
1717
</q-list>
1818
</q-btn-dropdown>
1919

20-
<q-input
21-
@keyup.enter="createAttribute(attributeText)"
22-
color="white"
23-
dark
24-
outlined
25-
bottom-slots
26-
v-model="attributeText"
27-
label="Enter Label"
28-
dense
29-
class="input-add"
30-
v-on:keyup.delete.stop
31-
>
20+
<q-input @keyup.enter="createAttribute(attributeText)" color="white" dark outlined bottom-slots
21+
v-model="attributeText" label="Enter Label" dense class="input-add" v-on:keyup.delete.stop>
3222
<template v-slot:append>
3323
<q-btn flat icon="add" @click="createAttribute(attributeText)" />
3424
</template>
3525
</q-input>
3626

37-
<button v-if = "this.activeComponentObj.htmlAttributes.class !== ''" class = "deleteButton" @click="deleteAttribute('class')" color="primary">Remove class</button>
27+
<button v-if="this.activeComponentObj.htmlAttributes.class !== ''" class="deleteButton"
28+
@click="deleteAttribute('class')" color="primary">Remove class</button>
3829

39-
<button v-if = "this.activeComponentObj.htmlAttributes.id !== ''" class = "deleteButton" @click="deleteAttribute('id')" color="primary">Remove id</button>
30+
<button v-if="this.activeComponentObj.htmlAttributes.id !== ''" class="deleteButton" @click="deleteAttribute('id')"
31+
color="primary">Remove id</button>
4032

4133
<!-- <div>
4234
<q-btn
@@ -64,30 +56,30 @@ export default {
6456
return {
6557
attributeText: "",
6658
attributeSelection: "id",
67-
deleteText:"",
59+
deleteText: "",
6860
};
6961
},
7062
computed: {
7163
...mapState([
72-
"selectedProps",
64+
"selectedProps",
7365
"userProps",
74-
"activeComponentObj",
66+
"activeComponentObj",
7567
"activeComponent",
7668
"routes",
77-
]),
69+
]),
7870
},
7971
8072
methods: {
8173
...mapActions([
82-
"editAttribute",
83-
"activeRoute",
74+
"editAttribute",
75+
"activeRoute",
8476
"activeComponentData"
85-
]),
77+
]),
8678
// Prevent Delete on changes to searchable multiselect
8779
stopDelete(e) {
8880
if (e.code === "Backspace") e.stopPropogation();
8981
},
90-
82+
9183
createAttribute(attributeText) {
9284
this.editAttribute({
9385
attribute: this.attributeSelection,
@@ -109,38 +101,36 @@ export default {
109101
activeComponent: this.activeComponent,
110102
routeArray: this.routes[this.activeRoute],
111103
activeComponentData: this.activeComponentData,
112-
})
104+
})
113105
}
114106
},
115107
};
116108
</script>
117109

118110
<style lang="scss" scoped>
119-
120-
.attributeDropDown {
121-
margin-top: 15px;
122-
padding-right: 10px;
123-
font-size: 1em;
124-
}
125-
126-
.input-add {
127-
// position:absolute;
128-
// margin-left: 7em;
129-
// bottom:-100%;
130-
margin-top:1em;
131-
margin-bottom: -1em;
132-
}
133-
.deleteButton{
134-
width:100px;
135-
height:30px;
136-
background-color:rgba(204, 190, 190, 0.164);
137-
color: $menutext;
138-
margin-right:2em;
139-
}
140-
141-
.deleteButton:hover{
142-
cursor: pointer;
143-
}
144-
145-
111+
.attributeDropDown {
112+
margin-top: 15px;
113+
padding-right: 10px;
114+
font-size: 1em;
115+
}
116+
117+
.input-add {
118+
// position:absolute;
119+
// margin-left: 7em;
120+
// bottom:-100%;
121+
margin-top: 1em;
122+
margin-bottom: -1em;
123+
}
124+
125+
.deleteButton {
126+
width: 100px;
127+
height: 30px;
128+
background-color: rgba(204, 190, 190, 0.164);
129+
color: $menutext;
130+
margin-right: 2em;
131+
}
132+
133+
.deleteButton:hover {
134+
cursor: pointer;
135+
}
146136
</style>

0 commit comments

Comments
 (0)