Commit 986766b1 authored by Kasper Skårhøj's avatar Kasper Skårhøj
Browse files

* When using frontend editing with pop-up window the save-and-view button will not change focus of the windows but keep the editing window on top while reloading the page for preview behind. (Works in any case editing happens in a pop-up window)


git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@671 709f56b5-9817-0410-a4d7-c38de5d9e867
parent e4bc51eb
2005-04-27 Kasper Skårhøj,,, <kasper@typo3.com>
* When using frontend editing with pop-up window the save-and-view button will not change focus of the windows but keep the editing window on top while reloading the page for preview behind. (Works in any case editing happens in a pop-up window)
2005-04-21 => 04-26 Kasper Skårhøj,,, <kasper@typo3.com>
* Added a runaway brake to t3lib_div::expandList(): Ranges are limited to 1000 values per range.
......
......@@ -2177,9 +2177,10 @@ class t3lib_BEfunc {
* @param string $anchor is optional anchor to the URL
* @param string $altUrl is an alternative URL which - if set - will make all other parameters ignored: The function will just return the window.open command wrapped around this URL!
* @param string Additional GET variables.
* @param boolean If true, then the preview window will gain the focus.
* @return string
*/
function viewOnClick($id,$backPath='',$rootLine='',$anchor='',$altUrl='',$addGetVars='') {
function viewOnClick($id,$backPath='',$rootLine='',$anchor='',$altUrl='',$addGetVars='',$switchFocus=TRUE) {
if ($altUrl) {
$url = $altUrl;
} else {
......@@ -2193,7 +2194,8 @@ class t3lib_BEfunc {
$url = $preUrl.'/index.php?id='.$id.$addGetVars.$anchor;
}
return "previewWin=window.open('".$url."','newTypo3FrontendWindow','status=1,menubar=1,resizable=1,location=1,scrollbars=1,toolbar=1');previewWin.focus();";
return "previewWin=window.open('".$url."','newTypo3FrontendWindow','status=1,menubar=1,resizable=1,location=1,scrollbars=1,toolbar=1');".
($switchFocus ? 'previewWin.focus();' : '');
}
/**
......
......@@ -414,7 +414,13 @@ class SC_alt_doc {
}
return false;
}
'.(isset($_POST['_savedokview_x']) && $this->popViewId ? t3lib_BEfunc::viewOnClick($this->popViewId,'',t3lib_BEfunc::BEgetRootLine($this->popViewId),'',$this->viewUrl,$this->popViewId_addParams) : '')
'.(isset($_POST['_savedokview_x']) && $this->popViewId ?
'if (window.opener) { '.
t3lib_BEfunc::viewOnClick($this->popViewId,'',t3lib_BEfunc::BEgetRootLine($this->popViewId),'',$this->viewUrl,$this->popViewId_addParams,FALSE).
' } else { '.
t3lib_BEfunc::viewOnClick($this->popViewId,'',t3lib_BEfunc::BEgetRootLine($this->popViewId),'',$this->viewUrl,$this->popViewId_addParams).
' } '
: '')
).$this->doc->getDynTabMenuJScode();
// Setting up the context sensitive menu:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment