@afeefa/vue-app 0.0.201 → 0.0.203

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- 0.0.201
1
+ 0.0.203
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afeefa/vue-app",
3
- "version": "0.0.201",
3
+ "version": "0.0.203",
4
4
  "description": "",
5
5
  "author": "Afeefa Kollektiv <kollektiv@afeefa.de>",
6
6
  "license": "MIT",
@@ -5,8 +5,15 @@ import { eventBus } from '@a-vue/plugins/event-bus/EventBus'
5
5
  import { ApiAction } from './ApiAction'
6
6
 
7
7
  export class SaveAction extends ApiAction {
8
+ _showSuccess = true
9
+
8
10
  _minDuration = adminConfig.app.saveLoaderMinDuration || 400
9
11
 
12
+ hideSuccess () {
13
+ this._showSuccess = false
14
+ return this
15
+ }
16
+
10
17
  save () {
11
18
  return this.execute()
12
19
  }
@@ -14,7 +21,9 @@ export class SaveAction extends ApiAction {
14
21
  async afterRequest () {
15
22
  await super.afterRequest()
16
23
 
17
- this.alert('Die Daten wurden gespeichert.')
24
+ if (this._showSuccess) {
25
+ this.alert('Die Daten wurden gespeichert.')
26
+ }
18
27
  }
19
28
 
20
29
  processError (result) {
@@ -85,6 +85,14 @@ export default class ADialog extends Mixins(UsesPositionServiceMixin, ComponentW
85
85
  }
86
86
  onFocusin(e)
87
87
  }
88
+
89
+ // catch click events if activator's first element is set to be disabled
90
+ const activator = document.getElementsByClassName(this.activatorClass)[0]
91
+ activator.addEventListener('click', e => {
92
+ if (activator.children[0]?.getAttribute('disabled')) {
93
+ e.stopPropagation()
94
+ }
95
+ }, true) // capture phase, stop event before v-dialog receives it
88
96
  }
89
97
 
90
98
  coe_cancelOnEsc () {