mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add settings changes
This commit is contained in:
parent
28823802ea
commit
2b5a1ce6d4
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright 2014 Antoine Aflalo
|
* Copyright 2014 IBM, Antoine Aflalo
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -58,7 +58,7 @@ RED.settings = (function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var init = function (callback) {
|
var init = function (then,otherwise) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
headers: {
|
headers: {
|
||||||
"Accept": "application/json"
|
"Accept": "application/json"
|
||||||
@ -69,17 +69,21 @@ RED.settings = (function () {
|
|||||||
success: function (data) {
|
success: function (data) {
|
||||||
setProperties(data);
|
setProperties(data);
|
||||||
console.log("Node-RED: " + data.version);
|
console.log("Node-RED: " + data.version);
|
||||||
callback();
|
console.log(data);
|
||||||
|
then();
|
||||||
|
},
|
||||||
|
error: function(jqXHR,textStatus,errorThrown) {
|
||||||
|
otherwise(jqXHR.status,textStatus);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
init: init,
|
||||||
set: set,
|
set: set,
|
||||||
get: get,
|
get: get,
|
||||||
remove: remove,
|
remove: remove
|
||||||
init : init
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
();
|
();
|
Loading…
Reference in New Issue
Block a user