Skip to content

Commit

Permalink
[TASK] Migrate ModuleMenu to TypeScript
Browse files Browse the repository at this point in the history
This commit migrates the ModuleMenu to TypeScript. The following changes
are additionally done with with patch:

- NavigationComponentInterface requires a `initialize()` method
- Storage/Persistent.set() accepts objects as value
- ModuleMenu.App.ensurePageInTreeSelected is broken since #82426
  and has been removed

Resolves: #82597
Releases: master
Change-Id: I1dc8a79f7953a1e2504b0e7fd978c2e841ec93f4
Reviewed-on: https://review.typo3.org/56000
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
  • Loading branch information
andreaskienast authored and bmack committed Mar 8, 2018
1 parent ea40605 commit cd694a8
Show file tree
Hide file tree
Showing 9 changed files with 463 additions and 426 deletions.
6 changes: 6 additions & 0 deletions Build/types/TYPO3/index.d.ts
Expand Up @@ -24,6 +24,7 @@ declare namespace TYPO3 {
export class FormEngineValidation {
public readonly errorClass: string;
}

export class FormEngine {
public readonly Validation: FormEngineValidation;
}
Expand Down Expand Up @@ -51,12 +52,17 @@ declare module 'TYPO3/CMS/Backend/FormEngine' {
interface Window {
TYPO3: any;
$: any;
startInModule: Array<string>;
inline: {
delayedImportElement: (objectId: number, table: string, uid: number, type: string) => void
};
rawurlencode: Function;
list_frame: Window;
jump: Function;
currentSubScript: string;
currentModuleLoaded: string;
fsMod: { [key: string]: any };
nextLoadModuleUrl: string;
}

/**
Expand Down
Expand Up @@ -14,6 +14,7 @@
import * as $ from 'jquery';
import InfoWindow = require('./InfoWindow');
import Modal = require('./Modal');
import ModuleMenu = require('./ModuleMenu');
import Severity = require('./Severity');
import Viewport = require('./Viewport');

Expand Down Expand Up @@ -116,7 +117,7 @@ class ContextMenuActions {
*/
public static openListModule(table: string, uid: number): void {
const pageId = table === 'pages' ? uid : $(this).data('page-uid');
top.TYPO3.ModuleMenu.App.showModule('web_list', 'id=' + pageId);
ModuleMenu.App.showModule('web_list', 'id=' + pageId);
}

/**
Expand Down

0 comments on commit cd694a8

Please sign in to comment.