![]() 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-full/dist/js/ |
Upload File : |
/*** module: node_modules/absol-acomp/js/DVExpTree.js ***/ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _ExpTree = _interopRequireDefault(require("./ExpTree")); var _ACore = _interopRequireWildcard(require("../ACore")); require("../css/dvexptree.css"); var _EventEmitter = require("absol/src/HTML5/EventEmitter"); /*** * @extends ExpTree * @constructor */ function DVExpTree() { this.injectInput(); } DVExpTree.tag = 'DVExpTree'.toLowerCase(); DVExpTree.render = function () { return (0, _ACore._)({ tag: _ExpTree.default.tag, extendEvent: ['radiochange', 'indexclick'], class: 'as-dv-exp-tree' }, true); }; DVExpTree.prototype.injectInput = function () { this.$radio = (0, _ACore._)({ tag: 'radiobutton', on: { change: this.eventHandler.radioChange } }); this.$node.insertBefore(this.$radio, this.$node.$extIcon); this.$index = (0, _ACore._)({ tag: 'span', class: 'as-dv-exp-tree-index', on: { click: this.eventHandler.indexClick } }); this.$node.insertBefore(this.$index, this.$node.$desc); this.$node.on('click', this.eventHandler.clickInNode); }; DVExpTree.property = {}; DVExpTree.property.radioName = { enumerable: true, set: function (value) { if (!value) { this.removeClass('as-has-radio'); this.$radio.name = undefined; } else { this.addClass('as-has-radio'); this.$radio.name = value + ''; } }, get: function () { return this.$radio.name; } }; DVExpTree.property.radioValue = { enumerable: true, set: function (value) { this.$radio.value = value; }, get: function () { return this.$radio.value; } }; DVExpTree.property.radioChecked = { enumerable: true, set: function (value) { this.$radio.checked = value; }, get: function () { return this.$radio.checked; } }; DVExpTree.property.hasIndex = { enumerable: true, set: function (value) { if (value) this.addClass('as-has-index-input');else this.removeClass('as-has-index-input'); }, get: function () { return this.hasClass('as-has-index-input'); } }; DVExpTree.property.indexValue = { enumerable: true, set: function (value) { this.$index.innerHTML = value; }, get: function () { return this.$index.innerHTML; } }; DVExpTree.eventHandler = {}; DVExpTree.eventHandler.radioChange = function (event) { this.emit('radiochange', Object.assign({}, event, { target: this, radioElt: this.$radio }), this); }; DVExpTree.eventHandler.indexClick = function (event) { this.emit('indexclick', Object.assign({}, event, { target: this, indexInput: this.$index }), this); }; DVExpTree.eventHandler.clickInNode = function (event) { if ((0, _EventEmitter.hitElement)(this.$index, event) || (0, _EventEmitter.hitElement)(this.$radio, event) || (0, _EventEmitter.hitElement)(this.$node.$toggleIcon, event)) return; if ((0, _EventEmitter.hitElement)(this.$node, event) && this.radioName) this.$radio.click(); }; _ACore.default.install(DVExpTree); var _default = DVExpTree; exports.default = _default;