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

View File

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

View File

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