0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-11-22 09:17:56 +01:00

Adding more methods to FormPanel

This commit is contained in:
peteruithoven 2014-02-10 14:51:37 +01:00
parent 03491999c6
commit 1394a28c18

View File

@ -135,7 +135,23 @@ function FormPanel() {
_element.find(".error").removeClass("error"); _element.find(".error").removeClass("error");
}; };
FormPanel.prototype.loadSettings = function(targetSettings,complete) { this.loadAllSettings = function(complete) {
_configAPI.load(targetSettings,complete); _configAPI.loadAll(complete,function() {
clearTimeout(_retryLoadAllSettingsDelay);
_retryLoadAllSettingsDelay = setTimeout(function() { _self.loadAllSettings(complete); },_retryDelay); // retry after delay
});
};
this.loadSettings = function(targetSettings,complete) {
_configAPI.load(targetSettings,complete,function() {
clearTimeout(_retryLoadSettingsDelay);
_retryLoadSettingsDelay = setTimeout(function() { _self.loadSettings(targetSettings,complete); },_retryDelay); // retry after delay
});
};
this.resetAllSettings = function(complete) {
_configAPI.resetAll(complete,function() {
clearTimeout(_retryResetSettingsDelay);
_retryResetSettingsDelay = setTimeout(function() { _self.resetAllSettings(complete); },_retryDelay); // retry after delay
});
}; };
} }