protected function getInlineJavaScript()
    {
        $javascript = '';

        foreach ($this->fields as $field) {
            $field_javascript = $field->getRendererInlineJavaScript();
            if ($field_javascript != '') {
                $javascript .= "\n" . $field_javascript;
            }
        }

        foreach ($this->fields as $field) {
            $field_javascript = $field->getInlineJavaScript();
            if ($field_javascript != '') {
                $javascript .= "\n" . $field_javascript;
            }
        }

        return $javascript;
    }