diff --git a/api/js/etemplate/Et2Select/Select/Et2SelectAccess.ts b/api/js/etemplate/Et2Select/Select/Et2SelectAccess.ts new file mode 100644 index 0000000000..bee4f00155 --- /dev/null +++ b/api/js/etemplate/Et2Select/Select/Et2SelectAccess.ts @@ -0,0 +1,14 @@ +import {Et2Select} from "../Et2Select"; +import {Et2StaticSelectMixin, StaticOptions} from "../StaticOptions"; + +export class Et2SelectAccess extends Et2StaticSelectMixin(Et2Select) +{ + constructor() + { + super(); + + this._static_options = StaticOptions.access(this); + } +} + +customElements.define("et2-select-access", Et2SelectAccess); diff --git a/api/js/etemplate/Et2Select/SelectTypes.ts b/api/js/etemplate/Et2Select/SelectTypes.ts index ab23cdb7f8..c4ca99671d 100644 --- a/api/js/etemplate/Et2Select/SelectTypes.ts +++ b/api/js/etemplate/Et2Select/SelectTypes.ts @@ -2,6 +2,7 @@ * Import all our sub-types */ +import './Select/Et2SelectAccess'; import './Select/Et2SelectAccount'; import './Select/Et2SelectApp'; import './Select/Et2SelectBitwise'; diff --git a/api/js/etemplate/Et2Select/StaticOptions.ts b/api/js/etemplate/Et2Select/StaticOptions.ts index c59b60c664..e956dde47c 100644 --- a/api/js/etemplate/Et2Select/StaticOptions.ts +++ b/api/js/etemplate/Et2Select/StaticOptions.ts @@ -379,6 +379,15 @@ export const StaticOptions = new class StaticOptionsType return this.cached_server_side(widget, 'select-app', options, true); } + access(widget : Et2SelectWidgets) : SelectOption[] + { + return [ + {value: "private", label: "Private"}, + {value: "public", label: "Global public"}, + {value: "group", label: "Group public"} + ]; + } + cat(widget : Et2SelectWidgets) : Promise { var options = [widget.globalCategories, /*?*/, widget.application, widget.parentCat];