Project

General

Profile

Bug #12076 ยป 12076.patch

Tolleiv Nietsch, 2011-01-11 14:50

View differences:

Classes/Controller/PreviewController.php (working copy)
$wsSettingsParams = '&tx_workspaces_web_workspacesworkspaces[controller]=Review';
$wsSettingsUrl = $wsSettingsPath . $wsSettingsUri . $wsSettingsParams;
$wsHelpUri = $uriBuilder->uriFor('help', array(), $this, 'workspaces', 'web_workspacesworkspaces');
$wsHelpParams = '&tx_workspaces_web_workspacesworkspaces[controller]=Preview';
$wsHelpUrl = $wsSettingsPath . $wsHelpUri . $wsHelpParams;
$viewDomain = t3lib_BEfunc::getViewDomain($this->pageId);
$wsBaseUrl = $viewDomain . '/index.php?id=' . $this->pageId . '&L=' . $language;
......
}
$this->view->assign('wsUrl', $wsBaseUrl . '&ADMCMD_view=1&ADMCMD_editIcons=1&ADMCMD_previewWS=' . $GLOBALS['BE_USER']->workspace);
$this->view->assign('wsSettingsUrl', $wsSettingsUrl);
$this->view->assign('wsHelpUrl', $wsHelpUrl);
$this->view->assign('backendDomain', t3lib_div::getIndpEnv('TYPO3_HOST_ONLY'));
$GLOBALS['BE_USER']->setAndSaveSessionData('workspaces.backend_domain', t3lib_div::getIndpEnv('TYPO3_HOST_ONLY'));
$this->pageRenderer->addJsInlineCode("workspaces.preview.lll" , "TYPO3.LLL.Workspaces = {
visualPreview: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.visualPreview', true) . "',
listView: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.listView', true) . "',
helpView: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.helpView', true) . "',
livePreview: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.livePreview', true) . "',
workspacePreview: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.workspacePreview', true) . "'
};\n");
......
/**
* @return void
*/
public function helpAction() {
// @todo Implement this action
}
/**
* @return void
*/
public function newPageAction() {
$message = t3lib_div::makeInstance(
't3lib_FlashMessage',
ext_tables.php (working copy)
array(
// An array holding the controller-action-combinations that are accessible
'Review' => 'index,fullIndex,singleIndex',
'Preview' => 'index,help,newPage'
'Preview' => 'index,newPage'
),
array(
'access' => 'user,group',
Resources/Private/Language/locallang.xml (working copy)
<label index="info.newpage.detail">The previewed page has been created in a workspace and has no live counterpart.</label>
<label index="preview.visualPreview">Visual preview</label>
<label index="preview.listView">List view</label>
<label index="preview.helpView">Help</label>
<label index="preview.livePreview">Live</label>
<label index="preview.workspacePreview">Workspace</label>
</languageKey>
Resources/Private/Layouts/popup.html (working copy)
var liveUrl = '{liveUrl}';
var wsUrl = '{wsUrl}';
var wsSettingsUrl = '{wsSettingsUrl}';
var wsHelpUrl = '{wsHelpUrl}';
document.domain = '{backendDomain}';
function resize(height) {
// poor way to avoid that we require any scrollbars within the frames
// poor way to avoid that we require any scrollbars within the frames
var finalHeight = height * 1.1;
Ext.getCmp('visualPanel').setHeight(finalHeight);
Ext.getCmp('wsPanel').setHeight(finalHeight);
Resources/Public/JavaScript/preview.js (working copy)
doMask: false,
src: wsSettingsUrl
}]
},{
title: TYPO3.LLL.Workspaces.helpView,
id: 'wsHelp',
layout: 'fit',
items: [{
xtype: 'iframePanel',
id: 'settingsPanel',
doMask: false,
src: wsHelpUrl
}]
}]
}]
});
    (1-1/1)