![]() 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-mobile/js/dom/MConversation.js ***/ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; require("../../css/mconversation.css"); var _Core = _interopRequireDefault(require("./Core")); var _QuickMenu = _interopRequireDefault(require("absol-acomp/js/QuickMenu")); var _OOP = _interopRequireDefault(require("absol/src/HTML5/OOP")); var _ = _Core.default._; var $ = _Core.default.$; function MConversation() { this._name = ''; this._shortContent = ''; this._time = ''; this._avatarSrc = null; this.$name = $('.am-conversation-name', this); this.$shortContent = $('.am-conversation-short-content', this); this.$time = $('span.am-conversation-time', this); this.$counter = $('.am-conversation-counter', this); this.$avatar = $('.am-conversation-avatar', this); _OOP.default.drillProperty(this, this.$counter, 'counter', 'innerHTML'); _OOP.default.drillProperty(this, this.$avatar, 'avatarSrc', 'src'); _OOP.default.drillProperty(this, this.$avatar, 'onlineStatus', 'status'); } MConversation.tag = 'MConversation'.toLowerCase(); MConversation.render = function () { return _({ class: 'am-conversation', child: [{ class: 'am-conversation-avatar-ctn', child: 'mcircleavatar.am-conversation-avatar' }, { class: 'am-conversation-body', child: ['.am-conversation-name', '.am-conversation-short-content'] }, { class: 'am-conversation-time-ctn', child: 'span.am-conversation-time' }, { class: 'am-conversation-counter' }, '.am-conversation-bottom-line'] }); }; MConversation.property = {}; /** * @type {MConversation} */ MConversation.property.name = { set: function (value) { value = value || ''; this.$name.clearChild(); if (value) { this.$name.addChild(_({ text: value })); } this._name = value; }, get: function () { return this._name; } }; /** * @type {MConversation} */ MConversation.property.time = { set: function (value) { value = value || ''; this.$time.clearChild().addChild(_({ text: value })); this._time = value; }, get: function () { return this._time; } }; /** * @type {MConversation} */ MConversation.property.shortContent = { set: function (value) { if (typeof value == 'object') { this.$shortContent.clearChild().addChild(_(value)); } else { this.$shortContent.innerHTML = value + ''; } this._shortContent = value; }, get: function () { return this._shortContent; } }; /** * @type {MConversation} */ MConversation.property.unread = { set: function (value) { if (value) { this.addClass('am-status-unread'); } else { this.removeClass('am-status-unread'); } }, get: function () { return this.containsClass('am-status-unread'); } }; _Core.default.install(MConversation); var _default = MConversation; exports.default = _default;