{"size": 3470, "ext": "js", "max_stars_repo_path": "sources/views/add_material_window.js", "max_stars_repo_name": "kris-development/diadem_mobile", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "sources/views/add_material_window.js", "max_issues_repo_name": "kris-development/diadem_mobile", "max_issues_repo_issues_event_min_datetime": "2021-05-11T19:54:20.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-13T17:59:34.000Z", "max_forks_repo_path": "sources/views/add_material_window.js", "max_forks_repo_name": "kris-development/School", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 3, "max_forks_count": null, "avg_line_length": 38.9887640449, "max_line_length": 162, "alphanum_fraction": 0.2798270893}
import { JetView } from "webix-jet";


import "webix/photo";


export default class AddMaterialView extends JetView {
    config() {
        webix.CustomScroll.init();
        return {
            view: "window",
            id: "super_add_material_window",
            head: {
                cols: [
                    { template: "Добавление литературы", type: "header", borderless: true },
                    {
                        view: "icon", icon: "wxi-close", click: function () {
                            $$("super_add_material_window").hide();
                        }
                    },
                ]
            },
            css: "myStyleHeader",
            position: "center",
            height: 600,
            width: 900,
            move: true,
            modal: true,
            on: {
                "onBeforeShow": function () {
                    $$("super_add_material_window").setPosition(317, 160);
                    $$("super_add_material_window").resize();
                }
            },
            body: {
                view: "form",
                id: "super_add_material_form",
                css: "myStyleForm",
                width: 900,
                rows: [
                    {
                        cols: [
                            {
                                rows: [
                                    { view: "text", id: "", css: "myStyleLabel", label: "Автор:", labelPosition: "top", name: "author", width: 500 },
                                    { view: "text", id: "", css: "myStyleLabel", label: "Название книги:", labelPosition: "top", name: "book_title", width: 500 },
                                ]
                            },
                            {},
                            {
                                rows: [
                                    {
                                        view: "photo",
                                        name: "photo",
                                        css: "form_photo",
                                        width: 250,
                                        height: 250,
                                        borderless: true,
                                    },
                                    {
                                        cols: [
                                            {
                                                css: "myStyleSaveBtn",
                                                view: "uploader", value: "Загрузить изображение",
                                                name: "files", accept: "image/png, image/gif, image/jpg",
                                                //link: "mylist", upload: "https://docs.webix.com/samples/server/upload"
                                            },
                                        ]
                                    }
                                ]
                            },
                        ]
                    },
                    { height: 20 },
                    {
                        cols: [
                            {},
                            { view: "button", value: "Добавить", /*click: '$$("super_add_homework_form").save()',*/ css: "myStyleSaveBtn", width: 130 },
                            {},
                        ]
                    }
                ],                               
            }
        }    
    }
    init() {

    }
}