2022-01-13 23:28:52 +01:00
|
|
|
/**
|
|
|
|
* Some static options, no need to transfer them over and over.
|
|
|
|
* We still need the same thing on the server side to validate, so they
|
|
|
|
* have to match. See Etemplate\Widget\Select::typeOptions()
|
|
|
|
* The type specific legacy options wind up in attrs.other, but should be explicitly
|
|
|
|
* defined and set.
|
|
|
|
*
|
|
|
|
* @param {type} widget
|
|
|
|
*/
|
|
|
|
import {sprintf} from "../../egw_action/egw_action_common";
|
2023-09-13 19:55:33 +02:00
|
|
|
import {Et2SelectReadonly} from "./Select/Et2SelectReadonly";
|
2023-07-22 00:39:47 +02:00
|
|
|
import {cleanSelectOptions, find_select_options, SelectOption} from "./FindSelectOptions";
|
2023-08-28 21:50:09 +02:00
|
|
|
import {Et2Select, Et2WidgetWithSelect} from "./Et2Select";
|
2023-09-13 19:55:33 +02:00
|
|
|
import {state} from "lit/decorators/state.js";
|
2022-03-16 21:36:23 +01:00
|
|
|
|
|
|
|
export type Et2SelectWidgets = Et2Select | Et2WidgetWithSelect | Et2SelectReadonly;
|
2023-09-13 19:55:33 +02:00
|
|
|
type NumberOptions = {
|
|
|
|
min? : number,
|
|
|
|
max? : number,
|
|
|
|
interval? : number,
|
|
|
|
format? : string
|
|
|
|
};
|
2022-01-13 23:28:52 +01:00
|
|
|
|
2022-07-15 20:56:24 +02:00
|
|
|
// Export the Interface for TypeScript
|
|
|
|
type Constructor<T = {}> = new (...args : any[]) => T;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Base class for things that have static options
|
|
|
|
*
|
|
|
|
* We keep static options separate and concatenate them in to allow for extra options without
|
|
|
|
* overwriting them when we get static options from the server
|
|
|
|
*/
|
|
|
|
|
|
|
|
export const Et2StaticSelectMixin = <T extends Constructor<Et2WidgetWithSelect>>(superclass : T) =>
|
|
|
|
{
|
|
|
|
class Et2StaticSelectOptions extends (superclass)
|
|
|
|
{
|
|
|
|
|
2022-10-03 17:12:00 +02:00
|
|
|
// Hold the static widget options separately so other options (like sent from server in sel_options) won't
|
|
|
|
// conflict or be wiped out
|
2023-09-13 19:55:33 +02:00
|
|
|
@state()
|
|
|
|
protected _static_options : SelectOption[] = [];
|
2022-07-15 20:56:24 +02:00
|
|
|
|
2022-10-03 17:12:00 +02:00
|
|
|
// If widget needs to fetch options from server, we might want to wait for them
|
2023-09-13 19:55:33 +02:00
|
|
|
@state()
|
|
|
|
protected fetchComplete : Promise<SelectOption[] | void> = Promise.resolve();
|
2022-10-03 17:12:00 +02:00
|
|
|
|
2023-09-13 19:55:33 +02:00
|
|
|
async getUpdateComplete() : Promise<boolean>
|
2022-07-15 20:56:24 +02:00
|
|
|
{
|
2023-09-13 19:55:33 +02:00
|
|
|
const result = await super.getUpdateComplete();
|
|
|
|
await this.fetchComplete;
|
|
|
|
return result;
|
2022-07-15 20:56:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
get select_options() : SelectOption[]
|
|
|
|
{
|
|
|
|
// @ts-ignore
|
2022-07-19 15:17:16 +02:00
|
|
|
const options = super.select_options || [];
|
2023-09-13 19:55:33 +02:00
|
|
|
const statics = this._static_options || [];
|
2022-07-19 18:30:48 +02:00
|
|
|
|
2023-08-28 21:50:09 +02:00
|
|
|
if(options.length == 0)
|
|
|
|
{
|
|
|
|
return statics;
|
|
|
|
}
|
|
|
|
if(statics.length == 0)
|
|
|
|
{
|
|
|
|
return options;
|
|
|
|
}
|
|
|
|
// Merge & make sure result is unique
|
2023-09-13 19:55:33 +02:00
|
|
|
return [...new Map([...(this._static_options || []), ...options].map(item =>
|
2022-07-19 18:30:48 +02:00
|
|
|
[item.value, item])).values()];
|
|
|
|
|
2022-07-15 20:56:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
set select_options(new_options)
|
|
|
|
{
|
|
|
|
// @ts-ignore IDE doesn't recognise property
|
|
|
|
super.select_options = new_options;
|
|
|
|
}
|
2022-07-19 19:47:03 +02:00
|
|
|
|
|
|
|
set_static_options(new_static_options)
|
|
|
|
{
|
2023-09-13 19:55:33 +02:00
|
|
|
this._static_options = new_static_options;
|
2022-07-19 19:47:03 +02:00
|
|
|
this.requestUpdate("select_options");
|
|
|
|
}
|
2022-10-03 17:12:00 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Override the parent fix_bad_value() to wait for server-side options
|
|
|
|
* to come back before we check to see if the value is not there.
|
|
|
|
*/
|
|
|
|
fix_bad_value()
|
|
|
|
{
|
|
|
|
this.fetchComplete.then(() =>
|
|
|
|
{
|
|
|
|
// @ts-ignore Doesn't know it's an Et2Select
|
|
|
|
if(typeof super.fix_bad_value == "function")
|
|
|
|
{
|
|
|
|
// @ts-ignore Doesn't know it's an Et2Select
|
|
|
|
super.fix_bad_value();
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
2022-07-15 20:56:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return Et2StaticSelectOptions;
|
|
|
|
}
|
|
|
|
|
2022-01-13 23:28:52 +01:00
|
|
|
/**
|
|
|
|
* Some options change, or are too complicated to have twice, so we get the
|
|
|
|
* options from the server once, then keep them to use if they're needed again.
|
|
|
|
* We use the options string to keep the different possibilities (eg. categories
|
|
|
|
* for different apps) separate.
|
|
|
|
*
|
|
|
|
* @param {et2_selectbox} widget Selectbox we're looking at
|
|
|
|
* @param {string} options_string
|
|
|
|
* @param {Object} attrs Widget attributes (not yet fully set)
|
2022-06-20 17:01:28 +02:00
|
|
|
* @param {boolean} return_promise true: always return a promise
|
|
|
|
* @returns {Object[]|Promise<Object[]>} Array of options, or empty and they'll get filled in later, or Promise
|
2022-01-13 23:28:52 +01:00
|
|
|
*/
|
2023-03-13 19:38:05 +01:00
|
|
|
export const StaticOptions = new class StaticOptionsType
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
2022-06-20 17:01:28 +02:00
|
|
|
cached_server_side(widget : Et2SelectWidgets, type : string, options_string, return_promise? : boolean) : SelectOption[]|Promise<SelectOption[]>
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
|
|
|
// normalize options by removing trailing commas
|
|
|
|
options_string = options_string.replace(/,+$/, '');
|
|
|
|
|
2022-01-14 17:29:14 +01:00
|
|
|
const cache_id = widget.nodeName + '_' + options_string;
|
2022-01-13 23:28:52 +01:00
|
|
|
const cache_owner = widget.egw().getCache('Et2Select');
|
|
|
|
let cache = cache_owner[cache_id];
|
|
|
|
|
|
|
|
if(typeof cache === 'undefined')
|
|
|
|
{
|
|
|
|
// Fetch with json instead of jsonq because there may be more than
|
|
|
|
// one widget listening for the response by the time it gets back,
|
|
|
|
// and we can't do that when it's queued.
|
2022-01-14 17:29:14 +01:00
|
|
|
const req = widget.egw().json(
|
2022-01-13 23:28:52 +01:00
|
|
|
'EGroupware\\Api\\Etemplate\\Widget\\Select::ajax_get_options',
|
2022-01-14 17:29:14 +01:00
|
|
|
[type, options_string, widget.value]
|
2022-01-13 23:28:52 +01:00
|
|
|
).sendRequest();
|
|
|
|
if(typeof cache === 'undefined')
|
|
|
|
{
|
|
|
|
cache_owner[cache_id] = req;
|
|
|
|
}
|
|
|
|
cache = req;
|
|
|
|
}
|
|
|
|
if(typeof cache.then === 'function')
|
|
|
|
{
|
|
|
|
// pending, wait for it
|
2022-06-20 17:01:28 +02:00
|
|
|
const promise = cache.then((response) =>
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
|
|
|
cache = cache_owner[cache_id] = response.response[0].data || undefined;
|
2022-06-20 17:01:28 +02:00
|
|
|
|
|
|
|
if (return_promise) return cache;
|
|
|
|
|
2022-01-13 23:28:52 +01:00
|
|
|
// Set select_options in attributes in case we get a response before
|
|
|
|
// the widget is finished loading (otherwise it will re-set to {})
|
2022-01-14 17:29:14 +01:00
|
|
|
//widget.select_options = cache;
|
2022-01-13 23:28:52 +01:00
|
|
|
|
|
|
|
// Avoid errors if widget is destroyed before the timeout
|
|
|
|
if(widget && typeof widget.id !== 'undefined')
|
|
|
|
{
|
2022-07-15 20:56:24 +02:00
|
|
|
if(typeof widget.set_static_options == "function")
|
|
|
|
{
|
|
|
|
widget.set_static_options(cache);
|
|
|
|
}
|
|
|
|
else if(typeof widget.set_select_options == "function")
|
|
|
|
{
|
|
|
|
widget.set_select_options(find_select_options(widget, {}, cache));
|
|
|
|
}
|
2022-01-13 23:28:52 +01:00
|
|
|
}
|
|
|
|
});
|
2022-06-20 17:01:28 +02:00
|
|
|
return return_promise ? promise : [];
|
2022-01-13 23:28:52 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Check that the value is in there
|
|
|
|
// Make sure we are not requesting server for an empty value option or
|
|
|
|
// other widgets but select-timezone as server won't find anything and
|
|
|
|
// it will fall into an infinitive loop, e.g. select-cat widget.
|
2022-01-14 17:29:14 +01:00
|
|
|
if(widget.value && widget.value != "" && widget.value != "0" && type == "select-timezone")
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
|
|
|
var missing_option = true;
|
|
|
|
for(var i = 0; i < cache.length && missing_option; i++)
|
|
|
|
{
|
2022-01-14 17:29:14 +01:00
|
|
|
if(cache[i].value == widget.value)
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
|
|
|
missing_option = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Try again - ask the server with the current value this time
|
|
|
|
if(missing_option)
|
|
|
|
{
|
|
|
|
delete cache_owner[cache_id];
|
2022-01-14 17:29:14 +01:00
|
|
|
return this.cached_server_side(widget, type, options_string);
|
2022-01-13 23:28:52 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-01-14 17:29:14 +01:00
|
|
|
if(widget.value && widget && widget.get_value() !== widget.value)
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
2022-03-16 21:36:23 +01:00
|
|
|
egw.window.setTimeout(function()
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
|
|
|
// Avoid errors if widget is destroyed before the timeout
|
|
|
|
if(this.widget && typeof this.widget.id !== 'undefined')
|
|
|
|
{
|
|
|
|
this.widget.set_value(this.widget.options.value);
|
|
|
|
}
|
2022-03-16 21:36:23 +01:00
|
|
|
}.bind({widget: widget}), 1);
|
2022-01-13 23:28:52 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-20 17:01:28 +02:00
|
|
|
return return_promise ? Promise.resolve(cache) : cache;
|
2022-01-13 23:28:52 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-22 00:39:47 +02:00
|
|
|
cached_from_file(widget, file) : Promise<SelectOption[]>
|
|
|
|
{
|
|
|
|
const cache_owner = widget.egw().getCache('Et2Select');
|
|
|
|
let cache = cache_owner[file];
|
|
|
|
if(typeof cache === 'undefined')
|
|
|
|
{
|
|
|
|
cache_owner[file] = cache = widget.egw().window.fetch(file)
|
|
|
|
.then((response) =>
|
|
|
|
{
|
|
|
|
// Get the options
|
|
|
|
if(!response.ok)
|
|
|
|
{
|
|
|
|
throw response;
|
|
|
|
}
|
|
|
|
return response.json();
|
|
|
|
})
|
|
|
|
.then(options =>
|
|
|
|
{
|
|
|
|
// Need to clean the options because file may be key=>value, may have option list, may be mixed
|
|
|
|
cache_owner[file] = cleanSelectOptions(options) ?? [];
|
|
|
|
return cache_owner[file];
|
|
|
|
});
|
|
|
|
}
|
|
|
|
else if(cache && typeof cache.then === "undefined")
|
|
|
|
{
|
|
|
|
return Promise.resolve(cache);
|
|
|
|
}
|
|
|
|
return cache;
|
|
|
|
}
|
|
|
|
|
2022-03-16 21:36:23 +01:00
|
|
|
priority(widget : Et2SelectWidgets) : SelectOption[]
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
|
|
|
return [
|
|
|
|
{value: "1", label: 'low'},
|
|
|
|
{value: "2", label: 'normal'},
|
|
|
|
{value: "3", label: 'high'},
|
|
|
|
{value: "0", label: 'undefined'}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
2022-03-16 21:36:23 +01:00
|
|
|
bool(widget : Et2SelectWidgets) : SelectOption[]
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
|
|
|
return [
|
|
|
|
{value: "0", label: 'no'},
|
|
|
|
{value: "1", label: 'yes'}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
2022-03-16 21:36:23 +01:00
|
|
|
month(widget : Et2SelectWidgets) : SelectOption[]
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
|
|
|
return [
|
|
|
|
{value: "1", label: 'January'},
|
|
|
|
{value: "2", label: 'February'},
|
|
|
|
{value: "3", label: 'March'},
|
|
|
|
{value: "4", label: 'April'},
|
|
|
|
{value: "5", label: 'May'},
|
|
|
|
{value: "6", label: 'June'},
|
|
|
|
{value: "7", label: 'July'},
|
|
|
|
{value: "8", label: 'August'},
|
|
|
|
{value: "9", label: 'September'},
|
|
|
|
{value: "10", label: 'October'},
|
|
|
|
{value: "11", label: 'November'},
|
|
|
|
{value: "12", label: 'December'}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
2023-09-13 19:55:33 +02:00
|
|
|
number(widget : Et2SelectWidgets, attrs : NumberOptions = {}) : SelectOption[]
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
2022-06-03 18:18:18 +02:00
|
|
|
|
2023-09-13 19:55:33 +02:00
|
|
|
const options = [];
|
|
|
|
const min = parseFloat(attrs.min ?? widget.min ?? 1);
|
|
|
|
const max = parseFloat(attrs.max ?? widget.max ?? 10);
|
|
|
|
let interval = parseFloat(attrs.interval ?? widget.interval ?? 1);
|
|
|
|
let format = attrs.format ?? '%d';
|
2022-01-13 23:28:52 +01:00
|
|
|
|
|
|
|
// leading zero specified in interval
|
2022-06-03 18:18:18 +02:00
|
|
|
if(widget.leading_zero && widget.leading_zero[0] == '0')
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
|
|
|
format = '%0' + ('' + interval).length + 'd';
|
|
|
|
}
|
|
|
|
// Suffix
|
2022-06-03 18:18:18 +02:00
|
|
|
if(widget.suffix)
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
2022-06-03 18:18:18 +02:00
|
|
|
format += widget.egw().lang(widget.suffix);
|
2022-01-13 23:28:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Avoid infinite loop if interval is the wrong direction
|
|
|
|
if((min <= max) != (interval > 0))
|
|
|
|
{
|
|
|
|
interval = -interval;
|
|
|
|
}
|
|
|
|
|
|
|
|
for(var i = 0, n = min; n <= max && i <= 100; n += interval, ++i)
|
|
|
|
{
|
2022-08-30 22:27:19 +02:00
|
|
|
options.push({value: "" + n, label: sprintf(format, n)});
|
2022-01-13 23:28:52 +01:00
|
|
|
}
|
|
|
|
return options;
|
|
|
|
}
|
|
|
|
|
2023-08-28 21:50:09 +02:00
|
|
|
percent(widget : Et2SelectWidgets) : SelectOption[]
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
2023-09-13 19:55:33 +02:00
|
|
|
return this.number(widget, {min: 0, max: 100, interval: 10, format: "%d%%"});
|
2022-01-13 23:28:52 +01:00
|
|
|
}
|
|
|
|
|
2022-06-10 18:25:31 +02:00
|
|
|
year(widget : Et2SelectWidgets, attrs?) : SelectOption[]
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
2022-06-03 18:18:18 +02:00
|
|
|
if(typeof attrs != 'object')
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
2022-06-03 18:18:18 +02:00
|
|
|
attrs = {}
|
2022-01-13 23:28:52 +01:00
|
|
|
}
|
|
|
|
var t = new Date();
|
2023-09-13 19:55:33 +02:00
|
|
|
attrs.min = t.getFullYear() + parseInt(attrs.min ?? widget.min ?? -3);
|
|
|
|
attrs.max = t.getFullYear() + parseInt(attrs.max ?? widget.max ?? 2);
|
2022-01-13 23:28:52 +01:00
|
|
|
return this.number(widget, attrs);
|
|
|
|
}
|
|
|
|
|
2022-03-16 21:36:23 +01:00
|
|
|
day(widget : Et2SelectWidgets, attrs) : SelectOption[]
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
2023-09-13 19:55:33 +02:00
|
|
|
return this.number(widget, {min: 1, max: 31, interval: 1});
|
2022-01-13 23:28:52 +01:00
|
|
|
}
|
|
|
|
|
2022-03-16 21:36:23 +01:00
|
|
|
hour(widget : Et2SelectWidgets, attrs) : SelectOption[]
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
|
|
|
var options = [];
|
|
|
|
var timeformat = widget.egw().preference('common', 'timeformat');
|
|
|
|
for(var h = 0; h <= 23; ++h)
|
|
|
|
{
|
|
|
|
options.push({
|
2023-08-28 21:50:09 +02:00
|
|
|
value: "" + h,
|
2022-01-13 23:28:52 +01:00
|
|
|
label: timeformat == 12 ?
|
|
|
|
((12 ? h % 12 : 12) + ' ' + (h < 12 ? egw.lang('am') : egw.lang('pm'))) :
|
|
|
|
sprintf('%02d', h)
|
|
|
|
});
|
|
|
|
}
|
|
|
|
return options;
|
|
|
|
}
|
|
|
|
|
2023-08-28 21:50:09 +02:00
|
|
|
app(widget : Et2SelectWidgets | Et2Select, attrs) : Promise<SelectOption[]>
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
|
|
|
var options = ',' + (attrs.other || []).join(',');
|
2023-08-28 21:50:09 +02:00
|
|
|
return this.cached_server_side(widget, 'select-app', options, true);
|
2022-01-13 23:28:52 +01:00
|
|
|
}
|
|
|
|
|
2022-07-07 18:49:28 +02:00
|
|
|
cat(widget : Et2SelectWidgets) : Promise<SelectOption[]>
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
2023-01-11 23:49:56 +01:00
|
|
|
var options = [widget.globalCategories, /*?*/, widget.application, widget.parentCat];
|
2022-06-07 00:09:08 +02:00
|
|
|
|
|
|
|
if(typeof options[3] == 'undefined')
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
2022-06-07 00:09:08 +02:00
|
|
|
options[3] = widget.application ||
|
2022-01-14 17:29:14 +01:00
|
|
|
// When the widget is first created, it doesn't have a parent and can't find it's instanceManager
|
|
|
|
(widget.getInstanceManager() && widget.getInstanceManager().app) ||
|
|
|
|
widget.egw().app_name();
|
2022-01-13 23:28:52 +01:00
|
|
|
}
|
2022-07-07 18:49:28 +02:00
|
|
|
return <Promise<SelectOption[]>>this.cached_server_side(widget, 'select-cat', options.join(','), true);
|
2022-01-13 23:28:52 +01:00
|
|
|
}
|
|
|
|
|
2022-06-20 17:01:28 +02:00
|
|
|
country(widget : Et2SelectWidgets, attrs, return_promise) : SelectOption[]|Promise<SelectOption[]>
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
|
|
|
var options = ',';
|
2022-06-20 17:01:28 +02:00
|
|
|
return this.cached_server_side(widget, 'select-country', options, return_promise);
|
2022-01-13 23:28:52 +01:00
|
|
|
}
|
|
|
|
|
2023-01-11 23:49:56 +01:00
|
|
|
state(widget : Et2SelectWidgets, attrs) : SelectOption[] | Promise<SelectOption[]>
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
|
|
|
var options = attrs.country_code ? attrs.country_code : 'de';
|
2022-01-14 17:29:14 +01:00
|
|
|
return this.cached_server_side(widget, 'select-state', options);
|
2022-01-13 23:28:52 +01:00
|
|
|
}
|
|
|
|
|
2023-03-28 21:48:26 +02:00
|
|
|
dow(widget : Et2SelectWidgets, attrs) : Promise<SelectOption[]>
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
2023-03-30 16:32:26 +02:00
|
|
|
var options = (widget.rows || "") + ',' + (attrs.other || []).join(',');
|
2023-03-28 21:48:26 +02:00
|
|
|
return <Promise<SelectOption[]>>this.cached_server_side(widget, 'select-dow', options, true);
|
2022-01-13 23:28:52 +01:00
|
|
|
}
|
|
|
|
|
2023-01-11 23:49:56 +01:00
|
|
|
lang(widget : Et2SelectWidgets, attrs) : SelectOption[] | Promise<SelectOption[]>
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
|
|
|
var options = ',' + (attrs.other || []).join(',');
|
2022-01-14 17:29:14 +01:00
|
|
|
return this.cached_server_side(widget, 'select-lang', options);
|
2022-01-13 23:28:52 +01:00
|
|
|
}
|
|
|
|
|
2023-09-14 19:48:30 +02:00
|
|
|
timezone(widget : Et2SelectWidgets, attrs) : Promise<SelectOption[]>
|
2022-01-13 23:28:52 +01:00
|
|
|
{
|
|
|
|
var options = ',' + (attrs.other || []).join(',');
|
2023-09-14 19:48:30 +02:00
|
|
|
return <Promise<SelectOption[]>>this.cached_server_side(widget, 'select-timezone', options, true);
|
2022-01-13 23:28:52 +01:00
|
|
|
}
|
2022-03-16 21:36:23 +01:00
|
|
|
}
|