Index: t3lib/class.t3lib_befunc.php =================================================================== --- t3lib/class.t3lib_befunc.php (revision 7352) +++ t3lib/class.t3lib_befunc.php (working copy) @@ -2660,8 +2660,8 @@ $urlPreviewEnabled = $viewDomain . $viewScriptPreviewEnabled . $id . $addGetVars . $anchor; $urlPreviewDisabled = $viewDomain . $viewScriptPreviewDisabled . $id . $addGetVars . $anchor; - return "previewWin=window.open(top.WorkspaceFrontendPreviewEnabled?'" . - $urlPreviewDisabled . "':'" . $urlPreviewEnabled . + return "var previewWin=window.open(top.TYPO3.configuration.inWorkspace !== 0 && top.TYPO3.configuration.workspaceFrontendPreviewEnabled ?'" . + $urlPreviewEnabled . "':'" . $urlPreviewDisabled . "','newTYPO3frontendWindow');" . ( $switchFocus ? 'previewWin.focus();' : ''); } Index: typo3/backend.php =================================================================== --- typo3/backend.php (revision 7352) +++ typo3/backend.php (working copy) @@ -365,7 +365,8 @@ 'TYPO3_mainDir' => TYPO3_mainDir, 'pageModule' => $pageModule, 'condensedMode' => $GLOBALS['BE_USER']->uc['condensedMode'] ? 1 : 0 , - 'workspaceFrontendPreviewEnabled' => $GLOBALS['BE_USER']->workspace != 0 && !$GLOBALS['BE_USER']->user['workspace_preview'] ? 0 : 1, + 'inWorkspace' => $GLOBALS['BE_USER']->workspace !== 0 ? 1 : 0, + 'workspaceFrontendPreviewEnabled' => $GLOBALS['BE_USER']->user['workspace_preview'] ? 1 : 0, 'veriCode' => $GLOBALS['BE_USER']->veriCode(), 'denyFileTypes' => PHP_EXTENSIONS_DEFAULT, 'moduleMenuWidth' => $this->menuWidth - 1, Index: typo3/js/workspacemenu.js =================================================================== --- typo3/js/workspacemenu.js (revision 7352) +++ typo3/js/workspacemenu.js (working copy) @@ -24,7 +24,7 @@ * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - +Ext.ns('TYPO3', 'TYPO3.configuration'); /** * class to handle the workspace menu * @@ -112,9 +112,11 @@ var stateInactiveIcon = $$('#workspace-selector-menu img.state-inactive')[0].cloneNode(true); if (response.newWorkspacePreviewState == 1) { + TYPO3.configuration.workspaceFrontendPreviewEnabled = 1; Event.element(event).previous().replace(stateActiveIcon); top.WorkspaceFrontendPreviewEnabled = true; } else { + TYPO3.configuration.workspaceFrontendPreviewEnabled = 0; Event.element(event).previous().replace(stateInactiveIcon); top.WorkspaceFrontendPreviewEnabled = false; } @@ -142,6 +144,8 @@ new Ajax.Request('ajax.php', { parameters: 'ajaxID=WorkspaceMenu::setWorkspace&workspaceId=' + workspaceId, onSuccess: function(transport, response) { + TYPO3.configuration.inWorkspace = response.setWorkspaceId === 0 ? 0 : 1; + // first remove all checks, then set the check in front of the selected workspace var stateActiveIcon = $$('#workspace-selector-menu img.state-active')[0].cloneNode(true); var stateInactiveIcon = $$('#workspace-selector-menu img.state-inactive')[0].cloneNode(true);