Restore Settings sections.

This commit is contained in:
Zixaphir 2014-01-28 01:29:51 -07:00
parent 9199f12ce0
commit 64de010b71
3 changed files with 25 additions and 17 deletions

View File

@ -16042,7 +16042,7 @@
Settings = { Settings = {
init: function() { init: function() {
var check, el, settings, var addSection, arr, check, el, settings, _i, _len, _ref,
_this = this; _this = this;
el = $.el('a', { el = $.el('a', {
className: 'settings-link', className: 'settings-link',
@ -16055,11 +16055,12 @@
el: el, el: el,
order: 1 order: 1
}); });
this.addSection('Main', this.main); addSection = this.addSection;
this.addSection('Filter', this.filter); _ref = [['style', 'Style'], ['themes', 'Themes'], ['mascots', 'Mascots'], ['main', 'Script'], ['filter', 'Filter'], ['sauce', 'Sauce'], ['advanced', 'Advanced'], ['keybinds', 'Keybinds']];
this.addSection('Sauce', this.sauce); for (_i = 0, _len = _ref.length; _i < _len; _i++) {
this.addSection('Advanced', this.advanced); arr = _ref[_i];
this.addSection('Keybinds', this.keybinds); addSection(arr[1], Settings[arr[0]]);
}
$.on(d, 'AddSettingsSection', this.addSection); $.on(d, 'AddSettingsSection', this.addSection);
$.on(d, 'OpenSettings', function(e) { $.on(d, 'OpenSettings', function(e) {
return _this.open(e.detail); return _this.open(e.detail);

View File

@ -16047,7 +16047,7 @@
Settings = { Settings = {
init: function() { init: function() {
var check, el, settings, var addSection, arr, check, el, settings, _i, _len, _ref,
_this = this; _this = this;
el = $.el('a', { el = $.el('a', {
className: 'settings-link', className: 'settings-link',
@ -16060,11 +16060,12 @@
el: el, el: el,
order: 1 order: 1
}); });
this.addSection('Main', this.main); addSection = this.addSection;
this.addSection('Filter', this.filter); _ref = [['style', 'Style'], ['themes', 'Themes'], ['mascots', 'Mascots'], ['main', 'Script'], ['filter', 'Filter'], ['sauce', 'Sauce'], ['advanced', 'Advanced'], ['keybinds', 'Keybinds']];
this.addSection('Sauce', this.sauce); for (_i = 0, _len = _ref.length; _i < _len; _i++) {
this.addSection('Advanced', this.advanced); arr = _ref[_i];
this.addSection('Keybinds', this.keybinds); addSection(arr[1], Settings[arr[0]]);
}
$.on(d, 'AddSettingsSection', this.addSection); $.on(d, 'AddSettingsSection', this.addSection);
$.on(d, 'OpenSettings', function(e) { $.on(d, 'OpenSettings', function(e) {
return _this.open(e.detail); return _this.open(e.detail);

View File

@ -12,11 +12,17 @@ Settings =
el: el el: el
order: 1 order: 1
@addSection 'Main', @main {addSection} = @
@addSection 'Filter', @filter addSection arr[1], Settings[arr[0]] for arr in [
@addSection 'Sauce', @sauce ['style', 'Style']
@addSection 'Advanced', @advanced ['themes', 'Themes']
@addSection 'Keybinds', @keybinds ['mascots', 'Mascots']
['main', 'Script']
['filter', 'Filter']
['sauce', 'Sauce']
['advanced', 'Advanced']
['keybinds', 'Keybinds']
]
$.on d, 'AddSettingsSection', @addSection $.on d, 'AddSettingsSection', @addSection
$.on d, 'OpenSettings', (e) => @open e.detail $.on d, 'OpenSettings', (e) => @open e.detail