Fix legacy options not being read for some widgets

This commit is contained in:
nathangray 2020-03-30 10:28:48 -06:00
parent c937f50193
commit 1da1cb7b99
42 changed files with 320 additions and 323 deletions

View File

@ -123,9 +123,6 @@ var et2_widget = /** @class */ (function (_super) {
*/ */
function et2_widget(_parent, _attrs, _child) { function et2_widget(_parent, _attrs, _child) {
var _this = _super.call(this) || this; var _this = _super.call(this) || this;
// Set the legacyOptions array to the names of the properties the "options"
// attribute defines.
_this.legacyOptions = [];
_this._children = []; _this._children = [];
_this._mgrs = {}; _this._mgrs = {};
/** /**
@ -900,6 +897,9 @@ var et2_widget = /** @class */ (function (_super) {
"description": "Object of widget attributes" "description": "Object of widget attributes"
} }
}; };
// Set the legacyOptions array to the names of the properties the "options"
// attribute defines.
et2_widget.legacyOptions = [];
return et2_widget; return et2_widget;
}(et2_core_inheritance_1.ClassWithAttributes)); }(et2_core_inheritance_1.ClassWithAttributes));
exports.et2_widget = et2_widget; exports.et2_widget = et2_widget;

View File

@ -176,7 +176,7 @@ export class et2_widget extends ClassWithAttributes
// Set the legacyOptions array to the names of the properties the "options" // Set the legacyOptions array to the names of the properties the "options"
// attribute defines. // attribute defines.
legacyOptions: string[] = []; public static readonly legacyOptions: string[] = [];
private _type: string; private _type: string;
id: string; id: string;

View File

@ -38,7 +38,6 @@ var et2_customfields_list = /** @class */ (function (_super) {
__extends(et2_customfields_list, _super); __extends(et2_customfields_list, _super);
function et2_customfields_list(_parent, _attrs, _child) { function et2_customfields_list(_parent, _attrs, _child) {
var _this = _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_customfields_list._attributes, _child || {})) || this; var _this = _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_customfields_list._attributes, _child || {})) || this;
_this.legacyOptions = ["type_filter", "private", "fields"]; // Field restriction & private done server-side
_this.rows = {}; _this.rows = {};
_this.widgets = {}; _this.widgets = {};
_this.detachedNodes = []; _this.detachedNodes = [];
@ -602,6 +601,7 @@ var et2_customfields_list = /** @class */ (function (_super) {
"description": "JS code which is executed when the value changes." "description": "JS code which is executed when the value changes."
} }
}; };
et2_customfields_list.legacyOptions = ["type_filter", "private", "fields"]; // Field restriction & private done server-side
et2_customfields_list.PREFIX = '#'; et2_customfields_list.PREFIX = '#';
et2_customfields_list.DEFAULT_ID = "custom_fields"; et2_customfields_list.DEFAULT_ID = "custom_fields";
return et2_customfields_list; return et2_customfields_list;

View File

@ -64,7 +64,7 @@ export class et2_customfields_list extends et2_valueWidget implements et2_IDetac
} }
}; };
legacyOptions = ["type_filter","private", "fields"]; // Field restriction & private done server-side public static readonly legacyOptions = ["type_filter","private", "fields"]; // Field restriction & private done server-side
public static readonly PREFIX = '#'; public static readonly PREFIX = '#';

View File

@ -3652,7 +3652,7 @@ export class et2_nextmatch_sortheader extends et2_nextmatch_header implements et
"translate": false "translate": false
} }
}; };
legacyOptions: ['sortmode']; public static readonly legacyOptions: ['sortmode'];
private sortmode: string; private sortmode: string;
/** /**
@ -4022,7 +4022,7 @@ class et2_nextmatch_customfilter extends et2_nextmatch_filterheader
"default": {} "default": {}
} }
}; };
legacyOptions: ["widget_type","widget_options"]; public static readonly legacyOptions: ["widget_type","widget_options"];
real_node: et2_selectbox; real_node: et2_selectbox;

View File

@ -44,7 +44,6 @@ var et2_button = /** @class */ (function (_super) {
var _this = var _this =
// Call the inherited constructor // Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_button._attributes, _child || {})) || this; _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_button._attributes, _child || {})) || this;
_this.legacyOptions = ["image", "ro_image"];
_this.label = ""; _this.label = "";
_this.clicked = false; _this.clicked = false;
_this.btn = null; _this.btn = null;
@ -357,6 +356,7 @@ var et2_button = /** @class */ (function (_super) {
"ignore": true "ignore": true
} }
}; };
et2_button.legacyOptions = ["image", "ro_image"];
/** /**
* images to be used as background-image, if none is explicitly applied and id matches given regular expression * images to be used as background-image, if none is explicitly applied and id matches given regular expression
*/ */

View File

@ -76,7 +76,7 @@ export class et2_button extends et2_baseWidget implements et2_IInput, et2_IDetac
} }
}; };
legacyOptions: string[] = ["image", "ro_image"]; public static readonly legacyOptions: string[] = ["image", "ro_image"];
/** /**
* images to be used as background-image, if none is explicitly applied and id matches given regular expression * images to be used as background-image, if none is explicitly applied and id matches given regular expression

View File

@ -48,7 +48,6 @@ var et2_checkbox = /** @class */ (function (_super) {
var _this = var _this =
// Call the inherited constructor // Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_checkbox._attributes, _child || {})) || this; _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_checkbox._attributes, _child || {})) || this;
_this.legacyOptions = ["selected_value", "unselected_value", "ro_true", "ro_false"];
_this.input = null; _this.input = null;
_this.toggle = null; _this.toggle = null;
_this.input = null; _this.input = null;
@ -189,6 +188,7 @@ var et2_checkbox = /** @class */ (function (_super) {
"translate": true "translate": true
} }
}; };
et2_checkbox.legacyOptions = ["selected_value", "unselected_value", "ro_true", "ro_false"];
return et2_checkbox; return et2_checkbox;
}(et2_core_inputWidget_1.et2_inputWidget)); }(et2_core_inputWidget_1.et2_inputWidget));
et2_core_widget_1.et2_register_widget(et2_checkbox, ["checkbox"]); et2_core_widget_1.et2_register_widget(et2_checkbox, ["checkbox"]);

View File

@ -72,7 +72,7 @@ class et2_checkbox extends et2_inputWidget
} }
}; };
legacyOptions : string[] = ["selected_value", "unselected_value", "ro_true", "ro_false"]; public static readonly legacyOptions : string[] = ["selected_value", "unselected_value", "ro_true", "ro_false"];
input : JQuery = null; input : JQuery = null;
toggle : JQuery = null; toggle : JQuery = null;
value : string | boolean; value : string | boolean;

View File

@ -57,7 +57,6 @@ var et2_date = /** @class */ (function (_super) {
var _this = var _this =
// Call the inherited constructor // Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_date._attributes, _child || {})) || this; _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_date._attributes, _child || {})) || this;
_this.legacyOptions = ["data_format"];
_this.input_date = null; _this.input_date = null;
_this.is_mobile = false; _this.is_mobile = false;
_this.date = new Date(); _this.date = new Date();
@ -571,6 +570,7 @@ String: A string in the user\'s date format, or a relative date. Relative dates
"description": "Instead of an input field with a popup calendar, the calendar is displayed inline, with no input field" "description": "Instead of an input field with a popup calendar, the calendar is displayed inline, with no input field"
} }
}; };
et2_date.legacyOptions = ["data_format"];
return et2_date; return et2_date;
}(et2_core_inputWidget_1.et2_inputWidget)); }(et2_core_inputWidget_1.et2_inputWidget));
exports.et2_date = et2_date; exports.et2_date = et2_date;
@ -587,7 +587,6 @@ var et2_date_duration = /** @class */ (function (_super) {
var _this = var _this =
// Call the inherited constructor // Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_date_duration._attributes, _child || {})) || this; _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_date_duration._attributes, _child || {})) || this;
_this.legacyOptions = ["data_format", "display_format", "hours_per_day", "empty_not_0", "short_labels"];
_this.format = null; _this.format = null;
// Legacy option put percent in with display format // Legacy option put percent in with display format
if (_this.options.display_format.indexOf("%") != -1) { if (_this.options.display_format.indexOf("%") != -1) {
@ -840,6 +839,7 @@ var et2_date_duration = /** @class */ (function (_super) {
"description": "Works with the min and max attributes to limit the increments at which a numeric or date-time value can be set." "description": "Works with the min and max attributes to limit the increments at which a numeric or date-time value can be set."
} }
}; };
et2_date_duration.legacyOptions = ["data_format", "display_format", "hours_per_day", "empty_not_0", "short_labels"];
return et2_date_duration; return et2_date_duration;
}(et2_date)); }(et2_date));
exports.et2_date_duration = et2_date_duration; exports.et2_date_duration = et2_date_duration;

View File

@ -93,7 +93,7 @@ String: A string in the user\'s date format, or a relative date. Relative dates
} }
}; };
legacyOptions: string[] = ["data_format"]; public static readonly legacyOptions: string[] = ["data_format"];
date: Date; date: Date;
span: JQuery; span: JQuery;
input_date: JQuery = null; input_date: JQuery = null;
@ -703,7 +703,7 @@ export class et2_date_duration extends et2_date
} }
}; };
legacyOptions: string[] = ["data_format","display_format", "hours_per_day", "empty_not_0", "short_labels"]; public static readonly legacyOptions: string[] = ["data_format","display_format", "hours_per_day", "empty_not_0", "short_labels"];
time_formats: {"d":"d","h":"h","m":"m"}; time_formats: {"d":"d","h":"h","m":"m"};
@ -1085,7 +1085,7 @@ export class et2_date_ro extends et2_valueWidget implements et2_IDetachedDOM
year_range: {ignore: true} year_range: {ignore: true}
}; };
legacyOptions: ["data_format"]; public static readonly legacyOptions: ["data_format"];
/** /**
* Internal container for working easily with dates * Internal container for working easily with dates

View File

@ -51,8 +51,6 @@ var et2_description = /** @class */ (function (_super) {
var _this = var _this =
// Call the inherited constructor // Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_description._attributes, _child || {})) || this; _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_description._attributes, _child || {})) || this;
_this.legacyOptions = ["font_style", "href", "activate_links", "for",
"extra_link_target", "extra_link_popup", "statustext"];
_this._labelContainer = null; _this._labelContainer = null;
// Create the span/label tag which contains the label text // Create the span/label tag which contains the label text
_this.span = jQuery(document.createElement(_this.options["for"] ? "label" : "span")) _this.span = jQuery(document.createElement(_this.options["for"] ? "label" : "span"))
@ -359,6 +357,8 @@ var et2_description = /** @class */ (function (_super) {
"description": "Text to show as tooltip of defined action" "description": "Text to show as tooltip of defined action"
} }
}, },
_a.legacyOptions = ["font_style", "href", "activate_links", "for",
"extra_link_target", "extra_link_popup", "statustext"],
_a)))); _a))));
exports.et2_description = et2_description; exports.et2_description = et2_description;
; ;

View File

@ -111,7 +111,7 @@ export class et2_description extends expose(class et2_description extends et2_ba
}; };
legacyOptions: string[] = ["font_style", "href", "activate_links", "for", public static readonly legacyOptions: string[] = ["font_style", "href", "activate_links", "for",
"extra_link_target", "extra_link_popup", "statustext"]; "extra_link_target", "extra_link_popup", "statustext"];
span: JQuery; span: JQuery;

View File

@ -47,7 +47,6 @@ var et2_entry = /** @class */ (function (_super) {
var _this = var _this =
// Call the inherited constructor // Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_entry._attributes, _child || {})) || this; _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_entry._attributes, _child || {})) || this;
_this.legacyOptions = ["field", "compare", "alternate_fields"];
_this.widget = null; _this.widget = null;
// Often the ID conflicts, so check prefix // Often the ID conflicts, so check prefix
if (_attrs.id && _attrs.id.indexOf(et2_entry.prefix) < 0) { if (_attrs.id && _attrs.id.indexOf(et2_entry.prefix) < 0) {
@ -163,6 +162,7 @@ var et2_entry = /** @class */ (function (_super) {
default: true default: true
} }
}; };
et2_entry.legacyOptions = ["field", "compare", "alternate_fields"];
return et2_entry; return et2_entry;
}(et2_core_valueWidget_1.et2_valueWidget)); }(et2_core_valueWidget_1.et2_valueWidget));
et2_core_widget_1.et2_register_widget(et2_entry, ["entry", 'contact-value', 'contact-account', 'contact-template', 'infolog-value', 'tracker-value', 'records-value']); et2_core_widget_1.et2_register_widget(et2_entry, ["entry", 'contact-value', 'contact-account', 'contact-template', 'infolog-value', 'tracker-value', 'records-value']);

View File

@ -76,7 +76,7 @@ class et2_entry extends et2_valueWidget
} }
}; };
legacyOptions : string[] = ["field","compare","alternate_fields"]; public static readonly legacyOptions : string[] = ["field","compare","alternate_fields"];
static readonly prefix: '~'; static readonly prefix: '~';
protected widget = null; protected widget = null;

View File

@ -49,7 +49,6 @@ var et2_historylog = /** @class */ (function (_super) {
*/ */
function et2_historylog(_parent, _attrs, _child) { function et2_historylog(_parent, _attrs, _child) {
var _this = _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_historylog._attributes, _child || {})) || this; var _this = _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_historylog._attributes, _child || {})) || this;
_this.legacyOptions = ["status_id"];
_this.div = jQuery(document.createElement("div")) _this.div = jQuery(document.createElement("div"))
.addClass("et2_historylog"); .addClass("et2_historylog");
_this.innerDiv = jQuery(document.createElement("div")) _this.innerDiv = jQuery(document.createElement("div"))
@ -574,6 +573,7 @@ var et2_historylog = /** @class */ (function (_super) {
"description": "Method to get rows" "description": "Method to get rows"
} }
}; };
et2_historylog.legacyOptions = ["status_id"];
et2_historylog.columns = [ et2_historylog.columns = [
{ 'id': 'user_ts', caption: 'Date', 'width': '120px', widget_type: 'date-time', widget: null, nodes: null }, { 'id': 'user_ts', caption: 'Date', 'width': '120px', widget_type: 'date-time', widget: null, nodes: null },
{ 'id': 'owner', caption: 'User', 'width': '150px', widget_type: 'select-account', widget: null, nodes: null }, { 'id': 'owner', caption: 'User', 'width': '150px', widget_type: 'select-account', widget: null, nodes: null },

View File

@ -65,7 +65,7 @@ export class et2_historylog extends et2_valueWidget implements et2_IDataProvider
} }
}; };
legacyOptions = ["status_id"]; public static readonly legacyOptions = ["status_id"];
protected static columns = [ protected static columns = [
{'id': 'user_ts', caption: 'Date', 'width': '120px', widget_type: 'date-time', widget: null, nodes: null}, {'id': 'user_ts', caption: 'Date', 'width': '120px', widget_type: 'date-time', widget: null, nodes: null},
{'id': 'owner', caption: 'User', 'width': '150px', widget_type: 'select-account', widget: null, nodes: null}, {'id': 'owner', caption: 'User', 'width': '150px', widget_type: 'select-account', widget: null, nodes: null},

View File

@ -48,7 +48,6 @@ var et2_image = /** @class */ (function (_super) {
var _this = var _this =
// Call the inherited constructor // Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_image._attributes, _child || {})) || this; _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_image._attributes, _child || {})) || this;
_this.legacyOptions = ["href", "extra_link_target", "imagemap", "extra_link_popup", "id"];
_this.image = null; _this.image = null;
// Create the image or a/image tag // Create the image or a/image tag
_this.image = jQuery(document.createElement("img")); _this.image = jQuery(document.createElement("img"));
@ -249,6 +248,7 @@ var et2_image = /** @class */ (function (_super) {
description: "Clicking on an image with href value would popup an expose view, and will show image referenced by href." description: "Clicking on an image with href value would popup an expose view, and will show image referenced by href."
} }
}; };
et2_image.legacyOptions = ["href", "extra_link_target", "imagemap", "extra_link_popup", "id"];
return et2_image; return et2_image;
}(et2_core_baseWidget_1.et2_baseWidget)); }(et2_core_baseWidget_1.et2_baseWidget));
et2_core_widget_1.et2_register_widget(et2_image, ["image"]); et2_core_widget_1.et2_register_widget(et2_image, ["image"]);

View File

@ -19,7 +19,7 @@
*/ */
import {et2_baseWidget} from './et2_core_baseWidget'; import {et2_baseWidget} from './et2_core_baseWidget';
import {WidgetConfig, et2_register_widget} from "./et2_core_widget"; import {et2_register_widget, WidgetConfig} from "./et2_core_widget";
import {ClassWithAttributes} from "./et2_core_inheritance"; import {ClassWithAttributes} from "./et2_core_inheritance";
/** /**
@ -75,7 +75,7 @@ class et2_image extends et2_baseWidget implements et2_IDetachedDOM
} }
}; };
legacyOptions : string[] = ["href", "extra_link_target", "imagemap", "extra_link_popup", "id"]; public static readonly legacyOptions : string[] = ["href", "extra_link_target", "imagemap", "extra_link_popup", "id"];
image : JQuery = null; image : JQuery = null;

View File

@ -52,7 +52,6 @@ var et2_itempicker = /** @class */ (function (_super) {
var _this = var _this =
// Call the inherited constructor // Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_itempicker._attributes, _child || {})) || this; _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_itempicker._attributes, _child || {})) || this;
_this.legacyOptions = ["application"];
_this.last_search = ""; // Remember last search value _this.last_search = ""; // Remember last search value
_this.action = null; // Action function for button _this.action = null; // Action function for button
_this.current_app = ""; // Remember currently chosen application _this.current_app = ""; // Remember currently chosen application
@ -347,6 +346,7 @@ var et2_itempicker = /** @class */ (function (_super) {
"description": "Callback before query to server. Must return true, or false to abort query." "description": "Callback before query to server. Must return true, or false to abort query."
} }
}; };
et2_itempicker.legacyOptions = ["application"];
return et2_itempicker; return et2_itempicker;
}(et2_core_inputWidget_1.et2_inputWidget)); }(et2_core_inputWidget_1.et2_inputWidget));
et2_core_widget_1.et2_register_widget(et2_itempicker, ["itempicker"]); et2_core_widget_1.et2_register_widget(et2_itempicker, ["itempicker"]);

View File

@ -70,7 +70,7 @@ class et2_itempicker extends et2_inputWidget
} }
}; };
legacyOptions : string[] = ["application"]; public static readonly legacyOptions : string[] = ["application"];
private last_search : string = ""; // Remember last search value private last_search : string = ""; // Remember last search value
private action : egwFnct = null; // Action function for button private action : egwFnct = null; // Action function for button
private current_app : string = ""; // Remember currently chosen application private current_app : string = ""; // Remember currently chosen application

View File

@ -1052,7 +1052,6 @@ var et2_link = /** @class */ (function (_super) {
*/ */
function et2_link(_parent, _attrs, _child) { function et2_link(_parent, _attrs, _child) {
var _this = _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_link._attributes, _child || {})) || this; var _this = _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_link._attributes, _child || {})) || this;
_this.legacyOptions = ["only_app"];
_this.label_span = jQuery(document.createElement("label")) _this.label_span = jQuery(document.createElement("label"))
.addClass("et2_label"); .addClass("et2_label");
_this.link = jQuery(document.createElement("span")) _this.link = jQuery(document.createElement("span"))
@ -1221,6 +1220,7 @@ var et2_link = /** @class */ (function (_super) {
"description": "Optional parameter to be passed to egw().open in order to open links in specified target eg. _blank" "description": "Optional parameter to be passed to egw().open in order to open links in specified target eg. _blank"
} }
}; };
et2_link.legacyOptions = ["only_app"];
return et2_link; return et2_link;
}(et2_core_valueWidget_1.et2_valueWidget)); }(et2_core_valueWidget_1.et2_valueWidget));
exports.et2_link = et2_link; exports.et2_link = et2_link;

View File

@ -1317,7 +1317,7 @@ export class et2_link extends et2_valueWidget implements et2_IDetachedDOM
"description": "Optional parameter to be passed to egw().open in order to open links in specified target eg. _blank" "description": "Optional parameter to be passed to egw().open in order to open links in specified target eg. _blank"
} }
}; };
legacyOptions = ["only_app"]; public static readonly legacyOptions = ["only_app"];
private label_span: JQuery; private label_span: JQuery;
private link: JQuery; private link: JQuery;

View File

@ -46,7 +46,6 @@ var et2_progress = /** @class */ (function (_super) {
var _this = var _this =
// Call the inherited constructor // Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_progress._attributes, _child || {})) || this; _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_progress._attributes, _child || {})) || this;
_this.legacyOptions = ["href", "extra_link_target", "imagemap", "extra_link_popup", "id"];
_this.progress = null; _this.progress = null;
var outer = document.createElement("div"); var outer = document.createElement("div");
outer.className = "et2_progress"; outer.className = "et2_progress";
@ -165,6 +164,7 @@ var et2_progress = /** @class */ (function (_super) {
"translate": true "translate": true
} }
}; };
et2_progress.legacyOptions = ["href", "extra_link_target", "imagemap", "extra_link_popup", "id"];
return et2_progress; return et2_progress;
}(et2_core_valueWidget_1.et2_valueWidget)); }(et2_core_valueWidget_1.et2_valueWidget));
et2_core_widget_1.et2_register_widget(et2_progress, ["progress"]); et2_core_widget_1.et2_register_widget(et2_progress, ["progress"]);

View File

@ -51,7 +51,7 @@ class et2_progress extends et2_valueWidget implements et2_IDetachedDOM
} }
}; };
legacyOptions : string[] = ["href", "extra_link_target", "imagemap", "extra_link_popup", "id"]; public static readonly legacyOptions : string[] = ["href", "extra_link_target", "imagemap", "extra_link_popup", "id"];
private progress : HTMLElement = null; private progress : HTMLElement = null;
/** /**

View File

@ -50,7 +50,6 @@ var et2_radiobox = /** @class */ (function (_super) {
*/ */
function et2_radiobox(_parent, _attrs, _child) { function et2_radiobox(_parent, _attrs, _child) {
var _this = _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_radiobox._attributes, _child || {})) || this; var _this = _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_radiobox._attributes, _child || {})) || this;
_this.legacyOptions = ["set_value", "ro_true", "ro_false"];
_this.input = null; _this.input = null;
_this.id = ""; _this.id = "";
_this.createInputWidget(); _this.createInputWidget();
@ -159,6 +158,7 @@ var et2_radiobox = /** @class */ (function (_super) {
"description": "What should be displayed when readonly and not selected" "description": "What should be displayed when readonly and not selected"
} }
}; };
et2_radiobox.legacyOptions = ["set_value", "ro_true", "ro_false"];
return et2_radiobox; return et2_radiobox;
}(et2_core_inputWidget_1.et2_inputWidget)); }(et2_core_inputWidget_1.et2_inputWidget));
et2_core_widget_1.et2_register_widget(et2_radiobox, ["radio"]); et2_core_widget_1.et2_register_widget(et2_radiobox, ["radio"]);
@ -176,7 +176,6 @@ var et2_radiobox_ro = /** @class */ (function (_super) {
var _this = var _this =
// Call the inherited constructor // Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_radiobox_ro._attributes, _child || {})) || this; _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_radiobox_ro._attributes, _child || {})) || this;
_this.legacyOptions = ["set_value", "ro_true", "ro_false"];
_this.value = ""; _this.value = "";
_this.span = null; _this.span = null;
_this.span = jQuery(document.createElement("span")) _this.span = jQuery(document.createElement("span"))
@ -243,6 +242,7 @@ var et2_radiobox_ro = /** @class */ (function (_super) {
"type": "string" "type": "string"
} }
}; };
et2_radiobox_ro.legacyOptions = ["set_value", "ro_true", "ro_false"];
return et2_radiobox_ro; return et2_radiobox_ro;
}(et2_core_valueWidget_1.et2_valueWidget)); }(et2_core_valueWidget_1.et2_valueWidget));
et2_core_widget_1.et2_register_widget(et2_radiobox_ro, ["radio_ro"]); et2_core_widget_1.et2_register_widget(et2_radiobox_ro, ["radio_ro"]);

View File

@ -16,8 +16,9 @@
*/ */
import {et2_inputWidget} from "./et2_core_inputWidget"; import {et2_inputWidget} from "./et2_core_inputWidget";
import {ClassWithAttributes} from "./et2_core_inheritance"; import {ClassWithAttributes} from "./et2_core_inheritance";
import {WidgetConfig, et2_register_widget} from "./et2_core_widget"; import {et2_register_widget, WidgetConfig} from "./et2_core_widget";
import {et2_valueWidget} from './et2_core_valueWidget'; import {et2_valueWidget} from './et2_core_valueWidget';
/** /**
* Class which implements the "radiobox" XET-Tag * Class which implements the "radiobox" XET-Tag
* *
@ -50,7 +51,7 @@ class et2_radiobox extends et2_inputWidget
} }
}; };
legacyOptions : string[] = ["set_value", "ro_true", "ro_false"]; public static readonly legacyOptions : string[] = ["set_value", "ro_true", "ro_false"];
input : JQuery = null; input : JQuery = null;
id : string = ""; id : string = "";
@ -204,7 +205,7 @@ class et2_radiobox_ro extends et2_valueWidget implements et2_IDetachedDOM
} }
}; };
legacyOptions : string[] = ["set_value", "ro_true", "ro_false"]; public static readonly legacyOptions : string[] = ["set_value", "ro_true", "ro_false"];
value : string = ""; value : string = "";
span : JQuery = null; span : JQuery = null;

View File

@ -626,7 +626,6 @@ var et2_selectAccount_ro = /** @class */ (function (_super) {
*/ */
function et2_selectAccount_ro(_parent, _attrs, _child) { function et2_selectAccount_ro(_parent, _attrs, _child) {
var _this = _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_selectAccount_ro._attributes, _child || {})) || this; var _this = _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_selectAccount_ro._attributes, _child || {})) || this;
_this.legacyOptions = ["empty_label"];
/** /**
Resolve some circular dependency problems here Resolve some circular dependency problems here
selectAccount extends link, link is in a file that needs select, selectAccount extends link, link is in a file that needs select,
@ -720,6 +719,7 @@ var et2_selectAccount_ro = /** @class */ (function (_super) {
translate: true translate: true
} }
}; };
et2_selectAccount_ro.legacyOptions = ["empty_label"];
return et2_selectAccount_ro; return et2_selectAccount_ro;
}(et2_widget_link_2.et2_link_string)); }(et2_widget_link_2.et2_link_string));
exports.et2_selectAccount_ro = et2_selectAccount_ro; exports.et2_selectAccount_ro = et2_selectAccount_ro;

View File

@ -18,11 +18,10 @@
*/ */
import {et2_selectbox} from "./et2_widget_selectbox"; import {et2_selectbox} from "./et2_widget_selectbox";
import {et2_register_widget, WidgetConfig, et2_widget} from "./et2_core_widget"; import {et2_register_widget, et2_widget, WidgetConfig} from "./et2_core_widget";
import {ClassWithAttributes} from "./et2_core_inheritance"; import {ClassWithAttributes} from "./et2_core_inheritance";
import {et2_link_entry} from "./et2_widget_link"; import {et2_link_entry, et2_link_string} from "./et2_widget_link";
import {et2_dialog} from "./et2_widget_dialog"; import {et2_dialog} from "./et2_widget_dialog";
import {et2_link_string} from "./et2_widget_link";
/** /**
* Account selection widget * Account selection widget
@ -767,7 +766,7 @@ export class et2_selectAccount_ro extends et2_link_string
} }
}; };
legacyOptions : string[] = ["empty_label"]; public static readonly legacyOptions : string[] = ["empty_label"];
/** /**
* Constructor * Constructor

View File

@ -50,7 +50,6 @@ var et2_selectbox = /** @class */ (function (_super) {
var _this = var _this =
// Call the inherited constructor // Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_selectbox._attributes, _child || {})) || this; _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_selectbox._attributes, _child || {})) || this;
_this.legacyOptions = ["rows", "other"]; // Other is sub-type specific
_this.input = null; _this.input = null;
_this.value = ''; _this.value = '';
_this.selected_first = true; _this.selected_first = true;
@ -1243,6 +1242,7 @@ var et2_selectbox = /** @class */ (function (_super) {
description: "Allow to set a custom css class combined with selected value. (e.g. cat_23)" description: "Allow to set a custom css class combined with selected value. (e.g. cat_23)"
} }
}; };
et2_selectbox.legacyOptions = ["rows", "other"]; // Other is sub-type specific
et2_selectbox.type_cache = {}; et2_selectbox.type_cache = {};
return et2_selectbox; return et2_selectbox;
}(et2_core_inputWidget_1.et2_inputWidget)); }(et2_core_inputWidget_1.et2_inputWidget));

View File

@ -112,7 +112,7 @@ export class et2_selectbox extends et2_inputWidget
} }
}; };
legacyOptions: string[] = ["rows","other"]; // Other is sub-type specific public static readonly legacyOptions: string[] = ["rows","other"]; // Other is sub-type specific
input: JQuery = null; input: JQuery = null;
value: string | string[] = ''; value: string | string[] = '';
expand_button: JQuery; expand_button: JQuery;

View File

@ -47,7 +47,6 @@ var et2_textbox = /** @class */ (function (_super) {
var _this = var _this =
// Call the inherited constructor // Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_textbox._attributes, _child || {})) || this; _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_textbox._attributes, _child || {})) || this;
_this.legacyOptions = ["size", "maxlength", "validator"];
_this.input = null; _this.input = null;
_this.input = null; _this.input = null;
_this.createInputWidget(); _this.createInputWidget();
@ -283,6 +282,7 @@ var et2_textbox = /** @class */ (function (_super) {
description: "JS code or app.$app.$method called when key is pressed, return false cancels it." description: "JS code or app.$app.$method called when key is pressed, return false cancels it."
} }
}; };
et2_textbox.legacyOptions = ["size", "maxlength", "validator"];
return et2_textbox; return et2_textbox;
}(et2_core_inputWidget_1.et2_inputWidget)); }(et2_core_inputWidget_1.et2_inputWidget));
exports.et2_textbox = et2_textbox; exports.et2_textbox = et2_textbox;

View File

@ -16,8 +16,7 @@
import './et2_core_common'; import './et2_core_common';
import {ClassWithAttributes} from "./et2_core_inheritance"; import {ClassWithAttributes} from "./et2_core_inheritance";
import { et2_widget, et2_createWidget, et2_register_widget, WidgetConfig } from "./et2_core_widget"; import {et2_createWidget, et2_register_widget, WidgetConfig} from "./et2_core_widget";
import { et2_DOMWidget } from './et2_core_DOMWidget'
import {et2_valueWidget} from './et2_core_valueWidget' import {et2_valueWidget} from './et2_core_valueWidget'
import {et2_inputWidget} from './et2_core_inputWidget' import {et2_inputWidget} from './et2_core_inputWidget'
import {et2_button} from './et2_widget_button' import {et2_button} from './et2_widget_button'
@ -88,7 +87,7 @@ export class et2_textbox extends et2_inputWidget implements et2_IResizeable
} }
}; };
legacyOptions: string[] = ["size", "maxlength", "validator"]; public static readonly legacyOptions: string[] = ["size", "maxlength", "validator"];
input: JQuery = null; input: JQuery = null;
size: number; size: number;
maxLength: number; maxLength: number;

View File

@ -450,7 +450,6 @@ var et2_vfsMime = /** @class */ (function (_super) {
var _this = var _this =
// Call the inherited constructor // Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_vfsMime._attributes, _child || {})) || this; _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_vfsMime._attributes, _child || {})) || this;
_this.legacyOptions = ["size"];
_this.iconOverlayContainer = null; _this.iconOverlayContainer = null;
_this.image = null; _this.image = null;
_this.iconOverlayContainer = jQuery(document.createElement('span')).addClass('iconOverlayContainer'); _this.iconOverlayContainer = jQuery(document.createElement('span')).addClass('iconOverlayContainer');
@ -618,6 +617,7 @@ var et2_vfsMime = /** @class */ (function (_super) {
description: " Size of thumbnail in pixel for specified mime type with syntax of: mime_type(s),size (eg. image,video,128)" description: " Size of thumbnail in pixel for specified mime type with syntax of: mime_type(s),size (eg. image,video,128)"
} }
}, },
_a.legacyOptions = ["size"],
_a)))); _a))));
; ;
et2_core_widget_1.et2_register_widget(et2_vfsMime, ["vfs-mime"]); et2_core_widget_1.et2_register_widget(et2_vfsMime, ["vfs-mime"]);
@ -828,7 +828,6 @@ var et2_vfsUpload = /** @class */ (function (_super) {
var _this = var _this =
// Call the inherited constructor // Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_vfsUpload._attributes, _child || {})) || this; _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_vfsUpload._attributes, _child || {})) || this;
_this.legacyOptions = ["mime"];
_this.asyncOptions = { _this.asyncOptions = {
target: egw.ajaxUrl("EGroupware\\Api\\Etemplate\\Widget\\Vfs::ajax_upload") target: egw.ajaxUrl("EGroupware\\Api\\Etemplate\\Widget\\Vfs::ajax_upload")
}; };
@ -989,6 +988,7 @@ var et2_vfsUpload = /** @class */ (function (_super) {
"default": '' "default": ''
} }
}; };
et2_vfsUpload.legacyOptions = ["mime"];
return et2_vfsUpload; return et2_vfsUpload;
}(et2_widget_file_1.et2_file)); }(et2_widget_file_1.et2_file));
et2_core_widget_1.et2_register_widget(et2_vfsUpload, ["vfs-upload"]); et2_core_widget_1.et2_register_widget(et2_vfsUpload, ["vfs-upload"]);

View File

@ -518,7 +518,7 @@ class et2_vfsMime extends expose(class et2_vfsMime extends et2_valueWidget imple
}; };
legacyOptions : string[] = ["size"]; public static readonly legacyOptions : string[] = ["size"];
iconOverlayContainer : JQuery = null; iconOverlayContainer : JQuery = null;
overlayContainer : JQuery; overlayContainer : JQuery;
image : JQuery = null; image : JQuery = null;
@ -932,7 +932,7 @@ class et2_vfsUpload extends et2_file
} }
}; };
legacyOptions : string[] = ["mime"]; public static readonly legacyOptions : string[] = ["mime"];
asyncOptions : {target : any} = { asyncOptions : {target : any} = {
target: egw.ajaxUrl("EGroupware\\Api\\Etemplate\\Widget\\Vfs::ajax_upload") target: egw.ajaxUrl("EGroupware\\Api\\Etemplate\\Widget\\Vfs::ajax_upload")

View File

@ -11,7 +11,7 @@
</columns> </columns>
<rows> <rows>
<row> <row>
<radio id="index" options="$row_cont[index]"/> <radio id="index" set_value="$row_cont[index]"/>
<description/> <description/>
<description id="${row}[label]"/> <description id="${row}[label]"/>
</row> </row>

View File

@ -33,16 +33,16 @@
</columns> </columns>
<rows> <rows>
<row class="row"> <row class="row">
<vfs-mime align="center" id="$row" options="16" class="selectIcon"/> <vfs-mime align="center" id="$row" size="16" class="selectIcon"/>
<vfs id="$row" onclick="app.vfsSelectUI.select_clicked"/> <vfs id="$row" onclick="app.vfsSelectUI.select_clicked"/>
<checkbox align="right" id="selected[]" options="&quot;$row_cont[name]&quot;"/> <checkbox align="right" id="selected[]" selected_value="&quot;$row_cont[name]&quot;"/>
</row> </row>
</rows> </rows>
</grid> </grid>
</hbox> </hbox>
</row> </row>
<row disabled="!@showmime"> <row disabled="!@showmime">
<select id="mime" onchange="app.vfsSelectUI.do_action('mime', widget)" options="All files" class="et2_fullWidth"/> <select id="mime" onchange="app.vfsSelectUI.do_action('mime', widget)" empty_label="All files" class="et2_fullWidth"/>
</row> </row>
</rows> </rows>
</grid> </grid>

View File

@ -716,9 +716,7 @@ var et2_calendar_event = /** @class */ (function (_super) {
return element.id == owner; return element.id == owner;
}) || {}; }) || {};
if (resource && resource.resources) { if (resource && resource.resources) {
var matching_participant = resource.resources.filter(function (id) { var matching_participant = resource.resources.filter(function (id) { return typeof event.participants[id] != "undefined"; });
return typeof event.participants[id] != "undefined";
});
return this._status_check(event, filter, matching_participant); return this._status_check(event, filter, matching_participant);
} }
} }