mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 14:07:04 +03:00
Code refactoring
Fixed owncloud password encoder/decoder (#291) Fixed ckeditor in ownCloud iframe (Closes #302) Release commit
This commit is contained in:
parent
7a374ebe03
commit
06274c6a7c
112 changed files with 2667 additions and 1862 deletions
76
dev/Settings/App/Social.js
Normal file
76
dev/Settings/App/Social.js
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
|
||||
(function () {
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SocialAppSetting()
|
||||
{
|
||||
var
|
||||
Utils = require('Common/Utils'),
|
||||
Data = require('Storage/App/Data')
|
||||
;
|
||||
|
||||
this.googleEnable = Data.googleEnable;
|
||||
|
||||
this.googleActions = Data.googleActions;
|
||||
this.googleLoggined = Data.googleLoggined;
|
||||
this.googleUserName = Data.googleUserName;
|
||||
|
||||
this.facebookEnable = Data.facebookEnable;
|
||||
|
||||
this.facebookActions = Data.facebookActions;
|
||||
this.facebookLoggined = Data.facebookLoggined;
|
||||
this.facebookUserName = Data.facebookUserName;
|
||||
|
||||
this.twitterEnable = Data.twitterEnable;
|
||||
|
||||
this.twitterActions = Data.twitterActions;
|
||||
this.twitterLoggined = Data.twitterLoggined;
|
||||
this.twitterUserName = Data.twitterUserName;
|
||||
|
||||
this.connectGoogle = Utils.createCommand(this, function () {
|
||||
if (!this.googleLoggined())
|
||||
{
|
||||
require('App/App').googleConnect();
|
||||
}
|
||||
}, function () {
|
||||
return !this.googleLoggined() && !this.googleActions();
|
||||
});
|
||||
|
||||
this.disconnectGoogle = Utils.createCommand(this, function () {
|
||||
require('App/App').googleDisconnect();
|
||||
});
|
||||
|
||||
this.connectFacebook = Utils.createCommand(this, function () {
|
||||
if (!this.facebookLoggined())
|
||||
{
|
||||
require('App/App').facebookConnect();
|
||||
}
|
||||
}, function () {
|
||||
return !this.facebookLoggined() && !this.facebookActions();
|
||||
});
|
||||
|
||||
this.disconnectFacebook = Utils.createCommand(this, function () {
|
||||
require('App/App').facebookDisconnect();
|
||||
});
|
||||
|
||||
this.connectTwitter = Utils.createCommand(this, function () {
|
||||
if (!this.twitterLoggined())
|
||||
{
|
||||
require('App/App').twitterConnect();
|
||||
}
|
||||
}, function () {
|
||||
return !this.twitterLoggined() && !this.twitterActions();
|
||||
});
|
||||
|
||||
this.disconnectTwitter = Utils.createCommand(this, function () {
|
||||
require('App/App').twitterDisconnect();
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = SocialAppSetting;
|
||||
|
||||
}());
|
||||
Loading…
Add table
Add a link
Reference in a new issue