clean up options code
This commit is contained in:
parent
8de9b68f5f
commit
e6da7b4682
@ -16,8 +16,7 @@ $(function() {
|
|||||||
if (window.Options && Options.get_tab('general')) {
|
if (window.Options && Options.get_tab('general')) {
|
||||||
var selector = '#treeview-global>input';
|
var selector = '#treeview-global>input';
|
||||||
Options.extend_tab("general", "<label id='treeview-global'><input type='checkbox' /> "+_('Use tree view by default')+"</label>");
|
Options.extend_tab("general", "<label id='treeview-global'><input type='checkbox' /> "+_('Use tree view by default')+"</label>");
|
||||||
}
|
$(selector).on('change', function() {
|
||||||
$(selector).on('change', function () {
|
|
||||||
if (localStorage.treeview === 'true') {
|
if (localStorage.treeview === 'true') {
|
||||||
localStorage.treeview = 'false';
|
localStorage.treeview = 'false';
|
||||||
} else {
|
} else {
|
||||||
@ -27,6 +26,7 @@ $(function() {
|
|||||||
if (localStorage.treeview === 'true') {
|
if (localStorage.treeview === 'true') {
|
||||||
$(selector).attr('checked', 'checked');
|
$(selector).attr('checked', 'checked');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (active_page == 'thread')
|
if (active_page == 'thread')
|
||||||
|
Loading…
Reference in New Issue
Block a user