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-full/dist/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/libs/absol-full/dist/js/mdls__absol-card__js__dom__HTimeTableItem.js
/*** module: node_modules/absol-card/js/dom/HTimeTableItem.js ***/
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

require("../../css/htimetableitem.css");

var _Core = _interopRequireDefault(require("./Core"));

var _status2Icon = _interopRequireDefault(require("./status2Icon"));

var _ContextMenu = _interopRequireDefault(require("absol-acomp/js/ContextMenu"));


var _ = _Core.default._;
var $ = _Core.default.$;

_ContextMenu.default.auto();

function HTimeTableItem() {
  /**
   * @type {HTimeTableItem}
   */
  this.$left = null;
  /**
   * @type { HTimeTableItem }
   */

  this.$right = null;
  this._status = [];
  this.$flagRow = $('.cd-month-table-item-flag-row', this);
  this.$flages = [];
  this._name = '';
  this.$name = $('.cd-month-table-item-name', this);
  this.left = null;
  this.right = null;
}

HTimeTableItem.tag = 'HTimeTableItem'.toLowerCase();

HTimeTableItem.render = function () {
  return _({
    tag: 'hanger',
    extendEvent: 'contextmenu',
    class: 'cd-month-table-item',
    child: [{
      class: 'cd-month-table-item-left-icon-ctn',
      child: 'span.mdi.mdi-menu-left'
    }, {
      class: 'cd-month-table-item-right-icon-ctn',
      child: 'span.mdi.mdi-menu-right'
    }, {
      class: 'cd-month-table-item-flag-ctn',
      child: {
        class: 'cd-month-table-item-flag-row'
      }
    }, {
      tag: 'span',
      class: 'cd-month-table-item-name',
      child: {
        text: ""
      }
    }, '.cd-month-table-item-left-drag-line', '.cd-month-table-item-right-drag-line']
  });
};

HTimeTableItem.prototype.findStart = function () {
  var res = this;

  while (res.$left) {
    res = res.$left;
  }

  return res;
};

HTimeTableItem.prototype.findRight = function () {
  var res = this;

  while (res.$right) {
    res = res.$right;
  }

  return res;
};

HTimeTableItem.property = {};
/**
 * @type {HTimeTableItem}
 */

HTimeTableItem.property.left = {
  set: function (value) {
    if (value) {
      this.addClass('cd-continue-left');
      this.$left = value;
    } else {
      this.$left = null;
      this.removeClass('cd-continue-left');
    }
  },
  get: function () {
    return this.$left;
  }
};
/**
 * @type {HTimeTableItem}
 */

HTimeTableItem.property.right = {
  set: function (value) {
    if (value) {
      this.addClass('cd-continue-right');
      this.$right = value;
    } else {
      this.$right = null;
      this.removeClass('cd-continue-right');
    }
  },
  get: function () {
    return this.$right;
  }
};
/**
 * @type {HTimeTableItem}
 */

HTimeTableItem.property.status = {
  set: function (status) {
    this.$flagRow.clearChild();
    status = status || [];

    if (typeof status == 'string') {
      status = status.trim().split(/\s+/);
    }

    this._status = status;
    var flag;
    var icon;
    var flagElt;

    for (var i = 0; i < status.length; ++i) {
      flag = status[i];
      icon = _status2Icon.default[flag];

      if (icon) {
        flagElt = _(icon).addClass('cd-month-table-item-flag');
        this.$flagRow.addChild(flagElt);
      }
    }
  },
  get: function () {
    return this._status;
  }
};
/**
 * @type {HTimeTableItem}
 */

HTimeTableItem.property.isOverDue = {
  set: function (value) {
    if (value) {
      this.addClass('cd-status-over-due');
    } else {
      this.removeClass('cd-status-over-due');
    }
  },
  get: function () {
    return this.containsClass('cd-status-over-due');
  }
};
/**
 * @type {HTimeTableItem}
 */

HTimeTableItem.property.name = {
  set: function (value) {
    this._name = (value || '') + '';
    this.$name.firstChild.data = this._name;
  },
  get: function () {
    return this._name;
  }
};

_Core.default.install(HTimeTableItem);

var _default = HTimeTableItem;
exports.default = _default;

VaKeR 2022