This commit is contained in:
2025-12-02 01:54:59 +02:00
parent c5ca4162a3
commit 2c998d7ba8
33 changed files with 419 additions and 446 deletions
+2 -6
View File
@@ -15,14 +15,10 @@ export class Ut {
static trigger = (handler, ...args) => typeof handler === 'function' ? handler.call(this, ...args) : null;
static each(obj, callback, context) {
for (let key in obj) {
callback.call(context || this, obj[key], key);
}
}
static each = (obj, callback, context) => obj && Object.keys(obj).forEach(key => callback.call(context ?? this, obj[key], key) );
static tplString = (str, context) => new Function('return `' + str + '`;').call(context || {});
static extendNode(name, value) {
if (!Object.getOwnPropertyDescriptor(Node.prototype, name)) {
+5
View File
@@ -40,6 +40,11 @@
if (attr[name] === null) {
continue;
}
if (name == 'className') {
elem.className = attr[name];
continue;
}
elem.setAttribute(name, attr[name]);
}
+1 -1
View File
@@ -210,7 +210,7 @@ export class FormValidator extends Validator {
fieldWrapper.classList.add('form-field-error');
fieldWrapper.append( El('div', { class: 'sp-label-error' }, emsg ) );
fieldWrapper.append( El('div', { className: 'sp-label-error' }, emsg ) );
}
return false;
+1 -1
View File
@@ -29,7 +29,7 @@ export class InputError {
*/
create() {
this.fieldWrapper.classList.add('form-field-error');
this.fieldWrapper.append( El('div', { class: 'sp-label-error' }, this.emsg) );
this.fieldWrapper.append( El('div', { className: 'sp-label-error' }, this.emsg) );
}
/**
+1 -1
View File
@@ -287,7 +287,7 @@ export class Validator {
let uploader = el.dxData('uploader');
if (uploader) {
uploader.getFiles().forEach(filename => fdata.append('files_' + el.name + '[]', filename));
uploader.getFiles().forEach(filename => fdata.append('file__' + el.name + '[]', filename));
}
break;