Swat/SwatSimpleColorEntry.php
protected function getInlineJavaScript()
    {
        $javascript = parent::getInlineJavaScript();

        $colors = "'" . implode("', '", $this->colors) . "'";

        if ($this->none_option) {
            $none_option =
                $this->none_option_title === null
                    ? 'null'
                    : SwatString::quoteJavaScriptString(
                        $this->none_option_title
                    );
        } else {
            $none_option = 'null';
        }

        $js_class_name = $this->getJavaScriptClassName();

        $javascript .=
            "\nvar {$this->id}_obj = new {$js_class_name}(" .
            "'{$this->id}', [{$colors}], {$none_option});\n";

        return $javascript;
    }
protected function getInlineJavaScript()
    {
        $javascript = parent::getInlineJavaScript();

        $colors = "'" . implode("', '", $this->colors) . "'";

        if ($this->none_option) {
            $none_option =
                $this->none_option_title === null
                    ? 'null'
                    : SwatString::quoteJavaScriptString(
                        $this->none_option_title
                    );
        } else {
            $none_option = 'null';
        }

        $js_class_name = $this->getJavaScriptClassName();

        $javascript .=
            "\nvar {$this->id}_obj = new {$js_class_name}(" .
            "'{$this->id}', [{$colors}], {$none_option});\n";

        return $javascript;
    }
protected function getInlineJavaScript ( ) { $ javascript = parent :: getInlineJavaScript ( ) ; $ colors = "'" . implode ( "', '" , $ this -> colors ) . "'" ; if ( $ this -> none_option ) { $ none_option = $ this -> none_option_title === null ? 'null' : SwatString :: quoteJavaScriptString ( $ this -> none_option_title ) ; } else { $ none_option = 'null' ; } $ js_class_name = $ this -> getJavaScriptClassName ( ) ; $ javascript .= "\nvar {$this->id}_obj = new {$js_class_name}(" . "'{$this->id}', [{$colors}], {$none_option});\n" ; return $ javascript ; }
Gets simple color selector inline JavaScript

The JavaScript is the majority of the simple color selector code

@return string simple color selector inline JavaScript.
Gets simple color selector inline JavaScript