VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /var/www/html/libs/absol-acomp/demo/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/libs/absol-acomp/demo/collapsibletreenavigator.js
function render(o) {
    return absol._(o).addTo(document.body);
}

var items =[
    {
        value: "over_due",
        text: "Quá hạn",
        color: "#F28B82",
        count: 10,
        countDesc: "10 đề xuất quá hạn",
        items: [
            {
                value: 0,
                text: "Đề xuất đi",
                items: [
                    {
                        value: 0,
                        text: "Đề xuất đi 1"
                    },
                    {
                        value: 0,
                        text: "Đề xuất đi 2"
                    }
                ]
            },
            {
                value: 0,
                text: "Đề xuất đến"
            }
        ]
    },
    {
        value: "waiting_approval",
        color: "#FBCDA4",
        text: "Chờ duyệt",
        count: 0,
        items: [
            {
                value: 0,
                text: "Đề xuất đi"
            },
            {
                value: 0,
                text: "Đề xuất đến"
            }
        ]
    },
    {
        value: "denied",
        color: "#D1C4E9",
        text: "Từ chối",
        count: 0,
        items: [
            {
                value: 0,
                text: "Đề xuất đi"
            },
            {
                value: 0,
                text: "Đề xuất đến"
            }
        ]
    },
    {
        value: "approved",
        color: "#A7E6A5",
        text: "Đã duyệt",
        count: 0,
        items: [
            {
                value: 0,
                text: "Đề xuất đi"
            },
            {
                value: 0,
                text: "Đề xuất đến"
            }
        ]
    },
    {
        value: "total_all",
        text: "Tổng số",
        count: 0,
        items: [
            {
                value: 0,
                text: "Đề xuất đi"
            },
            {
                value: undefined,
                text: "Đề xuất đến"
            },
            {
                value: undefined,
                text: "Người tham khảo"
            }
        ],
        color: "null"
    },
    {
        value: "draft",
        text: "Nháp",
        count: 0,
        color: "null"
    },
    {
        value: "group",
        text: "Nhóm",
        items: [
            {
                value: "group_9",
                text: "Đi muộn về sớm",
                count: 0,
                items: []
            },
            {
                value: "group_5",
                text: "Khác",
                count: 0,
                items: []
            },
            {
                value: "group_3",
                text: "Nghỉ ngày",
                count: 0,
                items: [
                    {
                        value: "group_7",
                        text: "Nghỉ không lương",
                        count: 0,
                        items: []
                    },
                    {
                        value: "group_6",
                        text: "Nghỉ phép",
                        count: 0,
                        items: []
                    }
                ]
            },
            {
                value: "group_10",
                text: "Tạm ứng",
                count: 0,
                items: []
            },
            {
                value: "group_8",
                text: "Tăng ca",
                count: 0,
                items: []
            }
        ],
        initOpened: true,
        noSelect: true,
        color: "null"
    },
    {
        value: "label",
        id: "label",
        text: "Nhãn",
        items: [],
        initOpened: true,
        noSelect: true,
        actions: [
            {
                name: "label_config",
                icon: "span.mdi.mdi-cog-outline"
            }
        ],
        color: "null"
    }
];

render('<h3>block(default)</h3>')
window.navigator1 = render({
    tag: 'CollapsibleTreeNavigator'.toLowerCase(),
    style: {
        size:'regular',
    },
    props: {
        value: 'child_stamp',// tự động mở nếu con của group được chọn
        items: items

    },
    on: {
        change: function (event) {
            console.log('change')
            absol.require('snackbar').show(`this.value=${this.value}`);
            console.log(event.data, event.value);
        },
        action: function (event) {
            console.log('action', event.action, event.data);
        },
        clickitem: function (event) {
            console.log('clickitem', event.data);
        }
    }
})

render('<h3>inline-block</h3>')

window.navigator2 = render({
    tag: 'CollapsibleTreeNavigator'.toLowerCase(),
    style: {
        display: 'inline-block',
    },
    props: {
        value: 'child_stamp',// tự động mở nếu con của group được chọn
        items: items

    },
    on: {
        change: function (event) {
            console.log('change')
            absol.require('snackbar').show(`this.value=${this.value}`);
            console.log(event.data, event.value);
        }
    }
});


VaKeR 2022