<commit_before><?php
    namespace SynergyDataGrid\Grid;

    use SynergyDataGrid\Grid\Column;
    use SynergyDataGrid\Util\ArrayUtils;
    use SynergyDataGrid\Grid\JqGridFactory;
    use Zend\Json\Expr;

    /**203
     *
     * JsCode class is needed to prepare all javascript code for jqGrid plugin
     *
     * @author  <NAME>
     * @package mvcgrid
     */
    class JsCode extends Base
    {
        /**
         * JqGrid instance
         *
         * @var string
         */
        private $grid;

        /**
         * Set up base JsCode options
         *
         * @param JqGridFactory $grid
         */

        public function __construct(JqGridFactory $grid = null)
        {
            $this->grid = $grid;
        }

        /**
         * Add actions column to the grid with base controls (edit or editform, delete)
         *
         * @return void
         */
        public function addActionsColumn()
        {
            $options = $this->grid->getConfig();

            $this->grid->addColumn(
                'Actions',
                array(
                     'name'          => 'myac',
                     'width'         => 120,
                     'fixed'         => true,
                     'sortable'      => false,
                     'resize'        => false,
                     'formatter'     => new Expr('gridUtil.mactions'),
                     'formatoptions' => array(
                         'keys'           => false,
                         'viewbutton'     => $options['nav_grid']['view'],
                         'editbutton'     => $options['nav_grid']['edit'],
                         'editformbutton' => true, //$this->grid->getAllowEditForm(),
                         'delbutton'      => $options['nav_grid']['del'],
                         'delOptions'     => array(
                             'afterSubmit' => new Expr("function(response, postdata) {
                                                    var json = eval('(' + response.responseText + ')');
                                                    return [json.success, json.message];
                                               }                                              ")
                         ),
                         'editOptions'    => $options['edit_parameters'],
                         'onError'        => new Expr("function(rowid,response) {
                                                                    var json = eval('(' + response.responseText + ')');<commit_msg>Fixed bug in formatting row actions<commit_after><?php
    namespace SynergyDataGrid\Grid;

    use SynergyDataGrid\Grid\Column;
    use SynergyDataGrid\Util\ArrayUtils;
    use SynergyDataGrid\Grid\JqGridFactory;
    use Zend\Json\Expr;

    /**203
     *
     * JsCode class is needed to prepare all javascript code for jqGrid plugin
     *
     * @author  <NAME>
     * @package mvcgrid
     */
    class JsCode extends Base
    {
        /**
         * JqGrid instance
         *
         * @var string
         */
        private $grid;

        /**
         * Set up base JsCode options
         *
         * @param JqGridFactory $grid
         */

        public function __construct(JqGridFactory $grid = null)
        {
            $this->grid = $grid;
        }

        /**
         * Add actions column to the grid with base controls (edit or editform, delete)
         *
         * @return void
         */
        public function addActionsColumn()
        {
            $options = $this->grid->getConfig();

            $this->grid->addColumn(
                'Actions',
                array(
                     'name'          => 'myac',
                     'width'         => 120,
                     'fixed'         => true,
                     'sortable'      => false,
                     'resize'        => false,
                     'formatter'     => 'actions',
                     'formatoptions' => array(
                         'keys'           => false,
                         'viewbutton'     => $options['nav_grid']['view'],
                         'editbutton'     => $options['nav_grid']['edit'],
                         'editformbutton' => true, //$this->grid->getAllowEditForm(),
                         'delbutton'      => $options['nav_grid']['del'],
                         'delOptions'     => array(
                             'afterSubmit' => new Expr("function(response, postdata) {
                                                    var json = eval('(' + response.responseText + ')');
                                                    return [json.success, json.message];
                                               }                                              ")
                         ),
                         'editOptions'    => $options['edit_parameters'],
                         'onError'        => new Expr("function(rowid,response) {
                                                                    var json = eval('(' + response.responseText + ')');
{'fraction_non_alphanumeric': 0.10915909988156336, 'fraction_numerical': 0.002368732727990525, 'mean_word_length': 0.9901806755695208, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '347953', 'n_tokens_mistral': 1200, 'n_tokens_neox': 1126, 'n_words': 252}