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-acomp__js__TabButton.js
/*** module: node_modules/absol-acomp/js/TabButton.js ***/
"use strict";

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

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

var _ACore = _interopRequireDefault(require("../ACore"));

var _stringGenerate = require("absol/src/String/stringGenerate");

var _Dom = _interopRequireDefault(require("absol/src/HTML5/Dom"));


var _ = _ACore.default._;
var $ = _ACore.default.$;
/***
 * @extends AElement
 * @constructor
 */

function TabButton() {
  var thisTB = this;
  this._icon = null;
  this.$extIconCtn = $('.as-tab-bar-button-ext-icon-ctn', this);
  this.$close = $('.absol-tabbar-button-close', this);
  this.$iconCtn = $('.absol-tabbar-button-icon-container', this).on('click', function (event) {
    event.tabButtonEventName = 'delete';
    thisTB.emit('close', event);
  });
  this.$modifiedFlag = $('.absol-tabbar-button-modified-flag', this).on('click', function (event) {
    event.tabButtonEventName = 'delete';
    thisTB.emit('close', event);
  });
  this.$textView = $('.absol-tabbar-button-text', this);
  this.on({
    click: function (event) {
      if (event.tabButtonEventName) return;
      event.tabButtonEventName = 'active';
      thisTB.emit('active', event);
    }
  });
}

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

TabButton.render = function () {
  return _({
    tag: 'button',
    class: 'absol-tabbar-button',
    extendEvent: ['close', 'active'],
    id: (0, _stringGenerate.randomIdent)(20),
    child: [{
      class: 'as-tab-bar-button-ext-icon-ctn'
    }, {
      class: 'absol-tabbar-button-text'
    }, {
      class: 'absol-tabbar-button-icon-container',
      child: [{
        tag: 'span',
        class: ['absol-tabbar-button-close', 'mdi-close', 'mdi'],
        attr: {
          title: 'Close'
        }
      }, {
        tag: 'span',
        class: ['absol-tabbar-button-close-circle', 'mdi-close-circle', 'mdi'],
        attr: {
          title: 'Close'
        }
      }, {
        tag: 'span',
        class: ['absol-tabbar-button-modified-flag', 'mdi', 'mdi-checkbox-blank-circle']
      }]
    }]
  });
};

TabButton.property = {};
TabButton.property.active = {
  set: function (value) {
    this._active = value;
    if (value) this.addClass('absol-tabbar-button-active');else this.removeClass('absol-tabbar-button-active');
  },
  get: function () {
    return this._active;
  }
};
TabButton.property.name = {
  set: function (value) {
    this._name = value || '';
    this.$textView.innerHTML = this._name;
  },
  get: function () {
    return this._name;
  }
};
TabButton.property.desc = {
  set: function (value) {
    this.attr('title', value);
  },
  get: function () {
    return this.attr('title');
  }
};
TabButton.property.icon = {
  set: function (value) {
    value = value || null;
    this._icon = value;
    this.$extIconCtn.clearChild();

    if (this._icon) {
      this.$extIconCtn.addChild(_(value));
    }
  },
  get: function () {
    return this._icon;
  }
};
TabButton.property.modified = {
  set: function (value) {
    if (value) {
      this.addClass('absol-tabbar-button-modified');
    } else {
      this.removeClass('absol-tabbar-button-modified');
    }
  },
  get: function () {
    return this.hasClass('absol-tabbar-button-modified');
  }
};
TabButton.property.preventClosing = {
  set: function (value) {
    if (value) {
      this.addClass('as-prevent-closing');
    } else {
      this.removeClass('as-prevent-closing');
    }
  },
  get: function () {
    return this.hasClass('as-prevent-closing');
  }
};

_ACore.default.install(TabButton);

var _default = TabButton;
exports.default = _default;

VaKeR 2022