[TYPO3-dev] A small frontend editing issue - DIRTY SOLUTION BUT SOLVED!
tapio
tapio.markula at dnainternet.net
Thu Jan 5 19:41:40 CET 2006
tapio wrote:
> Martin Kutschker wrote:
>
>> tapio schrieb:
>>
>>>
>>> Thanks. I'll put this in 'tm_contentaccess'. Someone should add that
>>> also to the core. When using close and save and close buttons, it
>>> would be nice if the opener window would be updated.
>>> Endeed if nothing has been changed it is not necessary.
>>> Extra check would be good.
>>>
>>> Maybe I should make a bug report about this issue?
>>
>>
>>
>> Yes.
>>
>> Masi
>
>
> ok. I could suggest a patch. One question.
> What is should put as condition to test
> in alt_doc.php
>
> to test, if
>
> admPanel.module.edit.forceNoPopup = 0
>
> If that is '0' and the situation, where alt_doc.php has
> been used is frontend eding certain buttons gets
>
> $panel .= $reloadOpener;
>
> Where
>
> $reloadOpener = ' onclick="window.opener.location.reload(true);"';
>
> I have already tested if, the mode if FE or BE using
>
> isset($_GET['noView'])
>
> THAT feature must also be.
>
> corresponding test for
>
> mod.xMOD_alt_doc.disableDocSelector=0
> if(... && $this->modTSconfig['properties']['disableDocSelector']==0)
>
> or if(... && !$this->modTSconfig['properties']['disableDocSelector'])
DIRTY SOLUTION
1) I put desired variable as temporary variable:
$noPopUp=$GLOBALS['BE_USER']->extAdminConfig['module.']['edit.']['forceNoPopup'];
2) I send that value as $_GET-varialbe $_GET['forceNoPopup']
3) I take $_GET['forceNoPopup'] back in alt_doc.php
4) I put $_GET['forceNoPopup'] as value of $noPopUp
5) I use $noPopUp as condition if ($noPopUp==0) $toolBar .= $newWindow;
Now if admPanel.module.edit.forceNoPopup = 0, then toolbar icons
open to a new window, where 'Save' and 'Save and Close' buttons reload
the opener window.
Works fine even if is a little bit dirty solution and the size
of the window is not them same as opening a new window using JS.
Can someone else create a smarter solution?
Could this solution works as a patch example?
More information about the TYPO3-dev
mailing list