Merge remote-tracking branch 'origin/dev' into feature/grid_my_page

pull/6834/head
Jens Ulferts 6 years ago
commit 0c0c2b9e77
No known key found for this signature in database
GPG Key ID: 3CAA4B1182CF5308
  1. 2
      frontend/package.json
  2. 2
      frontend/src/app/components/modals/modal-wrapper/dynamic-content.modal.ts
  3. 4
      frontend/src/app/components/op-context-menu/handlers/op-columns-context-menu.directive.ts
  4. 4
      frontend/src/app/components/op-context-menu/handlers/op-context-menu-trigger.directive.ts
  5. 2
      frontend/src/app/components/op-context-menu/handlers/op-settings-dropdown-menu.directive.ts
  6. 2
      frontend/src/app/components/op-context-menu/handlers/op-types-context-menu.directive.ts
  7. 4
      frontend/src/app/components/op-context-menu/handlers/wp-create-settings-menu.directive.ts
  8. 2
      frontend/src/app/components/op-context-menu/handlers/wp-status-dropdown-menu.directive.ts
  9. 4
      frontend/src/app/components/op-context-menu/op-context-menu-handler.ts
  10. 8
      frontend/src/app/components/op-context-menu/op-context-menu.service.ts
  11. 2
      frontend/src/app/components/op-context-menu/wp-context-menu/wp-single-context-menu.ts
  12. 2
      frontend/src/app/components/op-modals/op-modal.component.ts
  13. 6
      frontend/src/app/components/op-modals/op-modal.service.ts
  14. 2
      frontend/src/app/components/projects/project-menu-autocomplete/project-menu-autocomplete.component.ts
  15. 2
      frontend/src/app/components/resizer/main-menu-toggle.service.ts
  16. 6
      frontend/src/app/components/wp-fast-table/handlers/click-or-enter-handler.ts
  17. 2
      frontend/src/app/components/wp-fast-table/handlers/context-menu/context-menu-handler.ts
  18. 2
      frontend/src/app/components/wp-inline-create/wp-inline-create.component.ts
  19. 2
      frontend/src/app/globals/global-listeners.ts
  20. 2
      frontend/src/app/globals/global-listeners/augmented-date-picker.ts
  21. 2
      frontend/src/app/globals/global-listeners/link-hijacking.ts
  22. 4
      frontend/src/app/modules/common/copy-to-clipboard/copy-to-clipboard.directive.ts
  23. 4
      frontend/src/app/modules/grids/context_menus/column.directive.ts
  24. 4
      frontend/src/app/modules/grids/context_menus/row.directive.ts

@ -117,7 +117,7 @@
"ticky": "^1.0.1",
"ts-loader": "^5.3.1",
"tslib": "^1.9.3",
"typescript": "^3.1.6",
"typescript": "3.1.6",
"ui-select": "~0.19.6",
"url-loader": "^1.1.2",
"webpack-cli": "^3.1.2",

@ -58,7 +58,7 @@ export class DynamicContentModal extends OpModalComponent implements OnInit, OnD
jQuery(document.body)
.on('click.opdynamicmodal',
'.dynamic-content-modal--close-button',
(evt:JQuery.Event) => {
(evt:JQueryEventObject) => {
this.closeMe(evt);
});
}

@ -60,7 +60,7 @@ export class OpColumnsContextMenu extends OpContextMenuTrigger {
super(elementRef, opContextMenu);
}
protected open(evt:JQuery.Event) {
protected open(evt:JQueryEventObject) {
if (!this.table.configuration.columnMenuEnabled) {
return;
}
@ -81,7 +81,7 @@ export class OpColumnsContextMenu extends OpContextMenuTrigger {
*
* @param {Event} openerEvent
*/
public positionArgs(evt:JQuery.Event) {
public positionArgs(evt:JQueryEventObject) {
let additionalPositionArgs = {
of: this.$element.find('.generic-table--sort-header-outer'),
};

@ -19,7 +19,7 @@ export class OpContextMenuTrigger extends OpContextMenuHandler implements AfterV
this.$element = jQuery(this.elementRef.nativeElement);
// Open by clicking the element
this.$element.on('click', (evt:JQuery.Event) => {
this.$element.on('click', (evt:JQueryEventObject) => {
evt.preventDefault();
evt.stopPropagation();
@ -44,7 +44,7 @@ export class OpContextMenuTrigger extends OpContextMenuHandler implements AfterV
*
* @param {Event} openerEvent
*/
public positionArgs(openerEvent:JQuery.Event) {
public positionArgs(openerEvent:JQueryEventObject) {
return {
my: 'left top',
at: 'left bottom',

@ -95,7 +95,7 @@ export class OpSettingsMenuDirective extends OpContextMenuTrigger implements OnD
});
}
protected open(evt:JQuery.Event) {
protected open(evt:JQueryEventObject) {
this.loadingPromise.then(() => {
this.buildItems();
this.opContextMenu.show(this, evt);

@ -73,7 +73,7 @@ export class OpTypesContextMenuDirective extends OpContextMenuTrigger {
.then(types => this.buildItems(types));
}
protected open(evt:JQuery.Event) {
protected open(evt:JQueryEventObject) {
this.loadingPromise.then(() => {
this.opContextMenu.show(this, evt);
});

@ -47,7 +47,7 @@ export class WorkPackageCreateSettingsMenuDirective extends OpContextMenuTrigger
super(elementRef, opContextMenu);
}
protected open(evt:JQuery.Event) {
protected open(evt:JQueryEventObject) {
const wp = this.states.workPackages.get('new').value;
if (wp) {
@ -66,7 +66,7 @@ export class WorkPackageCreateSettingsMenuDirective extends OpContextMenuTrigger
*
* @param {Event} openerEvent
*/
public positionArgs(evt:JQuery.Event) {
public positionArgs(evt:JQueryEventObject) {
let additionalPositionArgs = {
my: 'right top',
at: 'right bottom'

@ -57,7 +57,7 @@ export class WorkPackageStatusDropdownDirective extends OpContextMenuTrigger {
super(elementRef, opContextMenu);
}
protected open(evt:JQuery.Event) {
protected open(evt:JQueryEventObject) {
const changeset = this.wpEditing.changesetFor(this.workPackage);
changeset.getForm().then((form:any) => {

@ -28,7 +28,7 @@ export abstract class OpContextMenuHandler {
*
* @param {Event} openerEvent
*/
public positionArgs(openerEvent:JQuery.Event):any {
public positionArgs(openerEvent:JQueryEventObject):any {
return {
my: 'left top',
at: 'right bottom',
@ -49,7 +49,7 @@ export abstract class OpContextMenuHandler {
/**
* Open this context menu
*/
protected open(evt:JQuery.Event) {
protected open(evt:JQueryEventObject) {
this.opContextMenu.show(this, evt);
}

@ -40,7 +40,7 @@ export class OPContextMenuService {
$transitions.onStart({}, () => this.close());
// Listen to keyups on window to close context menus
jQuery(window).on('keydown', (evt:JQuery.Event) => {
jQuery(window).on('keydown', (evt:JQueryEventObject) => {
if (this.active && evt.which === keyCodes.ESCAPE) {
this.close();
}
@ -49,7 +49,7 @@ export class OPContextMenuService {
});
// Listen to any click and close the active context menu
jQuery(window).on('click', (evt:JQuery.Event) => {
jQuery(window).on('click', (evt:JQueryEventObject) => {
if (this.active && !this.portalHostElement.contains(evt.target as Element)) {
this.close();
}
@ -60,7 +60,7 @@ export class OPContextMenuService {
* Open a ContextMenu reference and append it to the portal
* @param contextMenu A reference to a context menu handler
*/
public show(menu:OpContextMenuHandler, event:JQuery.Event, component:any = OPContextMenuComponent) {
public show(menu:OpContextMenuHandler, event:JQueryEventObject, component:any = OPContextMenuComponent) {
this.close();
// Create a portal for the given component class and render it
@ -97,7 +97,7 @@ export class OPContextMenuService {
this.active = null;
}
public reposition(event:JQuery.Event) {
public reposition(event:JQueryEventObject) {
if (!this.active) {
return;
}

@ -30,7 +30,7 @@ export class WorkPackageSingleContextMenuDirective extends OpContextMenuTrigger
super(elementRef, opContextMenuService);
}
protected open(evt:JQuery.Event) {
protected open(evt:JQueryEventObject) {
this.workPackage.project.$load().then(() => {
this.authorisationService.initModelAuth('work_package', this.workPackage.$links);

@ -44,7 +44,7 @@ export abstract class OpModalComponent implements OnInit, OnDestroy {
return true;
}
public closeMe(evt:JQuery.Event) {
public closeMe(evt:JQueryEventObject) {
this.service.close(evt);
}

@ -37,7 +37,7 @@ export class OpModalService {
document.body.appendChild(hostElement);
// Listen to keyups on window to close context menus
jQuery(window).on('keydown', (evt:JQuery.Event) => {
jQuery(window).on('keydown', (evt:JQueryEventObject) => {
if (this.active && this.active.closeOnEscape && evt.which === keyCodes.ESCAPE) {
this.close(evt);
}
@ -46,7 +46,7 @@ export class OpModalService {
});
// Listen to any click when should close outside modal
jQuery(window).on('click', (evt:JQuery.Event) => {
jQuery(window).on('click', (evt:JQueryEventObject) => {
if (this.active &&
!this.opening &&
this.active.closeOnOutsideClick &&
@ -97,7 +97,7 @@ export class OpModalService {
/**
* Closes currently open modal window
*/
public close(evt?:JQuery.Event) {
public close(evt?:JQueryEventObject) {
// Detach any component currently in the portal
if (this.active && this.active.onClose()) {
this.active.closingEvent.emit(this.active);

@ -273,7 +273,7 @@ export class ProjectMenuAutocompleteComponent extends ILazyAutocompleterBridge<I
// On iOS the click event doesn't get fired. So we need to listen to touch events and discard them if they they
// are the beginning of some scrolling.
.on('touchend', '.ui-menu-item a', function(evt:JQuery.Event) {
.on('touchend', '.ui-menu-item a', function(evt:JQueryEventObject) {
if (!touchMoved) {
window.location.href = (evt.target as HTMLAnchorElement).href;
}

@ -174,7 +174,7 @@ export class MainMenuToggleService {
private setupAutocloseMainMenu():void {
let that = this;
jQuery('#main-menu').off('focusout.main_menu');
jQuery('#main-menu').on('focusout.main_menu', function (event) {
jQuery('#main-menu').on('focusout.main_menu', function (event:JQueryEventObject) {
// Check that main menu is not closed and that the `focusout` event is not a click on an element
// that tries to close the menu anyways.
if (!that.showNavigation || document.getElementById('main-menu-toggle') === event.relatedTarget) {

@ -5,7 +5,7 @@ import {WorkPackageTable} from "../wp-fast-table";
/**
* Execute the callback if the given JQuery Event is either an ENTER key or a click
*/
export function onClickOrEnter(evt:JQuery.Event, callback:() => void) {
export function onClickOrEnter(evt:JQueryEventObject, callback:() => void) {
if (evt.type === 'click' || (evt.type === 'keydown' && evt.which === keyCodes.ENTER)) {
callback();
return false;
@ -16,9 +16,9 @@ export function onClickOrEnter(evt:JQuery.Event, callback:() => void) {
export abstract class ClickOrEnterHandler {
public handleEvent(table:WorkPackageTable, evt:JQuery.Event) {
public handleEvent(table:WorkPackageTable, evt:JQueryEventObject) {
onClickOrEnter(evt, () => this.processEvent(table, evt));
}
protected abstract processEvent(table:WorkPackageTable, evt:JQuery.Event):boolean;
protected abstract processEvent(table:WorkPackageTable, evt:JQueryEventObject):boolean;
}

@ -25,7 +25,7 @@ export abstract class ContextMenuHandler implements TableEventHandler {
return jQuery(table.container);
}
public abstract handleEvent(table:WorkPackageTable, evt:JQuery.Event):boolean;
public abstract handleEvent(table:WorkPackageTable, evt:JQueryEventObject):boolean;
protected openContextMenu(evt:JQueryEventObject, workPackageId:string, positionArgs?:any):void {
const handler = new OpWorkPackageContextMenu(this.injector, this.table, workPackageId, jQuery(evt.target) as JQuery, positionArgs);

@ -148,7 +148,7 @@ export class WorkPackageInlineCreateComponent implements OnInit, OnChanges, OnDe
* which is dynamically inserted into the action row by the inline create renderer.
*/
private registerCancelHandler() {
this.$element.on('click keydown', `.${inlineCreateCancelClassName}`, (evt:JQuery.Event) => {
this.$element.on('click keydown', `.${inlineCreateCancelClassName}`, (evt:JQueryEventObject) => {
onClickOrEnter(evt, () => {
this.resetRow();
});

@ -37,7 +37,7 @@ import {augmentedDatePicker} from "./global-listeners/augmented-date-picker";
$(function() {
$(document.documentElement!)
.on('click', (evt:JQuery.Event) => {
.on('click', (evt:JQueryEventObject) => {
const target = jQuery(evt.target) as JQuery;
// Create datepickers dynamically for Rails-based views

@ -5,7 +5,7 @@
* @param evt
* @param target
*/
export function augmentedDatePicker(evt:JQuery.Event, target:JQuery) {
export function augmentedDatePicker(evt:JQueryEventObject, target:JQuery) {
if (target.hasClass('-augmented-datepicker')) {
target
.attr('autocomplete', 'off') // Disable autocomplete for those fields

@ -5,7 +5,7 @@
* @param evt
* @param target
*/
export function performAnchorHijacking(evt:JQuery.Event, target:JQuery):void {
export function performAnchorHijacking(evt:JQueryEventObject, target:JQuery):void {
// Avoid defaulting clicks on elements already removed from DOM
if (!document.contains(evt.target as Element)) {
evt.preventDefault();

@ -55,7 +55,7 @@ export class CopyToClipboardDirective implements OnInit {
this.clickTarget = element.getAttribute('click-target');
this.clipboardTarget = element.getAttribute('clipboard-target');
jQuery(this.clickTarget).on('click', (evt:JQuery.Event) => this.onClick(evt));
jQuery(this.clickTarget).on('click', (evt:JQueryEventObject) => this.onClick(evt));
element.classList.add('copy-to-clipboard');
this.target = jQuery(this.clipboardTarget ? this.clipboardTarget : element);
@ -71,7 +71,7 @@ export class CopyToClipboardDirective implements OnInit {
}
}
onClick($event:JQuery.Event) {
onClick($event:JQueryEventObject) {
var supported = (document.queryCommandSupported && document.queryCommandSupported('copy'));
$event.preventDefault();

@ -47,7 +47,7 @@ export class GridColumnContextMenu extends OpContextMenuTrigger {
super(elementRef, opContextMenu);
}
protected open(evt:JQuery.Event) {
protected open(evt:JQueryEventObject) {
this.buildItems();
this.opContextMenu.show(this, evt);
}
@ -58,7 +58,7 @@ export class GridColumnContextMenu extends OpContextMenuTrigger {
};
}
public positionArgs(openerEvent:JQuery.Event):any {
public positionArgs(openerEvent:JQueryEventObject):any {
return {
my: 'right top',
at: 'right bottom',

@ -47,7 +47,7 @@ export class GridRowContextMenu extends OpContextMenuTrigger {
super(elementRef, opContextMenu);
}
protected open(evt:JQuery.Event) {
protected open(evt:JQueryEventObject) {
this.buildItems();
this.opContextMenu.show(this, evt);
}
@ -58,7 +58,7 @@ export class GridRowContextMenu extends OpContextMenuTrigger {
};
}
public positionArgs(openerEvent:JQuery.Event):any {
public positionArgs(openerEvent:JQueryEventObject):any {
return {
my: 'left top',
at: 'right top',

Loading…
Cancel
Save