mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:05:16 +01:00
fixing the fix, missed the camelCase of Et2Checkbox and changed Et2Checkbox so IDE can check it
This commit is contained in:
parent
7f92a44dce
commit
ca2d82b32d
@ -14,6 +14,7 @@ import {Et2InputWidget} from "../Et2InputWidget/Et2InputWidget";
|
||||
import '../Et2Image/Et2Image';
|
||||
import {SlCheckbox} from "@shoelace-style/shoelace";
|
||||
import shoelace from "../Styles/shoelace";
|
||||
import {property} from "lit/decorators/property.js";
|
||||
|
||||
export class Et2Checkbox extends Et2InputWidget(SlCheckbox)
|
||||
{
|
||||
@ -59,31 +60,21 @@ export class Et2Checkbox extends Et2InputWidget(SlCheckbox)
|
||||
];
|
||||
}
|
||||
|
||||
static get properties()
|
||||
{
|
||||
return {
|
||||
...super.properties,
|
||||
/* Different value when checked */
|
||||
selectedValue: {type: String},
|
||||
/* Different value when unchecked */
|
||||
unselectedValue: {type: String}
|
||||
}
|
||||
}
|
||||
@property({type: String})
|
||||
selectedValue = 'true';
|
||||
@property({type: String})
|
||||
unselectedValue = '';
|
||||
|
||||
constructor()
|
||||
{
|
||||
super();
|
||||
|
||||
this.isSlComponent = true;
|
||||
|
||||
this.selectedValue = 'true';
|
||||
this.unselectedValue = '';
|
||||
}
|
||||
|
||||
connectedCallback()
|
||||
{
|
||||
super.connectedCallback();
|
||||
|
||||
}
|
||||
|
||||
get label()
|
||||
|
@ -22,7 +22,7 @@ import {egw, IegwAppLocal} from "../jsapi/egw_global";
|
||||
import {et2_cloneObject, et2_csvSplit} from "./et2_core_common";
|
||||
import {et2_compileLegacyJS} from "./et2_core_legacyJSFunctions";
|
||||
import {et2_IDOMNode, et2_IInputNode} from "./et2_core_interfaces";
|
||||
import {loadWebComponent} from "./Et2Widget/Et2Widget";
|
||||
import {loadWebComponent,Et2Widget} from "./Et2Widget/Et2Widget";
|
||||
// fixing circular dependencies by only importing type
|
||||
import type {et2_container} from "./et2_core_baseWidget";
|
||||
import type {et2_inputWidget} from "./et2_core_inputWidget";
|
||||
@ -460,7 +460,7 @@ export class et2_widget extends ClassWithAttributes
|
||||
*
|
||||
* @param _id is the id you're searching for
|
||||
*/
|
||||
getWidgetById(_id): et2_widget | null
|
||||
getWidgetById(_id): Et2Widget | et2_widget | null
|
||||
{
|
||||
if (this.id == _id)
|
||||
{
|
||||
@ -480,7 +480,7 @@ export class et2_widget extends ClassWithAttributes
|
||||
if (this.id && _id.indexOf('[') > -1 && this._children.length)
|
||||
{
|
||||
var ids = (new et2_arrayMgr()).explodeKey(_id);
|
||||
var widget: et2_widget = this;
|
||||
var widget: Et2Widget | et2_widget = this;
|
||||
for (var i = 0; i < ids.length && widget !== null; i++)
|
||||
{
|
||||
widget = widget.getWidgetById(ids[i]);
|
||||
|
@ -37,14 +37,11 @@ import {et2_selectbox} from "../../api/js/etemplate/et2_widget_selectbox";
|
||||
import {et2_widget} from "../../api/js/etemplate/et2_core_widget";
|
||||
import {et2_nextmatch} from "../../api/js/etemplate/et2_extension_nextmatch";
|
||||
import {et2_iframe} from "../../api/js/etemplate/et2_widget_iframe";
|
||||
// @ts-ignore
|
||||
import {date} from "../../api/js/etemplate/lib/date.js";
|
||||
import {sprintf} from "../../api/js/egw_action/egw_action_common";
|
||||
import {egw_registerGlobalShortcut, egw_unregisterGlobalShortcut} from "../../api/js/egw_action/egw_keymanager";
|
||||
import {egw, egw_getFramework} from "../../api/js/jsapi/egw_global";
|
||||
import {et2_number} from "../../api/js/etemplate/et2_widget_number";
|
||||
import {et2_template} from "../../api/js/etemplate/et2_widget_template";
|
||||
import {et2_checkbox} from "../../api/js/etemplate/et2_widget_checkbox";
|
||||
import {et2_grid} from "../../api/js/etemplate/et2_widget_grid";
|
||||
import {Et2Textbox} from "../../api/js/etemplate/Et2Textbox/Et2Textbox";
|
||||
import "./SidemenuDate";
|
||||
@ -59,6 +56,7 @@ import {et2_IInput} from "../../api/js/etemplate/et2_core_interfaces";
|
||||
import {Et2DateTime} from "../../api/js/etemplate/Et2Date/Et2DateTime";
|
||||
import {Et2Select} from "../../api/js/etemplate/Et2Select/Et2Select";
|
||||
import type {SelectOption} from "../../api/js/etemplate/Et2Select/FindSelectOptions";
|
||||
import type {Et2Checkbox} from "../../api/js/etemplate/Et2Checkbox/Et2Checkbox";
|
||||
|
||||
/**
|
||||
* UI for calendar
|
||||
@ -2245,14 +2243,14 @@ export class CalendarApp extends EgwApp
|
||||
*/
|
||||
move_edit_series(_DOM,_button)
|
||||
{
|
||||
var content : any = this.et2.getArrayMgr('content').data;
|
||||
var start_date = this.et2.getValueById('start');
|
||||
var end_date = this.et2.getValueById('end');
|
||||
var whole_day = <et2_checkbox> this.et2.getWidgetById('whole_day');
|
||||
var duration = ''+this.et2.getValueById('duration');
|
||||
var is_whole_day = whole_day && whole_day.value == whole_day.selected_value;
|
||||
var button = _button;
|
||||
var that = this;
|
||||
const content : any = this.et2.getArrayMgr('content').data;
|
||||
const start_date = this.et2.getValueById('start');
|
||||
const end_date = this.et2.getValueById('end');
|
||||
const whole_day = <Et2Checkbox>this.et2.getWidgetById('whole_day');
|
||||
const duration = ''+this.et2.getValueById('duration');
|
||||
const is_whole_day = whole_day && whole_day.value == whole_day.selectedValue;
|
||||
const button = _button;
|
||||
const that = this;
|
||||
|
||||
let instance_date_regex = window.location.search.match(/date=(\d{4}-\d{2}-\d{2}(?:.+Z)?)/);
|
||||
let instance_date;
|
||||
@ -4246,7 +4244,7 @@ export class CalendarApp extends EgwApp
|
||||
{
|
||||
if (content.grid[i] != null)
|
||||
{
|
||||
checkbox = <et2_checkbox> this.et2.getWidgetById(i+'[enable]');
|
||||
checkbox = <Et2Checkbox>this.et2.getWidgetById(i+'[enable]');
|
||||
if (checkbox)
|
||||
{
|
||||
checkbox.set_value(_widget.checked);
|
||||
@ -4284,7 +4282,7 @@ export class CalendarApp extends EgwApp
|
||||
*/
|
||||
public videoconferenceOnChange(event)
|
||||
{
|
||||
let widget = <et2_checkbox> this.et2.getWidgetById('videoconference');
|
||||
let widget = <Et2Checkbox>this.et2.getWidgetById('videoconference');
|
||||
|
||||
if (widget && widget.get_value())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user