mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 17:33:49 +01:00
selectbox widget and some fixes
This commit is contained in:
parent
05b92c97f2
commit
ec7f8931b2
@ -96,7 +96,7 @@ var et2_inputWidget = /** @class */ (function (_super) {
|
||||
// }
|
||||
_super.prototype.detachFromDOM.call(this);
|
||||
};
|
||||
et2_inputWidget.prototype.change = function (_node) {
|
||||
et2_inputWidget.prototype.change = function (_node, _widget, _value) {
|
||||
var messages = [];
|
||||
var valid = this.isValid(messages);
|
||||
// Passing false will clear any set messages
|
||||
|
@ -146,7 +146,7 @@ export class et2_inputWidget extends et2_valueWidget implements et2_IInput, et2_
|
||||
super.detachFromDOM();
|
||||
}
|
||||
|
||||
change(_node)
|
||||
change(_node, _widget?, _value?)
|
||||
{
|
||||
var messages = [];
|
||||
var valid = this.isValid(messages);
|
||||
|
@ -775,7 +775,7 @@ export class et2_widget extends ClassWithAttributes
|
||||
*
|
||||
* @param {Promise[]} promises List of promises from widgets that are not done. Pass an empty array, it will be filled if needed.
|
||||
*/
|
||||
loadingFinished(promises)
|
||||
loadingFinished(promises?)
|
||||
{
|
||||
// Call all availble setters
|
||||
this.initAttributes(this.options);
|
||||
|
8
api/js/etemplate/et2_types.d.ts
vendored
8
api/js/etemplate/et2_types.d.ts
vendored
@ -119,12 +119,7 @@ declare var et2_radioGroup : any;
|
||||
declare var et2_script : any;
|
||||
declare var et2_selectAccount : any;
|
||||
declare var et2_selectAccount_ro : any;
|
||||
declare class et2_selectbox extends et2_inputWidget {
|
||||
loadingFinished()
|
||||
getDOMNode()
|
||||
set_value(s: string)
|
||||
getValue()
|
||||
}
|
||||
declare class et2_selectbox extends et2_inputWidget {}
|
||||
declare var et2_selectbox_ro : any;
|
||||
declare var et2_menulist : any;
|
||||
declare var et2_split : any;
|
||||
@ -165,3 +160,4 @@ declare function et2_loadXMLFromURL(_url : string, _callback : Function, _contex
|
||||
declare function et2_directChildrenByTagName(_node, _tagName);
|
||||
declare function et2_filteredNodeIterator(_node, _callback, _context);
|
||||
declare function et2_readAttrWithDefault(_node, _name, _default?);
|
||||
declare function sprintf(format : string, ...args : any) : string;
|
@ -156,7 +156,7 @@ var et2_date = /** @class */ (function (_super) {
|
||||
*/
|
||||
et2_date.prototype.set_readonly = function (_ro) {
|
||||
if (this.input_date && !this.input_date.attr('disabled') != !_ro) {
|
||||
this.input_date.attr('disabled', !_ro ? 0 : 1)
|
||||
this.input_date.prop('disabled', !!_ro)
|
||||
.datepicker('option', 'disabled', !!_ro);
|
||||
}
|
||||
};
|
||||
@ -573,6 +573,7 @@ String: A string in the user\'s date format, or a relative date. Relative dates
|
||||
};
|
||||
return et2_date;
|
||||
}(et2_core_inputWidget_1.et2_inputWidget));
|
||||
exports.et2_date = et2_date;
|
||||
et2_core_widget_1.et2_register_widget(et2_date, ["date", "date-time", "date-timeonly"]);
|
||||
/**
|
||||
* Class which implements the "date-duration" XET-Tag
|
||||
@ -820,6 +821,7 @@ var et2_date_duration = /** @class */ (function (_super) {
|
||||
};
|
||||
return et2_date_duration;
|
||||
}(et2_date));
|
||||
exports.et2_date_duration = et2_date_duration;
|
||||
et2_core_widget_1.et2_register_widget(et2_date_duration, ["date-duration"]);
|
||||
/**
|
||||
* r/o date-duration
|
||||
@ -885,6 +887,7 @@ var et2_date_duration_ro = /** @class */ (function (_super) {
|
||||
};
|
||||
return et2_date_duration_ro;
|
||||
}(et2_date_duration));
|
||||
exports.et2_date_duration_ro = et2_date_duration_ro;
|
||||
et2_core_widget_1.et2_register_widget(et2_date_duration_ro, ["date-duration_ro"]);
|
||||
/**
|
||||
* et2_date_ro is the readonly implementation of some date widget.
|
||||
@ -1090,6 +1093,7 @@ var et2_date_ro = /** @class */ (function (_super) {
|
||||
};
|
||||
return et2_date_ro;
|
||||
}(et2_core_valueWidget_1.et2_valueWidget));
|
||||
exports.et2_date_ro = et2_date_ro;
|
||||
et2_core_widget_1.et2_register_widget(et2_date_ro, ["date_ro", "date-time_ro", "date-since", "date-time_today", "time_or_date", "date-timeonly_ro"]);
|
||||
/**
|
||||
* Widget for selecting a date range
|
||||
@ -1360,5 +1364,6 @@ var et2_date_range = /** @class */ (function (_super) {
|
||||
];
|
||||
return et2_date_range;
|
||||
}(et2_core_inputWidget_1.et2_inputWidget));
|
||||
exports.et2_date_range = et2_date_range;
|
||||
et2_core_widget_1.et2_register_widget(et2_date_range, ["date-range"]);
|
||||
//# sourceMappingURL=et2_widget_date.js.map
|
@ -22,6 +22,7 @@ import { ClassWithAttributes } from "./et2_core_inheritance";
|
||||
import { et2_widget, et2_createWidget, et2_register_widget, WidgetConfig } from "./et2_core_widget";
|
||||
import { et2_valueWidget } from './et2_core_valueWidget'
|
||||
import { et2_inputWidget } from './et2_core_inputWidget'
|
||||
import { et2_selectbox } from './et2_widget_selectbox'
|
||||
import './et2_types';
|
||||
import {et2_DOMWidget} from "./et2_core_DOMWidget";
|
||||
|
||||
@ -40,7 +41,7 @@ declare function date (format : string, timestamp? : string | number | Date);
|
||||
* Widgets uses jQuery date- and time-picker for desktop browsers and
|
||||
* HTML5 input fields for mobile devices to get their native UI for date/time entry.
|
||||
*/
|
||||
class et2_date extends et2_inputWidget
|
||||
export class et2_date extends et2_inputWidget
|
||||
{
|
||||
static readonly _attributes: any = {
|
||||
"value": {
|
||||
@ -228,7 +229,7 @@ String: A string in the user\'s date format, or a relative date. Relative dates
|
||||
{
|
||||
if (this.input_date && !this.input_date.attr('disabled') != !_ro)
|
||||
{
|
||||
this.input_date.attr('disabled', !_ro ? 0 : 1)
|
||||
this.input_date.prop('disabled', !!_ro)
|
||||
.datepicker('option', 'disabled', !!_ro);
|
||||
}
|
||||
}
|
||||
@ -655,7 +656,7 @@ et2_register_widget(et2_date, ["date", "date-time", "date-timeonly"]);
|
||||
/**
|
||||
* Class which implements the "date-duration" XET-Tag
|
||||
*/
|
||||
class et2_date_duration extends et2_date
|
||||
export class et2_date_duration extends et2_date
|
||||
{
|
||||
static readonly _attributes: any = {
|
||||
"data_format": {
|
||||
@ -963,7 +964,7 @@ et2_register_widget(et2_date_duration, ["date-duration"]);
|
||||
/**
|
||||
* r/o date-duration
|
||||
*/
|
||||
class et2_date_duration_ro extends et2_date_duration implements et2_IDetachedDOM
|
||||
export class et2_date_duration_ro extends et2_date_duration implements et2_IDetachedDOM
|
||||
{
|
||||
createInputWidget()
|
||||
{
|
||||
@ -1037,7 +1038,7 @@ et2_register_widget(et2_date_duration_ro, ["date-duration_ro"]);
|
||||
/**
|
||||
* et2_date_ro is the readonly implementation of some date widget.
|
||||
*/
|
||||
class et2_date_ro extends et2_valueWidget implements et2_IDetachedDOM
|
||||
export class et2_date_ro extends et2_valueWidget implements et2_IDetachedDOM
|
||||
{
|
||||
/**
|
||||
* Ignore all more advanced attributes.
|
||||
@ -1282,7 +1283,7 @@ et2_register_widget(et2_date_ro, ["date_ro", "date-time_ro", "date-since", "date
|
||||
/**
|
||||
* Widget for selecting a date range
|
||||
*/
|
||||
class et2_date_range extends et2_inputWidget
|
||||
export class et2_date_range extends et2_inputWidget
|
||||
{
|
||||
static readonly _attributes: any = {
|
||||
value: {
|
||||
|
File diff suppressed because it is too large
Load Diff
1838
api/js/etemplate/et2_widget_selectbox.ts
Normal file
1838
api/js/etemplate/et2_widget_selectbox.ts
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user