updates
This commit is contained in:
@@ -1,25 +1,15 @@
|
|||||||
//import { Ut } from ".";
|
import { Ut } from ".";
|
||||||
|
|
||||||
export class AppendOptions {
|
export class AppendOptions {
|
||||||
|
|
||||||
constructor(target, data, opts) {
|
constructor(target, data, opts) {
|
||||||
|
|
||||||
opts = opts || {};
|
opts = opts || {};
|
||||||
|
|
||||||
if (opts.clear) {
|
if (opts.clear) {
|
||||||
this.dxHtml('');
|
this.replaceChildren();
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof data === 'string') {
|
|
||||||
Object.entries(JSON.parse(data)).forEach(([k, v]) => target.append(new Option(v, k)));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
for (let id in data) {
|
|
||||||
target.append(new Option(data[id], id));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Ut.each(Ut.isStr(data) ? JSON.parse(data) : data, (val, id) => target.append(new Option(val, id)) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ut.extendNodeUx(AppendOptions);
|
|
||||||
+1
-3
@@ -55,6 +55,4 @@ export class Form extends FormValidator {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Ut.extendNodeUx(Form);
|
|
||||||
@@ -122,6 +122,4 @@ export class Options {
|
|||||||
this.target.dxHtml('');
|
this.target.dxHtml('');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Ut.extendNodeUx(Options);
|
|
||||||
@@ -220,6 +220,4 @@ export class FormValidator extends Validator {
|
|||||||
this.target.dxOff('submit.form click.form keydown.form click.ui');
|
this.target.dxOff('submit.form click.form keydown.form click.ui');
|
||||||
this.target.dxRemoveData('form');
|
this.target.dxRemoveData('form');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ut.extendNodeUx(FormValidator);
|
|
||||||
@@ -40,6 +40,4 @@ export class InputError {
|
|||||||
this.fieldWrapper.classList.remove('form-field-error');
|
this.fieldWrapper.classList.remove('form-field-error');
|
||||||
this.fieldWrapper.dxFind('.sp-label-error')?.remove();
|
this.fieldWrapper.dxFind('.sp-label-error')?.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Ut.extendNodeUx(InputError);
|
|
||||||
@@ -320,6 +320,4 @@ export class Autocomplete {
|
|||||||
|
|
||||||
Ut.trigger(this.opts.onDestroy, this);
|
Ut.trigger(this.opts.onDestroy, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Ut.extendNodeUx(Autocomplete);
|
|
||||||
@@ -66,6 +66,4 @@ export class Cancelable {
|
|||||||
|
|
||||||
return this.target;
|
return this.target;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Ut.extendNodeUx(Cancelable);
|
|
||||||
@@ -1123,6 +1123,4 @@ export class DatePicker {
|
|||||||
|
|
||||||
return this.target;
|
return this.target;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Ut.extendNodeUx(DatePicker);
|
|
||||||
@@ -176,6 +176,4 @@ export class Dropdown {
|
|||||||
|
|
||||||
return this.target;
|
return this.target;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Ut.extendNodeUx(Dropdown);
|
|
||||||
@@ -322,6 +322,4 @@ export class Lightbox {
|
|||||||
|
|
||||||
this.target.dxRemoveData('lightbox');
|
this.target.dxRemoveData('lightbox');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Ut.extendNodeUx(Lightbox);
|
|
||||||
@@ -124,6 +124,4 @@ export class PinBox {
|
|||||||
this.target.dxRemoveData('pinbox');
|
this.target.dxRemoveData('pinbox');
|
||||||
Ut.trigger(this.opts.destroy, this);
|
Ut.trigger(this.opts.destroy, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Ut.extendNodeUx(PinBox);
|
|
||||||
@@ -177,6 +177,4 @@ export class Alert {
|
|||||||
constructor(target, msg) {
|
constructor(target, msg) {
|
||||||
new Popover(target, msg, { color: 'red', timeout: 3000 });
|
new Popover(target, msg, { color: 'red', timeout: 3000 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Ut.extendNodeUx(Popover, Alert);
|
|
||||||
@@ -243,6 +243,4 @@ export class Popup {
|
|||||||
|
|
||||||
this.card.ui.dxCss({ top: '-25%', opacity: 0 });
|
this.card.ui.dxCss({ top: '-25%', opacity: 0 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Ut.extendNodeUx(Popup);
|
|
||||||
@@ -647,6 +647,4 @@ export class Table {
|
|||||||
setFooterToolbar(content) {
|
setFooterToolbar(content) {
|
||||||
this.toolbarFooter.dxHtml(content);
|
this.toolbarFooter.dxHtml(content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Ut.extendNodeUx(Table);
|
|
||||||
@@ -293,6 +293,4 @@ export class TwoDatePicker {
|
|||||||
|
|
||||||
Stack.delete(this);
|
Stack.delete(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Ut.extendNodeUx(TwoDatePicker);
|
|
||||||
@@ -695,6 +695,4 @@ export class Uploader {
|
|||||||
|
|
||||||
Ut.trigger(this.events.destroy, this)
|
Ut.trigger(this.events.destroy, this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Ut.extendNodeUx(Uploader);
|
|
||||||
Reference in New Issue
Block a user