![]() 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 : |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>DRGTreeList</title> <script src="../dist/absol-acomp.js?<?php echo stat('../dist/absol-acomp.js')['mtime'];?>"></script> <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@mdi/font@6.5.95/css/materialdesignicons.min.css"> </head> <body> <style> .as-toc-item.as-text-red .as-toc-item-name { color: red; } </style> <script> (function () { var _ = absol._; var $ = absol.$; function render(o) { return _(o).addTo(document.body); } var nodes = [ { name: "Flex BSC", ident: 'flex-bsc', checked: true, icon: 'span.mdi.mdi-format-section', children: [ { name: 'BSC là gì', ident: 'bsc-la-gi', checked: true, icon: 'span.mdi.mdi-note-outline', hasQuickMenu: false, extendClasses:'as-text-red' }, { name: 'Giới thiệu phần mềm BSC', ident: 'tgpmbsc', children: [ { name: "Các chức năng cơ bản", ident: 'cac-chuc-nang-co-ban', icon: 'span.mdi.mdi-note-outline' }, { name: 'Các chức năng nâng cao', ident: 'cac-chuc-nang-nang-cao', icon: 'span.mdi.mdi-note-outline' } ], icon: 'span.mdi.mdi-note-outline' } ] }, { name: "Flex CardDone", ident: 'flex-card-done', icon: 'span.mdi.mdi-format-section', children: [ { name: 'Giới thiệu phần mềm CardDone', ident: 'gtpm-carddone', icon: 'span.mdi.mdi-note-outline' }, { name: 'Các khái niệm trong phần mềm', ident: 'cac-khai-niem', icon: 'span.mdi.mdi-note-outline' } ] }, { name: 'Flex HR', ident: 'flex-hr', icon: 'span.mdi.mdi-format-section' }, { name: 'Flex CRM', icon: 'span.mdi.mdi-format-section', ident: 'flex-crm' } ]; var mList = render({ tag: 'toclist', props: { nodes: nodes }, on: { pressnode: function (event) { console.log(event) if (event.ctrlKey){ event.controller.active(!event.controller.activated, true); } else { if (!event.controller.activated) { event.controller.active(true); } else { if (this.getActivatedNodes().length > 1){ event.controller.active(true); } else { event.controller.nodeElt.rename(); } } } }, checkednodechange: function (event) { console.log(event.type, event.controller); }, pressnodequickmmenu: function (event) { console.log(event.type, event.controller, event); var self = this; var nodeController = event.controller; event.showMenu({ items: [ { text: 'Thêm', icon: 'span.mdi.mdi-plus', cmd: 'add' }, { text: "Sửa", icon: 'span.mdi.mdi-circle-edit-outline' }, { text: "Xoá", icon: 'span.mdi.mdi-delete-variant', cmd: 'del' }, { text: 'Thêm ở trước', cmd: 'add_before' }, { text: 'Thêm ở sau', cmd: 'add_after' }, { text: 'Thêm ở đầu', cmd: 'child_first' }, ] }, function (item) { switch (item.cmd) { case 'add': appendNode(nodeController); break; case 'del': nodeController.remove(); break; case 'add_before': nodeController.parent.addChildBefore(self.makeNodeController({ name: 'new node ' + (new Date().getTime() % 1e6 / 1000 >> 0), ident: '' + (new Date().getTime() % 1e6 / 1000 >> 0), icon: 'span.mdi.mdi-note-outline' }), nodeController); break; case 'add_after': nodeController.parent.addChildAfter(self.makeNodeController({ name: 'new node ' + (new Date().getTime() % 1e6 / 1000 >> 0), ident: '' + (new Date().getTime() % 1e6 / 1000 >> 0), icon: 'span.mdi.mdi-note-outline' }), nodeController); break; case 'child_first': nodeController.addChildBefore(self.makeNodeController({ name: 'new node ' + (new Date().getTime() % 1e6 / 1000 >> 0), ident: '' + (new Date().getTime() % 1e6 / 1000 >> 0) }), nodeController.firstChild); break; } }) }, statechange: function () { localStorage.setItem('tocList_status', JSON.stringify(this.savedState)); } } }); try { var savedState = JSON.parse(localStorage.getItem('tocList_status')); if (savedState) mList.loadSavedState(savedState); } catch (e) { console.error(e); } function appendNode(nodeCtrl) { console.log(nodeCtrl) } var searchTextInput = render({ tag: 'searchtextinput', style: { marginTop: '10px' } }); mList.searchInput = searchTextInput; })() </script> </body> </html>