@afeefa/vue-app 0.0.64 → 0.0.65
Sign up to get free protection for your applications and to get access to all the features.
- package/.afeefa/package/release/version.txt +1 -1
- package/package.json +1 -1
- package/src/components/ABreadcrumbs.vue +3 -2
- package/src/components/ARichTextArea.vue +95 -85
- package/src/components/form/EditForm.vue +9 -0
- package/src/components/form/EditModal.vue +2 -0
- package/src/components/form/fields/FormFieldRichTextArea.vue +5 -3
- package/src/components/list/ListViewMixin.js +14 -2
- package/src/components/search-select/SearchSelectList.vue +0 -1
- package/src/components/vue/Component.js +9 -2
- package/src/events.js +1 -0
- package/src-admin/components/App.vue +53 -8
- package/src-admin/components/StickyFooter.vue +42 -0
- package/src-admin/components/StickyFooterContainer.vue +66 -0
- package/src-admin/components/form/EditFormButtons.vue +4 -1
- package/src-admin/components/index.js +2 -0
- package/src-admin/components/list/ListView.vue +5 -6
- package/src-admin/components/pages/EditPage.vue +11 -7
- package/src-admin/components/routes/DataRouteMixin.js +1 -1
- package/src-admin/config/vuetify.js +7 -1
- package/src-admin/styles.scss +1 -4
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.65
|
package/package.json
CHANGED
@@ -106,9 +106,10 @@ export default class ABreadcrumbs extends Vue {
|
|
106
106
|
getItemTitle (title) {
|
107
107
|
// title = title.concat(title).concat(title)
|
108
108
|
if (title.length > 20) {
|
109
|
-
title = title.slice(0, 10).trim() + '...' + title.slice(-10).trim()
|
109
|
+
// title = title.slice(0, 10).trim() + '...' + title.slice(-10).trim()
|
110
110
|
}
|
111
|
-
return title
|
111
|
+
return title
|
112
|
+
// return title.toUpperCase()
|
112
113
|
}
|
113
114
|
}
|
114
115
|
</script>
|
@@ -4,85 +4,84 @@
|
|
4
4
|
v-if="editor"
|
5
5
|
class="menu-bar"
|
6
6
|
>
|
7
|
-
<
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
</v-btn>
|
7
|
+
<div>
|
8
|
+
<v-btn
|
9
|
+
small
|
10
|
+
:class="['menu-button', {'is-active': focus && editor.isActive('bold')}]"
|
11
|
+
@click="editor.chain().focus().toggleBold().run()"
|
12
|
+
>
|
13
|
+
<v-icon>{{ boldIcon }}</v-icon>
|
14
|
+
</v-btn>
|
15
|
+
|
16
|
+
<v-btn
|
17
|
+
small
|
18
|
+
:class="['menu-button', {'is-active': focus && editor.isActive('italic')}]"
|
19
|
+
@click="editor.chain().focus().toggleItalic().run()"
|
20
|
+
>
|
21
|
+
<v-icon>{{ italicIcon }}</v-icon>
|
22
|
+
</v-btn>
|
23
|
+
|
24
|
+
<v-btn
|
25
|
+
small
|
26
|
+
:class="['menu-button', 'strike', {'is-active': focus && editor.isActive('strike')}]"
|
27
|
+
@click="editor.chain().focus().toggleStrike().run()"
|
28
|
+
>
|
29
|
+
<v-icon>{{ strikeIcon }}</v-icon>
|
30
|
+
</v-btn>
|
31
|
+
|
32
|
+
<v-btn
|
33
|
+
small
|
34
|
+
:class="['menu-button', {'is-active': focus && editor.isActive('heading', {level: 1})}]"
|
35
|
+
@click="editor.chain().focus().toggleHeading({level: 1}).run()"
|
36
|
+
>
|
37
|
+
<v-icon>{{ h1Icon }}</v-icon>
|
38
|
+
</v-btn>
|
39
|
+
|
40
|
+
<v-btn
|
41
|
+
small
|
42
|
+
:class="['menu-button', {'is-active': focus && editor.isActive('heading', {level: 2})}]"
|
43
|
+
@click="editor.chain().focus().toggleHeading({level: 2}).run()"
|
44
|
+
>
|
45
|
+
<v-icon>{{ h2Icon }}</v-icon>
|
46
|
+
</v-btn>
|
47
|
+
|
48
|
+
<v-btn
|
49
|
+
small
|
50
|
+
:class="['menu-button', {'is-active': focus && editor.isActive('bulletList')}]"
|
51
|
+
@click="editor.chain().focus().toggleBulletList().run()"
|
52
|
+
>
|
53
|
+
<v-icon>{{ ulIcon }}</v-icon>
|
54
|
+
</v-btn>
|
55
|
+
|
56
|
+
<v-btn
|
57
|
+
small
|
58
|
+
:class="['menu-button', {'is-active': focus && editor.isActive('orderedList')}]"
|
59
|
+
@click="editor.chain().focus().toggleOrderedList().run()"
|
60
|
+
>
|
61
|
+
<v-icon>{{ olIcon }}</v-icon>
|
62
|
+
</v-btn>
|
63
|
+
|
64
|
+
<v-btn
|
65
|
+
small
|
66
|
+
:class="['menu-button', {'is-active': focus && editor.isActive('blockquote')}]"
|
67
|
+
@click="editor.chain().focus().toggleBlockquote().run()"
|
68
|
+
>
|
69
|
+
<v-icon>{{ commentIcon }}</v-icon>
|
70
|
+
</v-btn>
|
71
|
+
|
72
|
+
<v-btn
|
73
|
+
small
|
74
|
+
class="menu-button"
|
75
|
+
:disabled="initialValue === editor.getHTML()"
|
76
|
+
@click="editor.chain().focus().undo().run()"
|
77
|
+
>
|
78
|
+
<v-icon>{{ undoIcon }}</v-icon>
|
79
|
+
</v-btn>
|
80
|
+
</div>
|
81
|
+
|
82
|
+
<div>
|
83
|
+
<slot name="buttons" />
|
84
|
+
</div>
|
86
85
|
</div>
|
87
86
|
|
88
87
|
<editor-content
|
@@ -119,6 +118,7 @@ import {
|
|
119
118
|
export default class ARichTextArea extends Vue {
|
120
119
|
editor = null
|
121
120
|
internalValue = null
|
121
|
+
initialValue = null
|
122
122
|
focus = false
|
123
123
|
|
124
124
|
boldIcon = mdiFormatBold
|
@@ -133,6 +133,7 @@ export default class ARichTextArea extends Vue {
|
|
133
133
|
redoIcon = mdiRotateRight
|
134
134
|
|
135
135
|
created () {
|
136
|
+
this.initialValue = this.value
|
136
137
|
this.internalValue = this.value
|
137
138
|
}
|
138
139
|
|
@@ -158,14 +159,20 @@ export default class ARichTextArea extends Vue {
|
|
158
159
|
this.$emit('blur')
|
159
160
|
}
|
160
161
|
})
|
161
|
-
|
162
|
-
this.editor.commands.setContent(this.internalValue, false)
|
163
162
|
}
|
164
163
|
|
165
164
|
beforeDestroy () {
|
166
165
|
this.editor.destroy()
|
167
166
|
}
|
168
167
|
|
168
|
+
/**
|
169
|
+
* reset the text area to disable the undo button
|
170
|
+
* e.g. after saving the form while keeping it open
|
171
|
+
*/
|
172
|
+
reset () {
|
173
|
+
this.initialValue = this.value
|
174
|
+
}
|
175
|
+
|
169
176
|
@Watch('value')
|
170
177
|
valueChanged () {
|
171
178
|
this.internalValue = this.value
|
@@ -192,10 +199,6 @@ export default class ARichTextArea extends Vue {
|
|
192
199
|
|
193
200
|
|
194
201
|
<style lang="scss" scoped>
|
195
|
-
.v-input:not(.v-input--is-focused) ::v-deep .v-counter {
|
196
|
-
display: none;
|
197
|
-
}
|
198
|
-
|
199
202
|
.a-rich-text-editor {
|
200
203
|
::v-deep .ProseMirror {
|
201
204
|
&-focused {
|
@@ -205,9 +208,12 @@ export default class ARichTextArea extends Vue {
|
|
205
208
|
}
|
206
209
|
|
207
210
|
.menu-bar {
|
211
|
+
display: flex;
|
212
|
+
justify-content: space-between;
|
208
213
|
margin: -.2rem 0 .5rem -.2rem;
|
209
214
|
}
|
210
215
|
|
216
|
+
.menu-bar .v-btn,
|
211
217
|
.menu-button {
|
212
218
|
padding: 0 !important;
|
213
219
|
width: 30px !important;
|
@@ -239,6 +245,10 @@ export default class ARichTextArea extends Vue {
|
|
239
245
|
&.is-active {
|
240
246
|
background: #ECECEC !important;
|
241
247
|
}
|
248
|
+
|
249
|
+
&[disabled] {
|
250
|
+
background: none !important;
|
251
|
+
}
|
242
252
|
}
|
243
253
|
|
244
254
|
::v-deep .ProseMirror {
|
@@ -28,11 +28,17 @@ export default class EditForm extends Vue {
|
|
28
28
|
modelToEdit = null
|
29
29
|
valid = false
|
30
30
|
lastJson = null
|
31
|
+
forcedUnchange = false
|
31
32
|
|
32
33
|
created () {
|
33
34
|
this.reset()
|
34
35
|
}
|
35
36
|
|
37
|
+
forceUnchanged () {
|
38
|
+
this.forcedUnchange = true
|
39
|
+
this.$emit('update:changed', false)
|
40
|
+
}
|
41
|
+
|
36
42
|
reset () {
|
37
43
|
if (this.createModelToEdit) {
|
38
44
|
this.modelToEdit = this.createModelToEdit(this.model)
|
@@ -66,6 +72,9 @@ export default class EditForm extends Vue {
|
|
66
72
|
}
|
67
73
|
|
68
74
|
get changed () {
|
75
|
+
if (this.forcedUnchange) {
|
76
|
+
return false
|
77
|
+
}
|
69
78
|
// console.log(this.json)
|
70
79
|
// console.log(this.lastJson)
|
71
80
|
return this.json !== this.lastJson
|
@@ -125,6 +125,8 @@ export default class EditModal extends Vue {
|
|
125
125
|
* hook to allow to leave a just created (saved) model
|
126
126
|
*/
|
127
127
|
ignoreChangesOnClose () {
|
128
|
+
// this.$refs.form.forceUnchanged()
|
129
|
+
console.info('TODO switch form to forceUnchanged')
|
128
130
|
this.ignoreChangesOnClose_ = true
|
129
131
|
}
|
130
132
|
}
|
@@ -64,9 +64,16 @@ export class ListViewMixin extends Vue {
|
|
64
64
|
.on('change', this.filtersChanged) // listen to change
|
65
65
|
|
66
66
|
this._filtersInitialized()
|
67
|
+
this.$emit('update:filters', this.filters)
|
68
|
+
this.$emit('update:listViewModel', this.listViewModel)
|
67
69
|
|
68
70
|
if (this.models) {
|
69
71
|
this.$emit('update:count', this.meta_.count_search)
|
72
|
+
|
73
|
+
this.$emit('onLoad', {
|
74
|
+
models: this.models_,
|
75
|
+
meta: this.meta_
|
76
|
+
})
|
70
77
|
} else {
|
71
78
|
this.load()
|
72
79
|
}
|
@@ -132,7 +139,7 @@ export class ListViewMixin extends Vue {
|
|
132
139
|
|
133
140
|
if (!models) { // error happened
|
134
141
|
this.isLoading = false
|
135
|
-
this.$emit('update:isLoading',
|
142
|
+
this.$emit('update:isLoading', false)
|
136
143
|
return
|
137
144
|
}
|
138
145
|
|
@@ -144,8 +151,13 @@ export class ListViewMixin extends Vue {
|
|
144
151
|
}
|
145
152
|
|
146
153
|
this.isLoading = false
|
147
|
-
this.$emit('update:isLoading',
|
154
|
+
this.$emit('update:isLoading', false)
|
148
155
|
|
149
156
|
this.$emit('update:count', this.meta_.count_search)
|
157
|
+
|
158
|
+
this.$emit('onLoad', {
|
159
|
+
models,
|
160
|
+
meta
|
161
|
+
})
|
150
162
|
}
|
151
163
|
}
|
@@ -32,9 +32,16 @@ function propsWithDefaults (props) {
|
|
32
32
|
// property: { some object }, should be a normal vue props object
|
33
33
|
} else if (value && typeof value === 'object' && value.constructor === Object) {
|
34
34
|
normalizedProps[subProp] = value
|
35
|
-
// property: true, null, ...
|
35
|
+
// property: true, false, null, ...
|
36
36
|
} else {
|
37
|
-
|
37
|
+
if (typeof value === 'boolean') {
|
38
|
+
normalizedProps[subProp] = {
|
39
|
+
type: Boolean,
|
40
|
+
default: value
|
41
|
+
}
|
42
|
+
} else {
|
43
|
+
normalizedProps[subProp] = { default: value }
|
44
|
+
}
|
38
45
|
}
|
39
46
|
})
|
40
47
|
} else {
|
package/src/events.js
CHANGED
@@ -3,8 +3,9 @@
|
|
3
3
|
<v-navigation-drawer
|
4
4
|
v-model="drawer"
|
5
5
|
app
|
6
|
-
fixeds
|
7
6
|
left
|
7
|
+
width="280"
|
8
|
+
class="menubar"
|
8
9
|
>
|
9
10
|
<v-container
|
10
11
|
flex-column
|
@@ -91,9 +92,8 @@
|
|
91
92
|
</v-list>
|
92
93
|
</v-navigation-drawer>
|
93
94
|
|
94
|
-
<flying-context-container />
|
95
|
-
|
96
95
|
<v-app-bar
|
96
|
+
v-if="false"
|
97
97
|
app
|
98
98
|
flat
|
99
99
|
dense
|
@@ -117,23 +117,35 @@
|
|
117
117
|
/>
|
118
118
|
</v-app-bar>
|
119
119
|
|
120
|
-
<v-main>
|
120
|
+
<v-main id="v-main">
|
121
|
+
<a-row class="topbar">
|
122
|
+
<v-app-bar-nav-icon
|
123
|
+
class="sidebarToggleButton mr-2 ml-n1"
|
124
|
+
@click="toggleDrawer"
|
125
|
+
/>
|
126
|
+
<a-breadcrumbs />
|
127
|
+
</a-row>
|
128
|
+
|
121
129
|
<v-container
|
122
130
|
fluid
|
123
131
|
class="pa-4"
|
124
132
|
>
|
125
|
-
<div class="d-flex align-center">
|
126
|
-
<app-bar-title-container class="flex-grow-1
|
127
|
-
<app-bar-buttons class="mr-2
|
133
|
+
<div class="sticky-app-bar d-flex align-center">
|
134
|
+
<app-bar-title-container class="flex-grow-1" />
|
135
|
+
<app-bar-buttons class="mr-2" />
|
128
136
|
</div>
|
129
137
|
|
130
138
|
<router-view :class="{isLoading}" />
|
131
139
|
</v-container>
|
140
|
+
|
141
|
+
<sticky-footer-container v-if="true" />
|
132
142
|
</v-main>
|
133
143
|
|
134
144
|
<a-dialog id="app" />
|
135
145
|
|
136
146
|
<a-save-indicator />
|
147
|
+
|
148
|
+
<flying-context-container />
|
137
149
|
</div>
|
138
150
|
</template>
|
139
151
|
|
@@ -145,13 +157,15 @@ import { sleep } from '@a-vue/utils/timeout'
|
|
145
157
|
import AppBarButtons from './app/AppBarButtons'
|
146
158
|
import AppBarTitleContainer from './app/AppBarTitleContainer'
|
147
159
|
import FlyingContextContainer from './FlyingContextContainer'
|
160
|
+
import StickyFooterContainer from './StickyFooterContainer'
|
148
161
|
import '../styles.scss'
|
149
162
|
|
150
163
|
@Component({
|
151
164
|
components: {
|
152
165
|
AppBarButtons,
|
153
166
|
AppBarTitleContainer,
|
154
|
-
FlyingContextContainer
|
167
|
+
FlyingContextContainer,
|
168
|
+
StickyFooterContainer
|
155
169
|
}
|
156
170
|
})
|
157
171
|
export default class App extends Vue {
|
@@ -171,6 +185,17 @@ export default class App extends Vue {
|
|
171
185
|
this.$emit('appLoaded')
|
172
186
|
}
|
173
187
|
|
188
|
+
mounted () {
|
189
|
+
const el = document.querySelector('.sticky-app-bar')
|
190
|
+
const observer = new IntersectionObserver(
|
191
|
+
([e]) => {
|
192
|
+
e.target.classList.toggle('is-pinned', e.intersectionRatio < 1)
|
193
|
+
},
|
194
|
+
{ threshold: [1] }
|
195
|
+
)
|
196
|
+
observer.observe(el)
|
197
|
+
}
|
198
|
+
|
174
199
|
get SidebarMenu () {
|
175
200
|
return appConfig.components.SidebarMenu
|
176
201
|
}
|
@@ -248,4 +273,24 @@ export default class App extends Vue {
|
|
248
273
|
height: 36px !important;
|
249
274
|
margin-top: 1px;
|
250
275
|
}
|
276
|
+
|
277
|
+
.topbar {
|
278
|
+
position: relative;
|
279
|
+
width: 100%;
|
280
|
+
left: 0;
|
281
|
+
top: 0;
|
282
|
+
padding: .2rem 1rem;
|
283
|
+
}
|
284
|
+
.sticky-app-bar {
|
285
|
+
position: sticky;
|
286
|
+
top: -1px;
|
287
|
+
margin: -1rem -1rem 0;
|
288
|
+
padding: 1rem;
|
289
|
+
|
290
|
+
&.is-pinned {
|
291
|
+
background: white;
|
292
|
+
z-index: 2;
|
293
|
+
box-shadow: 0 4px 7px -4px #00000033;
|
294
|
+
}
|
295
|
+
}
|
251
296
|
</style>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="stickyFooter">
|
3
|
+
<div :class="contextId">
|
4
|
+
<slot />
|
5
|
+
</div>
|
6
|
+
</div>
|
7
|
+
</template>
|
8
|
+
|
9
|
+
<script>
|
10
|
+
import { Component, Vue } from '@a-vue'
|
11
|
+
import { randomCssClass } from '@a-vue/utils/random'
|
12
|
+
|
13
|
+
@Component
|
14
|
+
export default class StickyFooter extends Vue {
|
15
|
+
contextId = randomCssClass(10)
|
16
|
+
|
17
|
+
mounted () {
|
18
|
+
const container = this.getFooterContainer()
|
19
|
+
container.appendChild(this.getContent())
|
20
|
+
}
|
21
|
+
|
22
|
+
destroyed () {
|
23
|
+
const container = this.getFooterContainer()
|
24
|
+
const el = this.getContent()
|
25
|
+
if (container.contains(el)) {
|
26
|
+
container.removeChild(el)
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
getContent () {
|
31
|
+
return document.querySelector('.' + this.contextId)
|
32
|
+
}
|
33
|
+
|
34
|
+
getFooterContainer () {
|
35
|
+
return document.getElementById('stickyFooterContainer__children')
|
36
|
+
}
|
37
|
+
}
|
38
|
+
</script>
|
39
|
+
|
40
|
+
|
41
|
+
<style lang="scss" scoped>
|
42
|
+
</style>
|
@@ -0,0 +1,66 @@
|
|
1
|
+
<template>
|
2
|
+
<v-footer
|
3
|
+
id="stickyFooterContainer"
|
4
|
+
fixed
|
5
|
+
app
|
6
|
+
inset
|
7
|
+
:class="{visible}"
|
8
|
+
>
|
9
|
+
<div id="stickyFooterContainer__children" />
|
10
|
+
</v-footer>
|
11
|
+
</template>
|
12
|
+
|
13
|
+
<script>
|
14
|
+
import { Component, Vue } from '@a-vue'
|
15
|
+
|
16
|
+
@Component({
|
17
|
+
props: []
|
18
|
+
})
|
19
|
+
export default class StickyFooterContainer extends Vue {
|
20
|
+
visible = false
|
21
|
+
|
22
|
+
mounted () {
|
23
|
+
this.mutationWatcher = new MutationObserver(this.domChanged)
|
24
|
+
this.mutationWatcher.observe(this.getChildrenContainer(), { childList: true })
|
25
|
+
}
|
26
|
+
|
27
|
+
domChanged () {
|
28
|
+
const container = this.getChildrenContainer()
|
29
|
+
this.visible = !!container.children.length
|
30
|
+
|
31
|
+
this.$nextTick(() => {
|
32
|
+
const mainStyle = document.getElementById('v-main').style
|
33
|
+
if (this.visible) {
|
34
|
+
mainStyle.paddingBottom = this.$el.offsetHeight + 'px'
|
35
|
+
} else {
|
36
|
+
mainStyle.paddingBottom = '0px'
|
37
|
+
}
|
38
|
+
})
|
39
|
+
}
|
40
|
+
|
41
|
+
getChildrenContainer () {
|
42
|
+
return this.$el.querySelector('#stickyFooterContainer__children')
|
43
|
+
}
|
44
|
+
}
|
45
|
+
</script>
|
46
|
+
|
47
|
+
|
48
|
+
<style lang="scss" scoped>
|
49
|
+
#stickyFooterContainer {
|
50
|
+
background: white;
|
51
|
+
padding: 0;
|
52
|
+
|
53
|
+
&:not(.visible) {
|
54
|
+
display: none;
|
55
|
+
}
|
56
|
+
|
57
|
+
&__children {
|
58
|
+
width: 100%;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
#stickyFooterContainer__children {
|
63
|
+
background: #F5F5F5;
|
64
|
+
padding: 1rem;
|
65
|
+
}
|
66
|
+
</style>
|
@@ -20,6 +20,7 @@ import ModelCount from './model/ModelCount'
|
|
20
20
|
import ModelIcon from './model/ModelIcon'
|
21
21
|
import EditPage from './pages/EditPage'
|
22
22
|
import Start from './Start.vue'
|
23
|
+
import StickyFooter from './StickyFooter.vue'
|
23
24
|
|
24
25
|
Vue.component('ListCard', ListCard)
|
25
26
|
Vue.component('ListColumnHeader', ListColumnHeader)
|
@@ -46,3 +47,4 @@ Vue.component('AppBarTitle', AppBarTitle)
|
|
46
47
|
|
47
48
|
Vue.component('Start', Start)
|
48
49
|
Vue.component('FlyingContext', FlyingContext)
|
50
|
+
Vue.component('StickyFooter', StickyFooter)
|
@@ -8,12 +8,16 @@
|
|
8
8
|
/>
|
9
9
|
</div>
|
10
10
|
|
11
|
+
<slot
|
12
|
+
v-if="$scopedSlots.models"
|
13
|
+
name="before-models"
|
14
|
+
/>
|
15
|
+
|
11
16
|
<template v-if="models_.length">
|
12
17
|
<template v-if="$scopedSlots.models">
|
13
18
|
<slot
|
14
19
|
name="models"
|
15
20
|
:models="models_"
|
16
|
-
:setFilter="setFilter"
|
17
21
|
/>
|
18
22
|
</template>
|
19
23
|
|
@@ -44,7 +48,6 @@
|
|
44
48
|
<slot
|
45
49
|
name="model-table"
|
46
50
|
:model="model"
|
47
|
-
:setFilter="setFilter"
|
48
51
|
/>
|
49
52
|
</a-table-row>
|
50
53
|
</a-table>
|
@@ -110,10 +113,6 @@ export default class ListView extends Mixins(ListViewMixin) {
|
|
110
113
|
get hasFlyingContext () {
|
111
114
|
return !!this.$listeners.flyingContext
|
112
115
|
}
|
113
|
-
|
114
|
-
setFilter (name, value) {
|
115
|
-
this.filters[name].value = value
|
116
|
-
}
|
117
116
|
}
|
118
117
|
</script>
|
119
118
|
|
@@ -12,13 +12,15 @@
|
|
12
12
|
:valid="valid"
|
13
13
|
/>
|
14
14
|
|
15
|
-
<
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
15
|
+
<sticky-footer>
|
16
|
+
<edit-form-buttons
|
17
|
+
:changed="changed"
|
18
|
+
:valid="valid"
|
19
|
+
:has="{reset: !!modelToEdit.id}"
|
20
|
+
@save="$emit('save', modelToEdit, ignoreChangesOnRouteChange)"
|
21
|
+
@reset="$refs.form.reset()"
|
22
|
+
/>
|
23
|
+
</sticky-footer>
|
22
24
|
</template>
|
23
25
|
</edit-form>
|
24
26
|
</template>
|
@@ -59,6 +61,8 @@ export default class EditPage extends Vue {
|
|
59
61
|
* hook to allow to leave a just created (saved) model
|
60
62
|
*/
|
61
63
|
ignoreChangesOnRouteChange () {
|
64
|
+
// this.$refs.form.forceUnchanged()
|
65
|
+
console.info('TODO switch form to forceUnchanged')
|
62
66
|
this.ignoreChangesOnRouteChange_ = true
|
63
67
|
}
|
64
68
|
}
|
@@ -1,8 +1,11 @@
|
|
1
1
|
import {
|
2
2
|
mdiAlarmLightOutline,
|
3
3
|
mdiCalendar,
|
4
|
+
mdiCheck,
|
5
|
+
mdiCheckBold,
|
4
6
|
mdiChevronRight,
|
5
7
|
mdiClose,
|
8
|
+
mdiCloseThick,
|
6
9
|
mdiDelete,
|
7
10
|
mdiDotsHorizontal,
|
8
11
|
mdiDotsVertical,
|
@@ -26,6 +29,7 @@ export default new Vuetify({
|
|
26
29
|
thumbsUpIcon: mdiThumbUpOutline,
|
27
30
|
alarmIcon: mdiAlarmLightOutline,
|
28
31
|
closeIcon: mdiClose,
|
32
|
+
closeBoldIcon: mdiCloseThick,
|
29
33
|
dotsVerticalIcon: mdiDotsVertical,
|
30
34
|
dotsHorizontalIcon: mdiDotsHorizontal,
|
31
35
|
logoutIcon: mdiLogoutVariant,
|
@@ -34,7 +38,9 @@ export default new Vuetify({
|
|
34
38
|
trashCanIcon: mdiDelete,
|
35
39
|
calendarIcon: mdiCalendar,
|
36
40
|
searchIcon: mdiMagnify,
|
37
|
-
lockIcon: mdiLock
|
41
|
+
lockIcon: mdiLock,
|
42
|
+
checkIcon: mdiCheck,
|
43
|
+
checkBoldIcon: mdiCheckBold
|
38
44
|
}
|
39
45
|
},
|
40
46
|
breakpoint: {
|
package/src-admin/styles.scss
CHANGED
@@ -15,6 +15,7 @@
|
|
15
15
|
.contextButton {
|
16
16
|
color: #AAAAAA !important;
|
17
17
|
cursor: pointer;
|
18
|
+
|
18
19
|
&:hover {
|
19
20
|
color: #333333 !important;
|
20
21
|
}
|
@@ -27,10 +28,6 @@
|
|
27
28
|
}
|
28
29
|
}
|
29
30
|
|
30
|
-
.v-main {
|
31
|
-
margin-bottom: 2rem;
|
32
|
-
}
|
33
|
-
|
34
31
|
.theme--light.v-btn.v-btn--has-bg {
|
35
32
|
background-color: #E9E9E9;
|
36
33
|
}
|