mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-04 11:03:56 +08:00
⛄ Sync 2026-04-23 20:32:35
This commit is contained in:
1 parent
17738c6f79
commit
fe51d2b304
206 files changed
+725671
No files matched your search
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
'require form';
|
||||
'require baseclass';
|
||||
|
||||
return baseclass.extend({
|
||||
trigger: _('Always off (kernel: none)'),
|
||||
description: _('The LED is always in default state off.'),
|
||||
kernel: true,
|
||||
addFormOptions: function(s) {
|
||||
var o;
|
||||
|
||||
o = s.option(form.Flag, 'default', _('Default state'));
|
||||
o.rmempty = false;
|
||||
o.depends('trigger', 'none');
|
||||
o.textvalue = function(section_id) {
|
||||
var cval = this.cfgvalue(section_id);
|
||||
if (cval == null)
|
||||
cval = this.default;
|
||||
return (cval == this.enabled) ? _('On') : _('Off');
|
||||
};
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user