mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(config) add saving of config
This commit is contained in:
parent
8537b0a332
commit
7ac3b1d564
1 changed files with 9 additions and 2 deletions
|
|
@ -10,6 +10,7 @@ var CloudCmd, Util, DOM;
|
|||
Events = DOM.Events,
|
||||
ESC = CloudCmd.Key.ESC,
|
||||
INPUT = 'INPUT',
|
||||
CONFIG,
|
||||
TEMPLATE,
|
||||
Config = this;
|
||||
|
||||
|
|
@ -49,10 +50,10 @@ var CloudCmd, Util, DOM;
|
|||
}
|
||||
|
||||
function fillTemplate() {
|
||||
CloudCmd.getConfig(function(config) {
|
||||
Util.ifExec(CONFIG, function() {
|
||||
var i, n, div, data, li, param, obj = {};
|
||||
|
||||
Util.copyObj(config, obj);
|
||||
Util.copyObj(CONFIG, obj);
|
||||
|
||||
changeConfig(obj);
|
||||
|
||||
|
|
@ -78,6 +79,11 @@ var CloudCmd, Util, DOM;
|
|||
CloudCmd.View.show(div, null, {
|
||||
autoSize: true
|
||||
});
|
||||
}, function(callback) {
|
||||
CloudCmd.getConfig(function(config){
|
||||
CONFIG = config;
|
||||
callback();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -125,6 +131,7 @@ var CloudCmd, Util, DOM;
|
|||
data = el.value;
|
||||
|
||||
obj[name] = data;
|
||||
CONFIG[name] = data;
|
||||
|
||||
DOM.RESTful.config(obj);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue