And I've also wrote JFormFieldModalImage class on JFormFieldModal
basis.
This is a class for getting image's URLs from the com_media.
Here is it:
File: http://zool.in.ua/shooting_range/jformfieldmodal/modalimage.php.gz
I'm planning to rewrite all form fields that use modal window in such
a
way that they will be using JFormFieldModal class as a parent.
Please, take a look on the classes. How you like this idea at
overall?
Try to use them in real forms.
Try to create subclasses.
Ask me for more information about using JFormFieldModal. This will
lead to
creating better documentation (also I'm planning to create a
tutorial).
If you will second this classes then I'll create a bugtracker item
with
this classes attached to it.
= = = = = = = = = = = = = = =
PS:
A passage from the JFormFieldModal's documentation:
Generic form field class to get values from another application's
modal window and put them into some input field.
You can use any input field, but by default we use "text" input (see
getSuccessCtrl method).
This form field can handle all circumstances in which we need to
receive a value for a field from an another application (e.g.
com_media, com_users, com_content or even some custom script).
You can extend this class for more convenient handling of a concrete
application.
Main philosophy of this class is the "javascript partners" of fields.
Each PHP-object of this classes' family has corresponding JavaScript-
object for client-side handling. And when you create a PHP child
class
then this class automatically creates JavaScript child class for you
and you can extend this JavaScript-class (mainly by using
getJsPreInsType and getJsPostInsType methods). Also you can execute
custom javascript-code for each object (just use preinsert and
postinsert child elements of a form element).
If you want to use this class for existing applications which are not
aware of javascript partner objects, then you can use javascript
proxy
function for this task (see $jsProxyFuncName, $jsProxyFuncArgs and
getJsProxyFunc()).