Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/.nvm/versions/node/v18.17.1/lib/node_modules/pm2/node_modules/blessed/lib/widgets/ drwxr-xr-x | |
| Viewing file: Select action/file-type: /**
* button.js - button element for blessed
* Copyright (c) 2013-2015, Christopher Jeffrey and contributors (MIT License).
* https://github.com/chjj/blessed
*/
/**
* Modules
*/
var Node = require('./node');
var Input = require('./input');
/**
* Button
*/
function Button(options) {
var self = this;
if (!(this instanceof Node)) {
return new Button(options);
}
options = options || {};
if (options.autoFocus == null) {
options.autoFocus = false;
}
Input.call(this, options);
this.on('keypress', function(ch, key) {
if (key.name === 'enter' || key.name === 'space') {
return self.press();
}
});
if (this.options.mouse) {
this.on('click', function() {
return self.press();
});
}
}
Button.prototype.__proto__ = Input.prototype;
Button.prototype.type = 'button';
Button.prototype.press = function() {
this.focus();
this.value = true;
var result = this.emit('press');
delete this.value;
return result;
};
/**
* Expose
*/
module.exports = Button;
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0032 ]-- |