mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 15:33:23 +01:00
Merge branch 'master' into feature/template_webComponent
This commit is contained in:
commit
c113e93656
@ -23,7 +23,7 @@ export interface EgwActionObjectInterface {
|
||||
//properties
|
||||
id?:string
|
||||
_state: number;
|
||||
handlers : { [type : string]? : [{ type : string, listener : Function }] };
|
||||
handlers : { [type : string] : [{ type : string, listener : Function }] };
|
||||
stateChangeCallback: Function;
|
||||
stateChangeContext: any;
|
||||
reconnectActionsCallback: Function;
|
||||
|
@ -55,13 +55,18 @@ export class EgwDragDropShoelaceTree extends egwActionObjectInterface{
|
||||
n.classList.remove("draggedOver", "drop-hover");
|
||||
});
|
||||
target.target.classList.add("draggedOver", "drop-hover");
|
||||
this.timeouts[target.target.id] = setTimeout(() =>
|
||||
|
||||
// Open nodes with children after a wait
|
||||
if(target.target.hasAttribute("lazy") || target.target.querySelector(target.target.nodeName))
|
||||
{
|
||||
if(target.target.classList.contains("draggedOver"))
|
||||
this.timeouts[target.target.id] = setTimeout(() =>
|
||||
{
|
||||
(<SlTreeItem>target.target).expanded = true
|
||||
}
|
||||
}, EXPAND_FOLDER_ON_DRAG_DROP_TIMEOUT)
|
||||
if(target.target.classList.contains("draggedOver"))
|
||||
{
|
||||
(<SlTreeItem>target.target).expanded = true
|
||||
}
|
||||
}, EXPAND_FOLDER_ON_DRAG_DROP_TIMEOUT)
|
||||
}
|
||||
}
|
||||
else if(egw_event == EGW_AI_DRAG_OUT)
|
||||
{
|
||||
|
@ -526,7 +526,8 @@ export class EgwPopupActionImplementation implements EgwActionImplementation {
|
||||
const tree = {"root": []};
|
||||
|
||||
// Automatically add in Drag & Drop actions
|
||||
if (this.auto_paste && !window.egwIsMobile()&& !this._context.event.type.match(/touch/)) {
|
||||
if(this.auto_paste && !window.egwIsMobile() && !this._context.event?.type.match(/touch/))
|
||||
{
|
||||
this._addCopyPaste(_links, _selected);
|
||||
}
|
||||
|
||||
|
@ -388,21 +388,26 @@ export class egwDragAction extends EgwDragAction {
|
||||
};
|
||||
})()
|
||||
|
||||
let _dragActionImpl = null;
|
||||
|
||||
export function getDragImplementation() {
|
||||
if (!_dragActionImpl) {
|
||||
_dragActionImpl = new EgwDragActionImplementation();
|
||||
if(typeof window["_egwActionImpls"] != "object")
|
||||
{
|
||||
window["_egwActionImpls"] = {};
|
||||
}
|
||||
if(!window["_egwActionImpls"]._dragActionImpl)
|
||||
{
|
||||
window["_egwActionImpls"]._dragActionImpl = new EgwDragActionImplementation();
|
||||
}
|
||||
return _dragActionImpl;
|
||||
return window["_egwActionImpls"]._dragActionImpl;
|
||||
}
|
||||
|
||||
|
||||
let _dropActionImpl = null;
|
||||
|
||||
export function getDropImplementation() {
|
||||
if (!_dropActionImpl) {
|
||||
_dropActionImpl = new egwDropActionImplementation();
|
||||
if(typeof window["_egwActionImpls"] != "object")
|
||||
{
|
||||
window["_egwActionImpls"] = {};
|
||||
}
|
||||
if(!window["_egwActionImpls"]._dropActionImpl)
|
||||
{
|
||||
window["_egwActionImpls"]._dropActionImpl = new egwDropActionImplementation();
|
||||
}
|
||||
return _dropActionImpl;
|
||||
return window["_egwActionImpls"]._dropActionImpl;
|
||||
}
|
@ -14,7 +14,6 @@
|
||||
*/
|
||||
|
||||
import {egw_getAppObjectManager, egw_globalObjectManager} from "./egw_action";
|
||||
import {_egw_active_menu} from "./egw_menu";
|
||||
import {
|
||||
EGW_AO_EXEC_SELECTED,
|
||||
EGW_AO_FLAG_DEFAULT_FOCUS,
|
||||
@ -137,9 +136,13 @@ ready(() => {//waits for DOM ready
|
||||
/**
|
||||
* Required to catch the context menu
|
||||
*/
|
||||
jQuery(window).on("contextmenu",document, function(event) {
|
||||
window.addEventListener("contextmenu", function(event)
|
||||
{
|
||||
// Check for actual key press
|
||||
if (!(event.originalEvent.x == 1 && event.originalEvent.y == 1)) return true;
|
||||
if(!(event.x == 1 && event.y == 1))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (!event.ctrlKey && egw_keyHandler(EGW_KEY_MENU, event.shiftKey, event.ctrlKey || event.metaKey, event.altKey))
|
||||
{
|
||||
// If the key handler successfully passed the key event to some
|
||||
@ -148,7 +151,7 @@ jQuery(window).on("contextmenu",document, function(event) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
|
@ -1261,11 +1261,12 @@ export class Et2Email extends Et2InputWidget(LitElement) implements SearchMixinI
|
||||
{
|
||||
const classes = option.class ? Object.fromEntries((option.class).split(" ").map(k => [k, true])) : {};
|
||||
const value = (<string>option.value).replaceAll(" ", "___");
|
||||
const isMobile = typeof egwIsMobile == "function" ? egwIsMobile() : false
|
||||
return html`
|
||||
<sl-option
|
||||
part="option"
|
||||
exportparts="prefix:tag__prefix, suffix:tag__suffix, image"
|
||||
title="${!egwIsMobile() && option.title ? (this.noLang ? option.title : this.egw().lang(option.title)) : nothing}"
|
||||
title="${!isMobile && option.title ? (this.noLang ? option.title : this.egw().lang(option.title)) : nothing}"
|
||||
class=${classMap({
|
||||
...classes
|
||||
})}
|
||||
|
@ -458,6 +458,10 @@ export class Et2SelectDayOfWeekReadonly extends Et2StaticSelectMixin(Et2SelectRe
|
||||
|
||||
getValueAsArray()
|
||||
{
|
||||
if (Array.isArray(this.value))
|
||||
{
|
||||
return this.value;
|
||||
}
|
||||
let expanded_value = [];
|
||||
let int_value = parseInt(this.value);
|
||||
let options = this.select_options;
|
||||
|
@ -23,7 +23,7 @@ import styles from "./Et2Tree.styles";
|
||||
|
||||
export type TreeItemData = SelectOption & {
|
||||
focused?: boolean;
|
||||
// Has children, but they may not be provided in item
|
||||
// Has children, but they may not be provided in children (lazy loaded)
|
||||
child: Boolean | 1,
|
||||
data?: Object,//{sieve:true,...} or {acl:true} or other
|
||||
//this is coming from SelectOption
|
||||
@ -981,8 +981,10 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement) implements Fin
|
||||
//fallback to try and set icon if everything else failed
|
||||
if (!img) img = selectOption.icon ?? selectOption.im0 ?? selectOption.im1 ?? selectOption.im2;
|
||||
|
||||
// lazy iff "child" is set and "item" is empty or item does not exist in the first place
|
||||
const lazy = (selectOption.item?.length === 0 && selectOption.child) || (selectOption.child && !selectOption.item)
|
||||
// lazy iff "child" is set and "children" is empty or children does not exist in the first place
|
||||
const lazy = typeof selectOption.item !== "undefined" ?
|
||||
(selectOption.item?.length === 0 && selectOption.child) || (selectOption.child && !selectOption.item) :
|
||||
(selectOption.children?.length == 0 && selectOption.child);
|
||||
const value = selectOption.value ?? selectOption.id;
|
||||
if(expandState && this.autoloading && lazy)
|
||||
{
|
||||
|
@ -57,6 +57,25 @@ export class CalendarOwner extends Et2StaticSelectMixin(Et2Select)
|
||||
this.searchOptions['checkgrants'] = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Some [part of a] value is missing from the available options, but should be there, so find and add it.
|
||||
*
|
||||
* This is used when not all options are sent to the client (search, link list). Ideally we want to send
|
||||
* the options for the current value, but sometimes this is not the best option so here we search or create
|
||||
* the option as needed. These are not free entries, but need to match some list somewhere.
|
||||
*
|
||||
* @param {string} newValueElement
|
||||
* @protected
|
||||
*/
|
||||
protected _missingOption(newValueElement : string)
|
||||
{
|
||||
// Call ajax_owner
|
||||
return this.egw().request(this.egw().link(this.egw().ajaxUrl(this.egw().decodePath("calendar_owner_etemplate_widget::ajax_owner"))),
|
||||
[newValueElement]).then((results) =>
|
||||
{
|
||||
return this._processResultCount(results);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Override parent to show email address in options
|
||||
*
|
||||
|
@ -1427,9 +1427,10 @@ Hide subsequent headers in week view with non-consolidated owners
|
||||
.calendar_freetime_header { font-size: 120%; font-weight: bold; }
|
||||
.calendar_freetime_timeframe { position: relative;}
|
||||
|
||||
img.calendar_print_button, img.calendar_print_appicon {
|
||||
et2-image.calendar_print_button, et2-appicon.calendar_print_appicon, et2-appicon.calendar_print_appicon img {
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
width: 26px;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
/*Sortable views*/
|
||||
|
@ -1388,10 +1388,12 @@ Hide subsequent headers in week view with non-consolidated owners
|
||||
.calendar_freetime_timeframe {
|
||||
position: relative;
|
||||
}
|
||||
img.calendar_print_button,
|
||||
img.calendar_print_appicon {
|
||||
et2-image.calendar_print_button,
|
||||
et2-appicon.calendar_print_appicon,
|
||||
et2-appicon.calendar_print_appicon img {
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
width: 26px;
|
||||
font-size: 24px;
|
||||
}
|
||||
/*Sortable views*/
|
||||
.srotable_cal_wk_ph {
|
||||
|
@ -4548,7 +4548,7 @@ app.classes.mail = AppJS.extend(
|
||||
// Coming from tree
|
||||
acc_id = parseInt(_senders[0].id);
|
||||
}
|
||||
this.egw.open_link('mail.mail_sieve.editVacation&acc_id=' + acc_id, '_blank', '700x660');
|
||||
this.egw.open_link('mail.mail_sieve.editVacation&acc_id=' + acc_id, '_blank', '700x800');
|
||||
},
|
||||
|
||||
subscription_refresh: function(_data)
|
||||
|
@ -3214,6 +3214,7 @@ div#popupMainDiv {
|
||||
padding: 8px;
|
||||
background-color: #FFFFFF;
|
||||
background-repeat: repeat-x;
|
||||
overflow: auto;
|
||||
}
|
||||
div#popupMainDiv > * {
|
||||
margin: 0px;
|
||||
|
@ -198,7 +198,7 @@ div.flatpickr-calendar .shortcut-buttons-flatpickr-buttons button:last-child {
|
||||
}
|
||||
//end sidebox
|
||||
|
||||
//not et2-select should also have rounded corners
|
||||
//normal select should also have rounded corners
|
||||
select{
|
||||
border-radius: var(--sl-border-radius-medium);
|
||||
}
|
||||
|
@ -3217,6 +3217,7 @@ div#popupMainDiv {
|
||||
padding: 8px;
|
||||
background-color: #FFFFFF;
|
||||
background-repeat: repeat-x;
|
||||
overflow: auto;
|
||||
}
|
||||
div#popupMainDiv > * {
|
||||
margin: 0px;
|
||||
|
@ -3196,6 +3196,7 @@ div#popupMainDiv {
|
||||
padding: 8px;
|
||||
background-color: #FFFFFF;
|
||||
background-repeat: repeat-x;
|
||||
overflow: auto;
|
||||
}
|
||||
div#popupMainDiv > * {
|
||||
margin: 0px;
|
||||
|
@ -3207,6 +3207,7 @@ div#popupMainDiv {
|
||||
padding: 8px;
|
||||
background-color: #FFFFFF;
|
||||
background-repeat: repeat-x;
|
||||
overflow: auto;
|
||||
}
|
||||
div#popupMainDiv > * {
|
||||
margin: 0px;
|
||||
@ -4312,8 +4313,9 @@ body.scrollVertical {
|
||||
font-size: 120%;
|
||||
}
|
||||
#egw_fw_header #egw_fw_topmenu #egw_fw_topmenu_items #rc_status_select {
|
||||
width: 70% !important;
|
||||
width: auto;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
#egw_fw_header #egw_fw_topmenu #egw_fw_topmenu_items #rc_status_select sl-menu-item::part(checked-icon) {
|
||||
border-radius: 50%;
|
||||
|
@ -24,6 +24,7 @@ div#popupMainDiv {
|
||||
padding: 8px;
|
||||
background-color: @gray_0;
|
||||
background-repeat: repeat-x;
|
||||
overflow: auto;//If popup is not big enough make sure we can still reach bottom buttons
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user