glib-web 0.11.13 → 0.11.17

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,26 +1,31 @@
1
1
  <template>
2
- <v-tooltip
3
- :disabled="tooltip.disabled"
4
- :top="tooltipPositionMatches('top')"
5
- :right="tooltipPositionMatches('right')"
6
- :bottom="tooltipPositionMatches('bottom')"
7
- :left="tooltipPositionMatches('left')"
8
- >
9
- <template v-slot:activator="{ on }">
10
- <v-radio
11
- :label="spec.label"
12
- :value="spec.value.presence() || vuetifyEmptyString"
13
- :class="$classes()"
14
- :disabled="spec.readOnly"
15
- :on-icon="spec.onIcon"
16
- :off-icon="spec.offIcon"
17
- v-on="on"
18
- @click="$onClick()"
19
- >
20
- </v-radio>
21
- </template>
22
- <span>{{ tooltip.text }}</span>
23
- </v-tooltip>
2
+ <div :class="$classes()">
3
+ <v-tooltip
4
+ :disabled="tooltip.disabled"
5
+ :top="tooltipPositionMatches('top')"
6
+ :right="tooltipPositionMatches('right')"
7
+ :bottom="tooltipPositionMatches('bottom')"
8
+ :left="tooltipPositionMatches('left')"
9
+ >
10
+ <template v-slot:activator="{ on }">
11
+ <v-radio
12
+ :label="spec.label"
13
+ :value="spec.value.presence() || vuetifyEmptyString"
14
+ :disabled="spec.readOnly"
15
+ :on-icon="spec.onIcon"
16
+ :off-icon="spec.offIcon"
17
+ v-on="on"
18
+ @click="$onClick()"
19
+ />
20
+ <div v-if="spec.childViews" class="radio-childviews">
21
+ <div v-for="(item, i) in spec.childViews" :key="i">
22
+ <glib-component :spec="item" />
23
+ </div>
24
+ </div>
25
+ </template>
26
+ <span>{{ tooltip.text }}</span>
27
+ </v-tooltip>
28
+ </div>
24
29
  </template>
25
30
 
26
31
  <script>
@@ -7,8 +7,10 @@
7
7
  :row="spec.row"
8
8
  @change="onChange"
9
9
  >
10
- <div v-for="(item, index) in spec.childViews" :key="index">
11
- <ui-component :spec="item" />
10
+ <div v-for="(childView, index) in spec.childViews" :key="index">
11
+ <div :class="activeClass(childView)" @click="updateValue(childView)">
12
+ <glib-component :spec="childView" />
13
+ </div>
12
14
  </div>
13
15
 
14
16
  <input
@@ -32,6 +34,21 @@ export default {
32
34
  GLib.action.execute(onChange, this);
33
35
  });
34
36
  });
37
+ },
38
+ updateValue(variable) {
39
+ if (variable.value) {
40
+ this.fieldModel = variable.value;
41
+ }
42
+ },
43
+ activeClass(childView) {
44
+ if (
45
+ childView.view.includes("fields/radio") &&
46
+ this.fieldModel == childView.value
47
+ ) {
48
+ return "radio--active";
49
+ } else {
50
+ return "";
51
+ }
35
52
  }
36
53
  }
37
54
  };
@@ -13,6 +13,7 @@
13
13
  :rules="$validation()"
14
14
  counter
15
15
  :outlined="$classes().includes('outlined')"
16
+ :no-resize="$classes().includes('no-resize')"
16
17
  validate-on-blur
17
18
  @keyup="$onTyping"
18
19
  ></v-textarea>
package/nav/dialog.vue CHANGED
@@ -60,6 +60,7 @@ export default {
60
60
  footer: null,
61
61
  model: null,
62
62
  url: null,
63
+ urlLoaded: false,
63
64
  showClose: false
64
65
  };
65
66
  },
@@ -74,8 +75,9 @@ export default {
74
75
  $ready() {
75
76
  this.$root.vueApp = this.vueApp;
76
77
 
77
- this.show();
78
+ this.show(false);
78
79
  this.stack.push(this);
80
+ console.log("DIALOG READY1", this.stack.length);
79
81
  },
80
82
  $tearDown() {
81
83
  console.log("Dialog destroyed");
@@ -91,23 +93,31 @@ export default {
91
93
  },
92
94
  reload(newSpec) {
93
95
  this.spec = newSpec;
94
- this.show();
96
+ this.urlLoaded = false;
97
+ this.show(true);
95
98
  },
96
- show() {
99
+ show(reload) {
97
100
  const spec = this.spec;
98
101
  this.url = spec.url;
99
102
  this.showClose = Utils.type.isString(this.url);
100
103
 
101
104
  if (Utils.type.isString(this.url)) {
102
- this.message = "Loading...";
103
- const url = Utils.url.appendParams(this.url, { _dialog: "v1" });
104
- Http.execute({ url: url }, "GET", this, response => {
105
- this.title = response.title;
106
- this.message = "";
107
- this.body = response.body;
108
- this.footer = response.footer;
109
- this.showClose = this.spec.showClose || false;
110
- });
105
+ if (!this.urlLoaded) {
106
+ if (!reload) {
107
+ this.message = "Loading...";
108
+ }
109
+ const url = Utils.url.appendParams(this.url, { _dialog: "v1" });
110
+ Http.execute({ url: url }, "GET", this, response => {
111
+ Utils.http.forceComponentUpdate(() => {
112
+ this.urlLoaded = true;
113
+ this.title = response.title;
114
+ this.message = "";
115
+ this.body = response.body;
116
+ this.footer = response.footer;
117
+ this.showClose = this.spec.showClose || false;
118
+ });
119
+ });
120
+ }
111
121
  } else {
112
122
  this.title = this.spec.title;
113
123
  this.message = this.spec.message;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glib-web",
3
- "version": "0.11.13",
3
+ "version": "0.11.17",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -44,4 +44,4 @@
44
44
  "eslint-plugin-vuetify": "^1.0.0-beta.3",
45
45
  "prettier": "^1.18.2"
46
46
  }
47
- }
47
+ }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes