@pageboard/html 0.12.22 → 0.12.24
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.
- package/elements/card.js +0 -2
- package/elements/fieldsets.js +0 -1
- package/elements/list.js +0 -1
- package/elements/tab.js +0 -1
- package/elements/time.js +1 -1
- package/package.json +1 -1
- package/ui/form.js +7 -5
package/elements/card.js
CHANGED
|
@@ -155,7 +155,6 @@ exports.card_header = {
|
|
|
155
155
|
menu: 'widget',
|
|
156
156
|
context: 'card//',
|
|
157
157
|
icon: '<b class="icon">H</b>',
|
|
158
|
-
inplace: true,
|
|
159
158
|
contents: "inline*",
|
|
160
159
|
html: '<div class="header">Header</div>'
|
|
161
160
|
};
|
|
@@ -173,7 +172,6 @@ exports.card_meta = {
|
|
|
173
172
|
menu: 'widget',
|
|
174
173
|
context: 'card//',
|
|
175
174
|
icon: '<em class="icon">M</em>',
|
|
176
|
-
inplace: true,
|
|
177
175
|
contents: "inline*",
|
|
178
176
|
html: '<div class="meta">Meta</div>'
|
|
179
177
|
};
|
package/elements/fieldsets.js
CHANGED
package/elements/list.js
CHANGED
package/elements/tab.js
CHANGED
|
@@ -38,7 +38,6 @@ exports.tab_item = {
|
|
|
38
38
|
title: "Item",
|
|
39
39
|
icon: '<i class="icons"><b class="icon">Tab</b><i class="corner add icon"></i></i>',
|
|
40
40
|
menu: 'widget',
|
|
41
|
-
inplace: true,
|
|
42
41
|
context: 'tabs_container_items/',
|
|
43
42
|
contents: "inline*",
|
|
44
43
|
html: '<a class="item">Tab Item</a>'
|
package/elements/time.js
CHANGED
|
@@ -172,6 +172,6 @@ exports.time = {
|
|
|
172
172
|
};
|
|
173
173
|
},
|
|
174
174
|
tag: 'time',
|
|
175
|
-
html: `<time datetime="[datetime|
|
|
175
|
+
html: `<time datetime="[datetime|then:date:iso]" data-format="[format|as:values|join:%3A]" data-timezone="[timezone]" is="element-time"></time>`,
|
|
176
176
|
scripts: ['../ui/time.js']
|
|
177
177
|
};
|
package/package.json
CHANGED
package/ui/form.js
CHANGED
|
@@ -352,16 +352,18 @@ class HTMLElementForm extends Page.create(HTMLFormElement) {
|
|
|
352
352
|
.map(input => input.presubmit(state))
|
|
353
353
|
);
|
|
354
354
|
|
|
355
|
-
const
|
|
356
|
-
scope.$request = form.read(true);
|
|
355
|
+
const request = form.read(true);
|
|
357
356
|
form.disable();
|
|
358
357
|
|
|
359
358
|
const res = await state.fetch(form.method, Page.format({
|
|
360
359
|
pathname: form.getAttribute('action'),
|
|
361
360
|
query: state.query
|
|
362
|
-
}),
|
|
361
|
+
}), request).catch(err => err);
|
|
362
|
+
|
|
363
|
+
const scope = state.scope.copy();
|
|
364
|
+
if (res?.grants) state.scope.$grants = res.grants;
|
|
365
|
+
scope.$request = request;
|
|
363
366
|
|
|
364
|
-
if (res?.grants) scope.$grants = res.grants;
|
|
365
367
|
scope.$response = res;
|
|
366
368
|
scope.$status = res.status;
|
|
367
369
|
form.enable();
|
|
@@ -433,7 +435,7 @@ HTMLSelectElement.prototype.reset = function () {
|
|
|
433
435
|
for (let i = 0; i < this.options.length; i++) this.options[i].selected = false;
|
|
434
436
|
};
|
|
435
437
|
|
|
436
|
-
HTMLInputElement.prototype.fill = function (val) {
|
|
438
|
+
HTMLButtonElement.prototype.fill = HTMLInputElement.prototype.fill = function (val) {
|
|
437
439
|
if (val == null) val = "";
|
|
438
440
|
if (this.type == "radio" || this.type == "checkbox") {
|
|
439
441
|
if (Array.isArray(val) && val.length == 0 && this.value == "") {
|