<commit_before>define(function (require) {
    'use strict';

    if (location.pathname.split('/').indexOf('search') !== -1) {
        var commonSearchBooleans = require('./../commonSearchBooleans');
        return function (options, onLoad) {
            $.extend(options, {
                header: MetkaJS.L10N.get('type.SERIES.search'),
                fieldTitles: {
                    "id": {
                        "title" : "ID"
                    },
                    "seriesabbr": {
                        "title" : "Lyhenne"
                    },
                    "seriesname": {
                        "title" : "Nimi"
                    },
                    "state": {
                        "title" : "Tila"
                    }
                },
                content: [
                    {
                        "type": "COLUMN",
                        "columns": 3,
                        "rows": [
                            {
                                "type": "ROW",
                                "cells": [
                                    {
                                        "type": "CELL",
                                        "title": "ID",
                                        "colspan": 2,
                                        "field": {
                                            "displayType": "INTEGER",
                                            "key": "key.id"
                                        }
                                    },
                                    commonSearchBooleans.cells.approved
                                ]
                            },
                            {
                                "type": "ROW",
                                "cells": [
                                    {
                                        "type": "CELL",
                                        "title": "Lyhenne",
                                        "colspan": 2,
                                        "field": {
                                            "displayType": "SELECTION",
                                            "key": "seriesabbr"
                                        },
                                        create: function () {
                                            var $input = $(this).find('select');
                                            require('./../server')('/series/getAbbreviations', {
                                                method: 'GET',
                                                success: function (data) {
                                                    if (data.abbreviations) {
                                                        $input.append(data.abbreviations.map(function (option) {
                                                            return $('<option>')
                                                                .val(option)
                                                                .text(option);
                                                        }));
                                                    }
                                                }<commit_msg>try to add reference options request and remove custom "getAbbreviations" request<commit_after>define(function (require) {
    'use strict';

    if (location.pathname.split('/').indexOf('search') !== -1) {
        var commonSearchBooleans = require('./../commonSearchBooleans');
        return function (options, onLoad) {
            $.extend(/*true, */options, {
                header: MetkaJS.L10N.get('type.SERIES.search'),
                // TODO: try to add reference options request and remove custom "getAbbreviations" request
                /*dataConf: {
                    key: {
                        version: 1,
                        type: 'SERIES'
                    },
                    selectionLists: {
                        seriesabbr_list: {
                            key: 'seriesabbr_list',
                            type: 'REFERENCE',
                            refenence: 'seriesabbr_ref'
                        }
                    },
                    references: {
                        seriesabbr_ref: {
                             key: 'seriesabbr_ref',
                             type: 'REVISIONABLE',
                             target: 'SERIES',
                             valuePath: 'seriesabbr'
                         }
                    },
                    fields: {
                        seriesabbr: {
                            key: 'seriesabbr',
                            type: 'SELECTION',
                            selectionList: 'seriesabbr_list'
                        }
                    }
                },*/
                fieldTitles: {
                    "id": {
                        "title" : "ID"
                    },
                    "seriesabbr": {
                        "title" : "Lyhenne"
                    },
                    "seriesname": {
                        "title" : "Nimi"
                    },
                    "state": {
                        "title" : "Tila"
                    }
                },
                content: [
                    {
                        "type": "COLUMN",
                        "columns": 3,
                        "rows": [
                            {
                                "type": "ROW",
                                "cells": [
                                    {
                                        "type": "CELL",
                                        "title": "ID",
                                        "colspan": 2,
                                        "field": {
                                            "displayType": "INTEGER",
                                            "key": "key.id"
                                        }
                                    },
                                    commonSearchBooleans.cells.approved
                                ]
                            },
                            {
                                "type": "ROW",
                                "cells": [
                                    {
                                        "type": "CELL",
                                        "title": "Lyhenne",
                                        "colspan": 2,
                                        /*"field": {
                                            "key": "seriesabbr"
                                        },*/
                                        "field": {
                                            "displayType": "SELECTION",
                                            "key": "seriesabbr"
                                        },
                                        create: function () {
                                            var $input = $(this).find('select');
                                            require('./../server')('/series/getAbbreviations', {
                                                method: 'GET',
                                                success: function (data) {
                                                    if (data.abbreviations) {
                                                        $input.append(data.abbreviations.map(function (option) {
                                                            return $('<option>')
                                                                .val(option)
                                                                .text(option);
                                                        }));
                                                    }
                                                }
{'fraction_non_alphanumeric': 0.08768561187916027, 'fraction_numerical': 0.0016641065028161802, 'mean_word_length': 0.44819277108433736, 'pattern_counts': {'":': 48, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 98, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3016918', 'n_tokens_mistral': 1356, 'n_tokens_neox': 1239, 'n_words': 226}