[TYPO3-core] RFC: #6046 requestUpdate does not work on selectboxes (group-fields)

Stephan Petzl spetzl at gmx.at
Sun Oct 28 17:44:45 CET 2007


Ingmar Schlecht schrieb:
> Here are some comments:
>  - Please correct the indentation of the added code in browser_links
>    (tabs instead of spaces)
>  - Add a comment to "if($pArr[8]){" explaining what $pArr[8] is.
> 
OK
> I would prefer the confirm() window to appear on the form instead of
> within the object browser. What do you think about this:
>    p = parent.window.opener;
>    p.setTimeout(\'if(confirm(window.TBE_EDITOR.labels.onChangeAlert) &&
> window.TBE_EDITOR.checkSubmit(-1)){window.TBE_EDITOR.submitForm()}\', 10);

i would not prefer this way. because when you have to add more then one 
record to the group field you have to switch between windows:

1.) open objectbrowser
2.) add record
3.) switch to main window, klick cancel
4.) switch to browser (now in the background) add another record
3.) switch to main window, klick cancel
4.) switch to browser (now in the background) add another record
...

what do you think about that?

> 
> Could you write a new patch (based on latest trunk) taking the above
> comments into account?
> 
yes i would. if everythings clear.

br stef

> cheers
> Ingmar
> 
> 
> Stephan Petzl schrieb:
>> This is an SVN patch request.
>>
>> Type: Bugfix
>>
>> Bugtracker references:
>> http://bugs.typo3.org/view.php?id=6046
>>
>> Branches:
>> Trunk
>>
>> Problem:
>> when i set requestUpdate on group-fields in TCA, i get no page-reload
>> after modifying the input of the field in the BE.
>> RequestUpdate is not passed through to the method "dbFileIcons()" in the
>> file class.t3lib_tceforms.php
>> which renders the selectbox and icons.
>>
>> Solution:
>> 1.) pass the requestUpdate (just like in other fields) through to the
>> render-method (dbFileIcons)
>> This is done by setting the $param['alert'] with javascript for reload
>> in method "getSingleField_typeGroup(...)" before passing this array to
>> "dbFileIcons(...)".
>> 2.) add the javascript to the image-buttons in "dbFileIcons" so that the
>> user is prompted for a page reload.
>> 3.) pass a the flag "$refresh" to the record-browser:
>> $aOnClick='setFormValueOpenBrowser(\''.$mode.'\',\''.($fName.'|||'.$allowed.'|'.$aOnClickInline.'||||'.$refresh).'\');
>> return false;';
>> this tells the recordbrowser if page has to be reloaded after adding
>> records to the field
>> 4.) in class.browse_links.php generate javascript for prompting the user
>> to reload the page (if flag was set in step 3.)
>>
>> Notes:
>> I m not sure about setting the flag in step 3.)
>> the parameters which are passed to setFormValueBrowser are fully
>> undocumented as far as i can see. (why??)
>> added the parameter just at the last position, which is not used till now.
>>
>>
>> Stephan Petzl
>>
>>
> 
> 


More information about the TYPO3-team-core mailing list