mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 09:24:51 +00:00
refactor(config) onLocalStorageChange
This commit is contained in:
parent
6747c48321
commit
29341eb1ec
1 changed files with 7 additions and 7 deletions
|
|
@ -250,20 +250,20 @@ var CloudCmd, Util, DOM, io;
|
|||
}
|
||||
|
||||
function onLocalStorageChange() {
|
||||
var isChecked,
|
||||
names = ['diff', 'buffer', 'dirStorage', 'localStorage'],
|
||||
var names = ['diff', 'buffer', 'dirStorage', 'localStorage'],
|
||||
elements = names.map(DOM.getById),
|
||||
showed,
|
||||
|
||||
el = {},
|
||||
msg = 'Diff, Buffer and Directory Storage do not work without localStorage';
|
||||
|
||||
elements.map(function(element) {
|
||||
msg = 'Diff, Buffer and Directory Storage do not work without localStorage',
|
||||
isChecked;
|
||||
|
||||
elements.forEach(function(element) {
|
||||
var name = element.id;
|
||||
|
||||
el[name] = element;
|
||||
|
||||
if (element.checked)
|
||||
isChecked = true;
|
||||
isChecked = true;
|
||||
});
|
||||
|
||||
if (isChecked && !el.localStorage.checked) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue