Google Drive (first look)

This commit is contained in:
RainLoop Team 2014-07-28 19:55:22 +04:00
parent ba1f0403f7
commit 4d2df09946
16 changed files with 492 additions and 263 deletions

View file

@ -10,8 +10,10 @@ function AdminSocial()
this.googleEnable = oData.googleEnable;
this.googleClientID = oData.googleClientID;
this.googleClientSecret = oData.googleClientSecret;
this.googleApiKey = oData.googleApiKey;
this.googleTrigger1 = ko.observable(Enums.SaveSettingsStep.Idle);
this.googleTrigger2 = ko.observable(Enums.SaveSettingsStep.Idle);
this.googleTrigger3 = ko.observable(Enums.SaveSettingsStep.Idle);
this.facebookSupported = oData.facebookSupported;
this.facebookEnable = oData.facebookEnable;
@ -45,7 +47,8 @@ AdminSocial.prototype.onBuild = function ()
f4 = Utils.settingsSaveHelperSimpleFunction(self.twitterTrigger2, self),
f5 = Utils.settingsSaveHelperSimpleFunction(self.googleTrigger1, self),
f6 = Utils.settingsSaveHelperSimpleFunction(self.googleTrigger2, self),
f7 = Utils.settingsSaveHelperSimpleFunction(self.dropboxTrigger1, self)
f7 = Utils.settingsSaveHelperSimpleFunction(self.googleTrigger3, self),
f8 = Utils.settingsSaveHelperSimpleFunction(self.dropboxTrigger1, self)
;
self.facebookEnable.subscribe(function (bValue) {
@ -111,6 +114,12 @@ AdminSocial.prototype.onBuild = function ()
});
});
self.googleApiKey.subscribe(function (sValue) {
RL.remote().saveAdminConfig(f7, {
'GoogleApiKey': Utils.trim(sValue)
});
});
self.dropboxEnable.subscribe(function (bValue) {
RL.remote().saveAdminConfig(Utils.emptyFunction, {
'DropboxEnable': bValue ? '1' : '0'
@ -118,7 +127,7 @@ AdminSocial.prototype.onBuild = function ()
});
self.dropboxApiKey.subscribe(function (sValue) {
RL.remote().saveAdminConfig(f7, {
RL.remote().saveAdminConfig(f8, {
'DropboxApiKey': Utils.trim(sValue)
});
});