Swat/SwatTableViewInputRow.php
public function getInlineJavaScript()
    {
        /*
         * Encode row string
         *
         * Mimize entities so that we do not have to specify a DTD when parsing
         * the final XML string. If we specify a DTD, Internet Explorer takes a
         * long time to strictly parse everything. If we do not specify a DTD
         * and try to parse the final XML string with XHTML entities in it we
         * get an undefined entity error.
         */
        $row_string = $this->getRowString();
        // these entities need to be double escaped
        $row_string = str_replace('&amp;', '&amp;amp;', $row_string);
        $row_string = str_replace('&quot;', '&amp;quot;', $row_string);
        $row_string = str_replace('&lt;', '&amp;lt;', $row_string);
        $row_string = SwatString::minimizeEntities($row_string);
        $row_string = str_replace("'", "\'", $row_string);

        // encode newlines for JavaScript string
        $row_string = str_replace("\n", '\n', $row_string);

        return sprintf(
            "var %s_obj = new SwatTableViewInputRow('%s', '%s');",
            $this->getId(),
            $this->getId(),
            trim($row_string)
        );
    }
public function getInlineJavaScript()
    {
        /*
         * Encode row string
         *
         * Mimize entities so that we do not have to specify a DTD when parsing
         * the final XML string. If we specify a DTD, Internet Explorer takes a
         * long time to strictly parse everything. If we do not specify a DTD
         * and try to parse the final XML string with XHTML entities in it we
         * get an undefined entity error.
         */
        $row_string = $this->getRowString();
        // these entities need to be double escaped
        $row_string = str_replace('&amp;', '&amp;amp;', $row_string);
        $row_string = str_replace('&quot;', '&amp;quot;', $row_string);
        $row_string = str_replace('&lt;', '&amp;lt;', $row_string);
        $row_string = SwatString::minimizeEntities($row_string);
        $row_string = str_replace("'", "\'", $row_string);

        // encode newlines for JavaScript string
        $row_string = str_replace("\n", '\n', $row_string);

        return sprintf(
            "var %s_obj = new SwatTableViewInputRow('%s', '%s');",
            $this->getId(),
            $this->getId(),
            trim($row_string)
        );
    }
public function getInlineJavaScript ( ) { /*
         * Encode row string
         *
         * Mimize entities so that we do not have to specify a DTD when parsing
         * the final XML string. If we specify a DTD, Internet Explorer takes a
         * long time to strictly parse everything. If we do not specify a DTD
         * and try to parse the final XML string with XHTML entities in it we
         * get an undefined entity error.
         */ $ row_string = $ this -> getRowString ( ) ; // these entities need to be double escaped $ row_string = str_replace ( '&amp;' , '&amp;amp;' , $ row_string ) ; $ row_string = str_replace ( '&quot;' , '&amp;quot;' , $ row_string ) ; $ row_string = str_replace ( '&lt;' , '&amp;lt;' , $ row_string ) ; $ row_string = SwatString :: minimizeEntities ( $ row_string ) ; $ row_string = str_replace ( "'" , "\'" , $ row_string ) ; // encode newlines for JavaScript string $ row_string = str_replace ( "\n" , '\n' , $ row_string ) ; return sprintf ( "var %s_obj = new SwatTableViewInputRow('%s', '%s');" , $ this -> getId ( ) , $ this -> getId ( ) , trim ( $ row_string ) ) ; }
Creates a JavaScript object to control the client behaviour of this
input row

@return string the inline JavaScript required by this row.
Creates a JavaScript object to control the client behaviour of this input row