Ejemplo n.º 1
0
        var currentShown = null;
        $("#' . $field->getAttribute('id') . '").change(function(){
            if(currentShown) currentShown.hide();

            var effectParamsId = "#rex-rex_effect_"+ jQuery(this).val();
            currentShown = $(effectParamsId);
            currentShown.show();
        }).change();
    })(jQuery);

    //--></script>';
    // effect parameters
    $fieldContainer = $form->addContainerField('parameters');
    $fieldContainer->setAttribute('style', 'display: none');
    $fieldContainer->setSuffix($script);
    $effects = rex_media_manager::getSupportedEffects();
    foreach ($effects as $effectClass => $effectFile) {
        require_once $effectFile;
        $effectObj = new $effectClass();
        $effectParams = $effectObj->getParams();
        $group = $effectClass;
        if (empty($effectParams)) {
            continue;
        }
        foreach ($effectParams as $param) {
            $name = $effectClass . '_' . $param['name'];
            $value = isset($param['default']) ? $param['default'] : null;
            $attributes = [];
            if (isset($param['attributes'])) {
                $attributes = $param['attributes'];
            }