Issue Bug Closed

#65794Workspaces - Preview "list view" doesn't work

Kay no-lastname-given 03/17/15, 18:01 updated 12/18/15, 16:25

Description

In the preview the “list view”-Tab does not work. The reason is that the TYPO3.Workspaces.Tabs could not be rendered, so a javascript-error occurs.

        TYPO3.Workspaces.Tabs = new Ext.Panel({
            renderTo: 'workspacetabs',
            autoWidth: true,
            layout: 'fit',
            items: [
                {
                    xtype: 'WorkspacesTabPanel',
                    unstyled: true,
                    items: TYPO3.settings.Workspaces.workspaceTabs,
                    activeTab: 'workspace-' + TYPO3.settings.Workspaces.activeWorkspaceId
                }
            ]
        });
In the Nodoc.html or SingleIndex.html, the element ‘
‘ does not exist.
This is right, because the tabs should not render in this list. So you have to check if the element exists.
    // only is '<div id="workspacetabs"></div>' is set
    if(Ext.get('workspacetabs')) {
        TYPO3.Workspaces.Tabs = new Ext.Panel({
            renderTo: 'workspacetabs',
            autoWidth: true,
            layout: 'fit',
            items: [
                {
                    xtype: 'WorkspacesTabPanel',
                    unstyled: true,
                    items: TYPO3.settings.Workspaces.workspaceTabs,
                    activeTab: 'workspace-' + TYPO3.settings.Workspaces.activeWorkspaceId
                }
            ]
        });
    }

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.