mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Google Drive (second look)
This commit is contained in:
parent
eea55d4e0a
commit
7107104e1a
18 changed files with 507 additions and 233 deletions
|
|
@ -10,10 +10,8 @@ function AdminSocial()
|
||||||
this.googleEnable = oData.googleEnable;
|
this.googleEnable = oData.googleEnable;
|
||||||
this.googleClientID = oData.googleClientID;
|
this.googleClientID = oData.googleClientID;
|
||||||
this.googleClientSecret = oData.googleClientSecret;
|
this.googleClientSecret = oData.googleClientSecret;
|
||||||
this.googleApiKey = oData.googleApiKey;
|
|
||||||
this.googleTrigger1 = ko.observable(Enums.SaveSettingsStep.Idle);
|
this.googleTrigger1 = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||||
this.googleTrigger2 = ko.observable(Enums.SaveSettingsStep.Idle);
|
this.googleTrigger2 = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||||
this.googleTrigger3 = ko.observable(Enums.SaveSettingsStep.Idle);
|
|
||||||
|
|
||||||
this.facebookSupported = oData.facebookSupported;
|
this.facebookSupported = oData.facebookSupported;
|
||||||
this.facebookEnable = oData.facebookEnable;
|
this.facebookEnable = oData.facebookEnable;
|
||||||
|
|
@ -47,7 +45,6 @@ AdminSocial.prototype.onBuild = function ()
|
||||||
f4 = Utils.settingsSaveHelperSimpleFunction(self.twitterTrigger2, self),
|
f4 = Utils.settingsSaveHelperSimpleFunction(self.twitterTrigger2, self),
|
||||||
f5 = Utils.settingsSaveHelperSimpleFunction(self.googleTrigger1, self),
|
f5 = Utils.settingsSaveHelperSimpleFunction(self.googleTrigger1, self),
|
||||||
f6 = Utils.settingsSaveHelperSimpleFunction(self.googleTrigger2, self),
|
f6 = Utils.settingsSaveHelperSimpleFunction(self.googleTrigger2, self),
|
||||||
f7 = Utils.settingsSaveHelperSimpleFunction(self.googleTrigger3, self),
|
|
||||||
f8 = Utils.settingsSaveHelperSimpleFunction(self.dropboxTrigger1, self)
|
f8 = Utils.settingsSaveHelperSimpleFunction(self.dropboxTrigger1, self)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
@ -114,12 +111,6 @@ AdminSocial.prototype.onBuild = function ()
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
self.googleApiKey.subscribe(function (sValue) {
|
|
||||||
RL.remote().saveAdminConfig(f7, {
|
|
||||||
'GoogleApiKey': Utils.trim(sValue)
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
self.dropboxEnable.subscribe(function (bValue) {
|
self.dropboxEnable.subscribe(function (bValue) {
|
||||||
RL.remote().saveAdminConfig(Utils.emptyFunction, {
|
RL.remote().saveAdminConfig(Utils.emptyFunction, {
|
||||||
'DropboxEnable': bValue ? '1' : '0'
|
'DropboxEnable': bValue ? '1' : '0'
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,11 @@ Globals.bAllowPdfPreview = !Globals.bMobileDevice;
|
||||||
*/
|
*/
|
||||||
Globals.bAnimationSupported = !Globals.bMobileDevice && $html.hasClass('csstransitions');
|
Globals.bAnimationSupported = !Globals.bMobileDevice && $html.hasClass('csstransitions');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {boolean}
|
||||||
|
*/
|
||||||
|
Globals.bXMLHttpRequestSupported = !!window.XMLHttpRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1118,7 +1118,6 @@ Utils.initDataConstructorBySettings = function (oData)
|
||||||
oData.googleEnable = ko.observable(false);
|
oData.googleEnable = ko.observable(false);
|
||||||
oData.googleClientID = ko.observable('');
|
oData.googleClientID = ko.observable('');
|
||||||
oData.googleClientSecret = ko.observable('');
|
oData.googleClientSecret = ko.observable('');
|
||||||
oData.googleApiKey = ko.observable('');
|
|
||||||
|
|
||||||
oData.dropboxEnable = ko.observable(false);
|
oData.dropboxEnable = ko.observable(false);
|
||||||
oData.dropboxApiKey = ko.observable('');
|
oData.dropboxApiKey = ko.observable('');
|
||||||
|
|
@ -2016,3 +2015,21 @@ Utils.detectDropdownVisibility = _.debounce(function () {
|
||||||
return oItem.hasClass('open');
|
return oItem.hasClass('open');
|
||||||
}));
|
}));
|
||||||
}, 50);
|
}, 50);
|
||||||
|
|
||||||
|
Utils.triggerAutocompleteInputChange = function (bDelay) {
|
||||||
|
|
||||||
|
var fFunc = function () {
|
||||||
|
$('.checkAutocomplete').trigger('change');
|
||||||
|
};
|
||||||
|
|
||||||
|
if (bDelay)
|
||||||
|
{
|
||||||
|
_.delay(fFunc, 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fFunc();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,6 @@ AbstractData.prototype.populateDataOnStart = function()
|
||||||
this.googleEnable(!!RL.settingsGet('AllowGoogleSocial'));
|
this.googleEnable(!!RL.settingsGet('AllowGoogleSocial'));
|
||||||
this.googleClientID(RL.settingsGet('GoogleClientID'));
|
this.googleClientID(RL.settingsGet('GoogleClientID'));
|
||||||
this.googleClientSecret(RL.settingsGet('GoogleClientSecret'));
|
this.googleClientSecret(RL.settingsGet('GoogleClientSecret'));
|
||||||
this.googleApiKey(RL.settingsGet('GoogleApiKey'));
|
|
||||||
|
|
||||||
this.dropboxEnable(!!RL.settingsGet('AllowDropboxSocial'));
|
this.dropboxEnable(!!RL.settingsGet('AllowDropboxSocial'));
|
||||||
this.dropboxApiKey(RL.settingsGet('DropboxApiKey'));
|
this.dropboxApiKey(RL.settingsGet('DropboxApiKey'));
|
||||||
|
|
|
||||||
|
|
@ -302,6 +302,18 @@ WebMailAjaxRemoteStorage.prototype.composeUploadExternals = function (fCallback,
|
||||||
}, 999000);
|
}, 999000);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {?Function} fCallback
|
||||||
|
* @param {Array} aExternals
|
||||||
|
*/
|
||||||
|
WebMailAjaxRemoteStorage.prototype.composeUploadDrive = function (fCallback, sUrl, sAccessToken)
|
||||||
|
{
|
||||||
|
this.defaultRequest(fCallback, 'ComposeUploadDrive', {
|
||||||
|
'AccessToken': sAccessToken,
|
||||||
|
'Url': sUrl
|
||||||
|
}, 999000);
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {?Function} fCallback
|
* @param {?Function} fCallback
|
||||||
* @param {string} sFolder
|
* @param {string} sFolder
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@ function AdminLoginViewModel()
|
||||||
|
|
||||||
this.submitCommand = Utils.createCommand(this, function () {
|
this.submitCommand = Utils.createCommand(this, function () {
|
||||||
|
|
||||||
|
Utils.triggerAutocompleteInputChange();
|
||||||
|
|
||||||
this.loginError('' === Utils.trim(this.login()));
|
this.loginError('' === Utils.trim(this.login()));
|
||||||
this.passwordError('' === Utils.trim(this.password()));
|
this.passwordError('' === Utils.trim(this.password()));
|
||||||
|
|
||||||
|
|
@ -89,9 +91,7 @@ AdminLoginViewModel.prototype.onHide = function ()
|
||||||
|
|
||||||
AdminLoginViewModel.prototype.onBuild = function ()
|
AdminLoginViewModel.prototype.onBuild = function ()
|
||||||
{
|
{
|
||||||
_.delay(function () {
|
Utils.triggerAutocompleteInputChange(true);
|
||||||
$('.checkAutocomplete').trigger('change');
|
|
||||||
}, 100);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
AdminLoginViewModel.prototype.submitForm = function ()
|
AdminLoginViewModel.prototype.submitForm = function ()
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,8 @@ function LoginViewModel()
|
||||||
|
|
||||||
this.submitCommand = Utils.createCommand(this, function () {
|
this.submitCommand = Utils.createCommand(this, function () {
|
||||||
|
|
||||||
|
Utils.triggerAutocompleteInputChange();
|
||||||
|
|
||||||
this.emailError('' === Utils.trim(this.email()));
|
this.emailError('' === Utils.trim(this.email()));
|
||||||
this.passwordError('' === Utils.trim(this.password()));
|
this.passwordError('' === Utils.trim(this.password()));
|
||||||
|
|
||||||
|
|
@ -326,9 +328,7 @@ LoginViewModel.prototype.onBuild = function ()
|
||||||
});
|
});
|
||||||
}, 50);
|
}, 50);
|
||||||
|
|
||||||
_.delay(function () {
|
Utils.triggerAutocompleteInputChange(true);
|
||||||
$('.checkAutocomplete').trigger('change');
|
|
||||||
}, 100);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -347,7 +347,7 @@ function PopupsComposeViewModel()
|
||||||
return this.dropboxEnabled();
|
return this.dropboxEnabled();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.driveEnabled = ko.observable(!!RL.settingsGet('GoogleApiKey') && !!RL.settingsGet('GoogleClientID'));
|
this.driveEnabled = ko.observable(false && Globals.bXMLHttpRequestSupported && !!RL.settingsGet('GoogleClientID'));
|
||||||
this.driveVisible = ko.observable(false);
|
this.driveVisible = ko.observable(false);
|
||||||
|
|
||||||
this.driveCommand = Utils.createCommand(this, function () {
|
this.driveCommand = Utils.createCommand(this, function () {
|
||||||
|
|
@ -992,13 +992,40 @@ PopupsComposeViewModel.prototype.onBuild = function ()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
PopupsComposeViewModel.prototype.driveCallback = function (oData)
|
PopupsComposeViewModel.prototype.driveCallback = function (sAccessToken, oData)
|
||||||
{
|
{
|
||||||
if (oData && window.google && oData[window.google.picker.Response.ACTION] === window.google.picker.Action.PICKED &&
|
if (oData && window.google && oData[window.google.picker.Response.ACTION] === window.google.picker.Action.PICKED &&
|
||||||
oData[window.google.picker.Response.DOCUMENTS] && oData[window.google.picker.Response.DOCUMENTS][0] &&
|
oData[window.google.picker.Response.DOCUMENTS] && oData[window.google.picker.Response.DOCUMENTS][0] &&
|
||||||
oData[window.google.picker.Response.DOCUMENTS][0]['url'])
|
oData[window.google.picker.Response.DOCUMENTS][0]['id'])
|
||||||
{
|
{
|
||||||
this.addDriveAttachment(oData[window.google.picker.Response.DOCUMENTS][0]);
|
var
|
||||||
|
self = this,
|
||||||
|
oRequest = new window.XMLHttpRequest()
|
||||||
|
;
|
||||||
|
|
||||||
|
oRequest.open('GET', 'https://www.googleapis.com/drive/v2/files/' + oData[window.google.picker.Response.DOCUMENTS][0]['id']);
|
||||||
|
oRequest.setRequestHeader('Authorization', 'Bearer ' + sAccessToken);
|
||||||
|
oRequest.addEventListener('load', function() {
|
||||||
|
if (oRequest && oRequest.responseText)
|
||||||
|
{
|
||||||
|
var oItem = JSON.parse(oRequest.responseText);
|
||||||
|
if (oItem && oItem['downloadUrl'])
|
||||||
|
{
|
||||||
|
window.console.log(oItem['downloadUrl']);
|
||||||
|
var oSubRequest = new window.XMLHttpRequest();
|
||||||
|
oSubRequest.open('GET', oItem['downloadUrl']);
|
||||||
|
oSubRequest.setRequestHeader('Authorization', 'Bearer ' + sAccessToken);
|
||||||
|
oSubRequest.addEventListener('load', function() {
|
||||||
|
window.console.log(oSubRequest);
|
||||||
|
});
|
||||||
|
|
||||||
|
oSubRequest.send();
|
||||||
|
// self.addDriveAttachment(oItem, sAccessToken);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
oRequest.send();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1018,9 +1045,8 @@ PopupsComposeViewModel.prototype.driveCreatePiker = function (oOauthToken)
|
||||||
.setIncludeFolders(true)
|
.setIncludeFolders(true)
|
||||||
)
|
)
|
||||||
.setAppId(RL.settingsGet('GoogleClientID'))
|
.setAppId(RL.settingsGet('GoogleClientID'))
|
||||||
.setDeveloperKey(RL.settingsGet('GoogleApiKey'))
|
|
||||||
.setOAuthToken(oOauthToken.access_token)
|
.setOAuthToken(oOauthToken.access_token)
|
||||||
.setCallback(_.bind(self.driveCallback, self))
|
.setCallback(_.bind(self.driveCallback, self, oOauthToken.access_token))
|
||||||
.enableFeature(window.google.picker.Feature.NAV_HIDDEN)
|
.enableFeature(window.google.picker.Feature.NAV_HIDDEN)
|
||||||
.build()
|
.build()
|
||||||
;
|
;
|
||||||
|
|
@ -1044,7 +1070,9 @@ PopupsComposeViewModel.prototype.driveOpenPopup = function ()
|
||||||
{
|
{
|
||||||
window.gapi.auth.authorize({
|
window.gapi.auth.authorize({
|
||||||
'client_id': RL.settingsGet('GoogleClientID'),
|
'client_id': RL.settingsGet('GoogleClientID'),
|
||||||
'scope': 'https://www.googleapis.com/auth/drive.readonly',
|
'scope': [
|
||||||
|
'https://www.googleapis.com/auth/drive.readonly'
|
||||||
|
].join(' '),
|
||||||
'immediate': false
|
'immediate': false
|
||||||
}, function (oAuthResult) {
|
}, function (oAuthResult) {
|
||||||
if (oAuthResult && !oAuthResult.error)
|
if (oAuthResult && !oAuthResult.error)
|
||||||
|
|
@ -1390,12 +1418,64 @@ PopupsComposeViewModel.prototype.addDropboxAttachment = function (oDropboxFile)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Object} oDriveFile
|
* @param {Object} oDriveFile
|
||||||
|
* @param {string} sAccessToken
|
||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
PopupsComposeViewModel.prototype.addDriveAttachment = function (oDriveFile)
|
PopupsComposeViewModel.prototype.addDriveAttachment = function (oDriveFile, sAccessToken)
|
||||||
{
|
{
|
||||||
window.console.log(oDriveFile);
|
var
|
||||||
return false;
|
self = this,
|
||||||
|
fCancelFunc = function (sId) {
|
||||||
|
return function () {
|
||||||
|
self.attachments.remove(function (oItem) {
|
||||||
|
return oItem && oItem.id === sId;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
},
|
||||||
|
iAttachmentSizeLimit = Utils.pInt(RL.settingsGet('AttachmentLimit')),
|
||||||
|
oAttachment = null,
|
||||||
|
mSize = Utils.pInt(oDriveFile['fileSize'])
|
||||||
|
;
|
||||||
|
|
||||||
|
oAttachment = new ComposeAttachmentModel(
|
||||||
|
oDriveFile['downloadUrl'], oDriveFile['originalFilename'], mSize
|
||||||
|
);
|
||||||
|
|
||||||
|
oAttachment.fromMessage = false;
|
||||||
|
oAttachment.cancel = fCancelFunc(oDriveFile['downloadUrl']);
|
||||||
|
oAttachment.waiting(false).uploading(true);
|
||||||
|
|
||||||
|
this.attachments.push(oAttachment);
|
||||||
|
|
||||||
|
if (0 < mSize && 0 < iAttachmentSizeLimit && iAttachmentSizeLimit < mSize)
|
||||||
|
{
|
||||||
|
oAttachment.uploading(false);
|
||||||
|
oAttachment.error(Utils.i18n('UPLOAD/ERROR_FILE_IS_TOO_BIG'));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
RL.remote().composeUploadDrive(function (sResult, oData) {
|
||||||
|
|
||||||
|
var bResult = false;
|
||||||
|
oAttachment.uploading(false);
|
||||||
|
|
||||||
|
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
|
||||||
|
{
|
||||||
|
if (oData.Result[oAttachment.id])
|
||||||
|
{
|
||||||
|
bResult = true;
|
||||||
|
oAttachment.tempName(oData.Result[oAttachment.id]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!bResult)
|
||||||
|
{
|
||||||
|
oAttachment.error(Utils.getUploadErrorDescByCode(Enums.UploadErrorCode.FileNoUploaded));
|
||||||
|
}
|
||||||
|
|
||||||
|
}, oDriveFile['downloadUrl'], sAccessToken);
|
||||||
|
|
||||||
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -449,8 +449,8 @@ class Http
|
||||||
$sNewUrl = $sUrl;
|
$sNewUrl = $sUrl;
|
||||||
|
|
||||||
$oCurl = \curl_init($sUrl);
|
$oCurl = \curl_init($sUrl);
|
||||||
|
|
||||||
\curl_setopt_array($oCurl, array(
|
$aAddOptions = array(
|
||||||
CURLOPT_URL => $sUrl,
|
CURLOPT_URL => $sUrl,
|
||||||
CURLOPT_HEADER => true,
|
CURLOPT_HEADER => true,
|
||||||
CURLOPT_NOBODY => true,
|
CURLOPT_NOBODY => true,
|
||||||
|
|
@ -460,7 +460,14 @@ class Http
|
||||||
CURLOPT_FORBID_REUSE => false,
|
CURLOPT_FORBID_REUSE => false,
|
||||||
CURLOPT_RETURNTRANSFER => true,
|
CURLOPT_RETURNTRANSFER => true,
|
||||||
CURLOPT_TIMEOUT => 5
|
CURLOPT_TIMEOUT => 5
|
||||||
));
|
);
|
||||||
|
|
||||||
|
if (isset($aOptions[CURLOPT_HTTPHEADER]) && \is_array($aOptions[CURLOPT_HTTPHEADER]) && 0 < \count($aOptions[CURLOPT_HTTPHEADER]))
|
||||||
|
{
|
||||||
|
$aAddOptions[CURLOPT_HTTPHEADER] = $aOptions[CURLOPT_HTTPHEADER];
|
||||||
|
}
|
||||||
|
|
||||||
|
\curl_setopt_array($oCurl, $aAddOptions);
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
|
@ -514,11 +521,12 @@ class Http
|
||||||
* @param int $iTimeout = 10
|
* @param int $iTimeout = 10
|
||||||
* @param string $sProxy = ''
|
* @param string $sProxy = ''
|
||||||
* @param string $sProxyAuth = ''
|
* @param string $sProxyAuth = ''
|
||||||
|
* @param string $sAuthorization = ''
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function SaveUrlToFile($sUrl, $rFile, $sCustomUserAgent = 'MailSo Http User Agent (v1)', &$sContentType = '', &$iCode = 0,
|
public function SaveUrlToFile($sUrl, $rFile, $sCustomUserAgent = 'MailSo Http User Agent (v1)', &$sContentType = '', &$iCode = 0,
|
||||||
$oLogger = null, $iTimeout = 10, $sProxy = '', $sProxyAuth = '')
|
$oLogger = null, $iTimeout = 10, $sProxy = '', $sProxyAuth = '', $sAuthorization = '')
|
||||||
{
|
{
|
||||||
if (!is_resource($rFile))
|
if (!is_resource($rFile))
|
||||||
{
|
{
|
||||||
|
|
@ -530,6 +538,8 @@ class Http
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$aHeaders = array();
|
||||||
|
|
||||||
$aOptions = array(
|
$aOptions = array(
|
||||||
CURLOPT_URL => $sUrl,
|
CURLOPT_URL => $sUrl,
|
||||||
CURLOPT_HEADER => false,
|
CURLOPT_HEADER => false,
|
||||||
|
|
@ -547,6 +557,11 @@ class Http
|
||||||
$aOptions[CURLOPT_USERAGENT] = $sCustomUserAgent;
|
$aOptions[CURLOPT_USERAGENT] = $sCustomUserAgent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (0 < \strlen($sAuthorization))
|
||||||
|
{
|
||||||
|
$aHeaders[] = 'Authorization '.$sAuthorization;
|
||||||
|
}
|
||||||
|
|
||||||
if (0 < \strlen($sProxy))
|
if (0 < \strlen($sProxy))
|
||||||
{
|
{
|
||||||
$aOptions[CURLOPT_PROXY] = $sProxy;
|
$aOptions[CURLOPT_PROXY] = $sProxy;
|
||||||
|
|
@ -556,6 +571,11 @@ class Http
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (0 < \count($aHeaders))
|
||||||
|
{
|
||||||
|
$aOptions[CURLOPT_HTTPHEADER] = $aHeaders;
|
||||||
|
}
|
||||||
|
|
||||||
if ($oLogger)
|
if ($oLogger)
|
||||||
{
|
{
|
||||||
$oLogger->Write('cUrl: URL: '.$sUrl);
|
$oLogger->Write('cUrl: URL: '.$sUrl);
|
||||||
|
|
|
||||||
|
|
@ -1130,13 +1130,11 @@ class Actions
|
||||||
|
|
||||||
$aResult['AllowGoogleSocial'] = (bool) $oConfig->Get('social', 'google_enable', false);
|
$aResult['AllowGoogleSocial'] = (bool) $oConfig->Get('social', 'google_enable', false);
|
||||||
$aResult['GoogleClientID'] = \trim($oConfig->Get('social', 'google_client_id', ''));
|
$aResult['GoogleClientID'] = \trim($oConfig->Get('social', 'google_client_id', ''));
|
||||||
$aResult['GoogleApiKey'] = \trim($oConfig->Get('social', 'google_api_key', ''));
|
|
||||||
if ($aResult['AllowGoogleSocial'] && (
|
if ($aResult['AllowGoogleSocial'] && (
|
||||||
'' === \trim($oConfig->Get('social', 'google_client_id', '')) || '' === \trim($oConfig->Get('social', 'google_client_secret', ''))))
|
'' === \trim($oConfig->Get('social', 'google_client_id', '')) || '' === \trim($oConfig->Get('social', 'google_client_secret', ''))))
|
||||||
{
|
{
|
||||||
$aResult['AllowGoogleSocial'] = false;
|
$aResult['AllowGoogleSocial'] = false;
|
||||||
$aResult['GoogleClientID'] = '';
|
$aResult['GoogleClientID'] = '';
|
||||||
$aResult['GoogleApiKey'] = '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$aResult['AllowFacebookSocial'] = (bool) $oConfig->Get('social', 'fb_enable', false);
|
$aResult['AllowFacebookSocial'] = (bool) $oConfig->Get('social', 'fb_enable', false);
|
||||||
|
|
@ -1193,7 +1191,6 @@ class Actions
|
||||||
$aResult['AllowGoogleSocial'] = (bool) $oConfig->Get('social', 'google_enable', false);
|
$aResult['AllowGoogleSocial'] = (bool) $oConfig->Get('social', 'google_enable', false);
|
||||||
$aResult['GoogleClientID'] = (string) $oConfig->Get('social', 'google_client_id', '');
|
$aResult['GoogleClientID'] = (string) $oConfig->Get('social', 'google_client_id', '');
|
||||||
$aResult['GoogleClientSecret'] = (string) $oConfig->Get('social', 'google_client_secret', '');
|
$aResult['GoogleClientSecret'] = (string) $oConfig->Get('social', 'google_client_secret', '');
|
||||||
$aResult['GoogleApiKey'] = (string) $oConfig->Get('social', 'google_api_key', '');
|
|
||||||
|
|
||||||
$aResult['AllowFacebookSocial'] = (bool) $oConfig->Get('social', 'fb_enable', false);
|
$aResult['AllowFacebookSocial'] = (bool) $oConfig->Get('social', 'fb_enable', false);
|
||||||
$aResult['FacebookAppID'] = (string) $oConfig->Get('social', 'fb_app_id', '');
|
$aResult['FacebookAppID'] = (string) $oConfig->Get('social', 'fb_app_id', '');
|
||||||
|
|
@ -2399,7 +2396,6 @@ class Actions
|
||||||
$this->setConfigFromParams($oConfig, 'GoogleEnable', 'social', 'google_enable', 'bool');
|
$this->setConfigFromParams($oConfig, 'GoogleEnable', 'social', 'google_enable', 'bool');
|
||||||
$this->setConfigFromParams($oConfig, 'GoogleClientID', 'social', 'google_client_id', 'string');
|
$this->setConfigFromParams($oConfig, 'GoogleClientID', 'social', 'google_client_id', 'string');
|
||||||
$this->setConfigFromParams($oConfig, 'GoogleClientSecret', 'social', 'google_client_secret', 'string');
|
$this->setConfigFromParams($oConfig, 'GoogleClientSecret', 'social', 'google_client_secret', 'string');
|
||||||
$this->setConfigFromParams($oConfig, 'GoogleApiKey', 'social', 'google_api_key', 'string');
|
|
||||||
|
|
||||||
$this->setConfigFromParams($oConfig, 'FacebookEnable', 'social', 'fb_enable', 'bool');
|
$this->setConfigFromParams($oConfig, 'FacebookEnable', 'social', 'fb_enable', 'bool');
|
||||||
$this->setConfigFromParams($oConfig, 'FacebookAppID', 'social', 'fb_app_id', 'string');
|
$this->setConfigFromParams($oConfig, 'FacebookAppID', 'social', 'fb_app_id', 'string');
|
||||||
|
|
@ -5827,6 +5823,45 @@ class Actions
|
||||||
|
|
||||||
return $this->DefaultResponse(__FUNCTION__, $mResult);
|
return $this->DefaultResponse(__FUNCTION__, $mResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function DoComposeUploadDrive()
|
||||||
|
{
|
||||||
|
$oAccount = $this->getAccountFromToken();
|
||||||
|
|
||||||
|
$mResult = false;
|
||||||
|
$sUrl = $this->GetActionParam('Url', '');
|
||||||
|
$sAccessToken = $this->GetActionParam('AccessToken', '');
|
||||||
|
|
||||||
|
if (0 < \strlen($sUrl) && 0 < \strlen($sAccessToken))
|
||||||
|
{
|
||||||
|
$oHttp = \MailSo\Base\Http::SingletonInstance();
|
||||||
|
|
||||||
|
$mResult[$sUrl] = '';
|
||||||
|
|
||||||
|
$sTempName = \md5($sUrl);
|
||||||
|
|
||||||
|
$iCode = 0;
|
||||||
|
$sContentType = '';
|
||||||
|
|
||||||
|
$rFile = $this->FilesProvider()->GetFile($oAccount, $sTempName, 'wb+');
|
||||||
|
if ($rFile && $oHttp->SaveUrlToFile($sUrl, $rFile, '', $sContentType, $iCode, $this->Logger(), 60,
|
||||||
|
$this->Config()->Get('labs', 'curl_proxy', ''), $this->Config()->Get('labs', 'curl_proxy_auth', ''),
|
||||||
|
'Authorization: Bearer '.$sAccessToken))
|
||||||
|
{
|
||||||
|
$mResult[$sUrl] = $sTempName;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (\is_resource($rFile))
|
||||||
|
{
|
||||||
|
@\fclose($rFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->DefaultResponse(__FUNCTION__, $mResult);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
||||||
|
|
@ -37,16 +37,6 @@
|
||||||
<div data-bind="saveTrigger: googleTrigger2"></div>
|
<div data-bind="saveTrigger: googleTrigger2"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label">
|
|
||||||
Client Api Key
|
|
||||||
</label>
|
|
||||||
<div class="controls">
|
|
||||||
<input type="text" class="span5" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
|
||||||
data-bind="value: googleApiKey, saveTrigger: googleTrigger3" />
|
|
||||||
<div data-bind="saveTrigger: googleTrigger3"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="legend">
|
<div class="legend">
|
||||||
Facebook
|
Facebook
|
||||||
<span style="color: #ccc; font-size: 14px;" data-bind="visible: !facebookSupported()">(requires PHP 5.4 or greater)</span>
|
<span style="color: #ccc; font-size: 14px;" data-bind="visible: !facebookSupported()">(requires PHP 5.4 or greater)</span>
|
||||||
|
|
|
||||||
|
|
@ -637,7 +637,7 @@
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */
|
/*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */
|
||||||
|
|
||||||
/* =============================================================================
|
/* =============================================================================
|
||||||
|
|
@ -1142,7 +1142,7 @@ table {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border-spacing: 0;
|
border-spacing: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
|
|
@ -1513,7 +1513,7 @@ table {
|
||||||
.icon-resize-out:before {
|
.icon-resize-out:before {
|
||||||
content: "\e06d";
|
content: "\e06d";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** initial setup **/
|
/** initial setup **/
|
||||||
.nano {
|
.nano {
|
||||||
/*
|
/*
|
||||||
|
|
@ -1630,7 +1630,7 @@ table {
|
||||||
.nano > .pane2:hover > .slider2, .nano > .pane2.active > .slider2 {
|
.nano > .pane2:hover > .slider2, .nano > .pane2.active > .slider2 {
|
||||||
background-color: rgba(0, 0, 0, 0.4);
|
background-color: rgba(0, 0, 0, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Magnific Popup CSS */
|
/* Magnific Popup CSS */
|
||||||
.mfp-bg {
|
.mfp-bg {
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
@ -1995,7 +1995,7 @@ img.mfp-img {
|
||||||
right: 0;
|
right: 0;
|
||||||
padding-top: 0; }
|
padding-top: 0; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* overlay at start */
|
/* overlay at start */
|
||||||
.mfp-fade.mfp-bg {
|
.mfp-fade.mfp-bg {
|
||||||
|
|
@ -2041,7 +2041,7 @@ img.mfp-img {
|
||||||
-moz-transform: translateX(50px);
|
-moz-transform: translateX(50px);
|
||||||
transform: translateX(50px);
|
transform: translateX(50px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.simple-pace {
|
.simple-pace {
|
||||||
-webkit-pointer-events: none;
|
-webkit-pointer-events: none;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|
@ -2112,7 +2112,7 @@ img.mfp-img {
|
||||||
@keyframes simple-pace-stripe-animation {
|
@keyframes simple-pace-stripe-animation {
|
||||||
0% { transform: none; transform: none; }
|
0% { transform: none; transform: none; }
|
||||||
100% { transform: translate(-32px, 0); transform: translate(-32px, 0); }
|
100% { transform: translate(-32px, 0); transform: translate(-32px, 0); }
|
||||||
}
|
}
|
||||||
.inputosaurus-container {
|
.inputosaurus-container {
|
||||||
background-color:#fff;
|
background-color:#fff;
|
||||||
border:1px solid #bcbec0;
|
border:1px solid #bcbec0;
|
||||||
|
|
@ -2180,7 +2180,7 @@ img.mfp-img {
|
||||||
box-shadow:none;
|
box-shadow:none;
|
||||||
}
|
}
|
||||||
.inputosaurus-input-hidden { display:none; }
|
.inputosaurus-input-hidden { display:none; }
|
||||||
|
|
||||||
.flag-wrapper {
|
.flag-wrapper {
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
|
|
@ -2226,7 +2226,7 @@ img.mfp-img {
|
||||||
.flag.flag-pt-br {background-position: -192px -11px}
|
.flag.flag-pt-br {background-position: -192px -11px}
|
||||||
|
|
||||||
.flag.flag-cn, .flag.flag-zh-tw, .flag.flag-zh-cn, .flag.flag-zh-hk {background-position: -208px -22px}
|
.flag.flag-cn, .flag.flag-zh-tw, .flag.flag-zh-cn, .flag.flag-zh-hk {background-position: -208px -22px}
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
.clearfix {
|
.clearfix {
|
||||||
*zoom: 1;
|
*zoom: 1;
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ var
|
||||||
|
|
||||||
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
|
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
|
||||||
;
|
;
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/*jshint onevar: false*/
|
/*jshint onevar: false*/
|
||||||
|
|
@ -87,7 +87,7 @@ var
|
||||||
*/
|
*/
|
||||||
var RL = null;
|
var RL = null;
|
||||||
/*jshint onevar: true*/
|
/*jshint onevar: true*/
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -170,6 +170,11 @@ Globals.bAllowPdfPreview = !Globals.bMobileDevice;
|
||||||
*/
|
*/
|
||||||
Globals.bAnimationSupported = !Globals.bMobileDevice && $html.hasClass('csstransitions');
|
Globals.bAnimationSupported = !Globals.bMobileDevice && $html.hasClass('csstransitions');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {boolean}
|
||||||
|
*/
|
||||||
|
Globals.bXMLHttpRequestSupported = !!window.XMLHttpRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
|
|
@ -243,7 +248,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
|
||||||
return oType && 'application/pdf' === oType.type;
|
return oType && 'application/pdf' === oType.type;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
Consts.Defaults = {};
|
Consts.Defaults = {};
|
||||||
|
|
@ -363,7 +368,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
|
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -794,7 +799,7 @@ Enums.Notification = {
|
||||||
'UnknownNotification': 999,
|
'UnknownNotification': 999,
|
||||||
'UnknownError': 999
|
'UnknownError': 999
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
Utils.trim = $.trim;
|
Utils.trim = $.trim;
|
||||||
|
|
@ -1915,7 +1920,6 @@ Utils.initDataConstructorBySettings = function (oData)
|
||||||
oData.googleEnable = ko.observable(false);
|
oData.googleEnable = ko.observable(false);
|
||||||
oData.googleClientID = ko.observable('');
|
oData.googleClientID = ko.observable('');
|
||||||
oData.googleClientSecret = ko.observable('');
|
oData.googleClientSecret = ko.observable('');
|
||||||
oData.googleApiKey = ko.observable('');
|
|
||||||
|
|
||||||
oData.dropboxEnable = ko.observable(false);
|
oData.dropboxEnable = ko.observable(false);
|
||||||
oData.dropboxApiKey = ko.observable('');
|
oData.dropboxApiKey = ko.observable('');
|
||||||
|
|
@ -2814,6 +2818,24 @@ Utils.detectDropdownVisibility = _.debounce(function () {
|
||||||
}));
|
}));
|
||||||
}, 50);
|
}, 50);
|
||||||
|
|
||||||
|
Utils.triggerAutocompleteInputChange = function (bDelay) {
|
||||||
|
|
||||||
|
var fFunc = function () {
|
||||||
|
$('.checkAutocomplete').trigger('change');
|
||||||
|
};
|
||||||
|
|
||||||
|
if (bDelay)
|
||||||
|
{
|
||||||
|
_.delay(fFunc, 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fFunc();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*jslint bitwise: true*/
|
/*jslint bitwise: true*/
|
||||||
// Base64 encode / decode
|
// Base64 encode / decode
|
||||||
// http://www.webtoolkit.info/
|
// http://www.webtoolkit.info/
|
||||||
|
|
@ -2977,7 +2999,7 @@ Base64 = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*jslint bitwise: false*/
|
/*jslint bitwise: false*/
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
ko.bindingHandlers.tooltip = {
|
ko.bindingHandlers.tooltip = {
|
||||||
|
|
@ -3820,7 +3842,7 @@ ko.observable.fn.validateFunc = function (fFunc)
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -4126,7 +4148,7 @@ LinkBuilder.prototype.socialFacebook = function ()
|
||||||
{
|
{
|
||||||
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
|
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -4222,7 +4244,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -4298,7 +4320,7 @@ CookieDriver.prototype.get = function (sKey)
|
||||||
|
|
||||||
return mResult;
|
return mResult;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -4371,7 +4393,7 @@ LocalStorageDriver.prototype.get = function (sKey)
|
||||||
|
|
||||||
return mResult;
|
return mResult;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -4416,7 +4438,7 @@ LocalStorage.prototype.get = function (iKey)
|
||||||
{
|
{
|
||||||
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
|
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -4431,7 +4453,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
|
||||||
{
|
{
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -4526,7 +4548,7 @@ KnoinAbstractViewModel.prototype.registerPopupKeyDown = function ()
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -4604,7 +4626,7 @@ KnoinAbstractScreen.prototype.__start = function ()
|
||||||
this.oCross = oRoute;
|
this.oCross = oRoute;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -5020,7 +5042,7 @@ Knoin.prototype.bootstart = function ()
|
||||||
};
|
};
|
||||||
|
|
||||||
kn = new Knoin();
|
kn = new Knoin();
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -5386,7 +5408,7 @@ EmailModel.prototype.inputoTagLine = function ()
|
||||||
{
|
{
|
||||||
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
|
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -5432,7 +5454,7 @@ ContactTagModel.prototype.toLine = function (bEncodeHtml)
|
||||||
return (Utils.isUnd(bEncodeHtml) ? false : !!bEncodeHtml) ?
|
return (Utils.isUnd(bEncodeHtml) ? false : !!bEncodeHtml) ?
|
||||||
Utils.encodeHtml(this.name()) : this.name();
|
Utils.encodeHtml(this.name()) : this.name();
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -5729,7 +5751,7 @@ PopupsDomainViewModel.prototype.clearForm = function ()
|
||||||
this.smtpAuth(true);
|
this.smtpAuth(true);
|
||||||
this.whiteList('');
|
this.whiteList('');
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -5873,7 +5895,7 @@ PopupsPluginViewModel.prototype.onBuild = function ()
|
||||||
return false;
|
return false;
|
||||||
}, this));
|
}, this));
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -5991,7 +6013,7 @@ PopupsActivateViewModel.prototype.validateSubscriptionKey = function ()
|
||||||
{
|
{
|
||||||
var sValue = this.key();
|
var sValue = this.key();
|
||||||
return '' === sValue || !!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(Utils.trim(sValue));
|
return '' === sValue || !!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(Utils.trim(sValue));
|
||||||
};
|
};
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -6053,7 +6075,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
|
||||||
RL.data().mainLanguage(sLang);
|
RL.data().mainLanguage(sLang);
|
||||||
this.cancelCommand();
|
this.cancelCommand();
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -6166,7 +6188,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
|
||||||
}, this));
|
}, this));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -6198,6 +6220,8 @@ function AdminLoginViewModel()
|
||||||
|
|
||||||
this.submitCommand = Utils.createCommand(this, function () {
|
this.submitCommand = Utils.createCommand(this, function () {
|
||||||
|
|
||||||
|
Utils.triggerAutocompleteInputChange();
|
||||||
|
|
||||||
this.loginError('' === Utils.trim(this.login()));
|
this.loginError('' === Utils.trim(this.login()));
|
||||||
this.passwordError('' === Utils.trim(this.password()));
|
this.passwordError('' === Utils.trim(this.password()));
|
||||||
|
|
||||||
|
|
@ -6258,16 +6282,14 @@ AdminLoginViewModel.prototype.onHide = function ()
|
||||||
|
|
||||||
AdminLoginViewModel.prototype.onBuild = function ()
|
AdminLoginViewModel.prototype.onBuild = function ()
|
||||||
{
|
{
|
||||||
_.delay(function () {
|
Utils.triggerAutocompleteInputChange(true);
|
||||||
$('.checkAutocomplete').trigger('change');
|
|
||||||
}, 100);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
AdminLoginViewModel.prototype.submitForm = function ()
|
AdminLoginViewModel.prototype.submitForm = function ()
|
||||||
{
|
{
|
||||||
this.submitCommand();
|
this.submitCommand();
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -6293,7 +6315,7 @@ AdminMenuViewModel.prototype.link = function (sRoute)
|
||||||
{
|
{
|
||||||
return '#/' + sRoute;
|
return '#/' + sRoute;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -6319,7 +6341,7 @@ AdminPaneViewModel.prototype.logoutClick = function ()
|
||||||
RL.remote().adminLogout(function () {
|
RL.remote().adminLogout(function () {
|
||||||
RL.loginAndLogoutReload();
|
RL.loginAndLogoutReload();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -6447,7 +6469,7 @@ AdminGeneral.prototype.phpInfoLink = function ()
|
||||||
return RL.link().phpInfo();
|
return RL.link().phpInfo();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -6501,7 +6523,7 @@ AdminLogin.prototype.onBuild = function ()
|
||||||
|
|
||||||
}, 50);
|
}, 50);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -6572,7 +6594,7 @@ AdminBranding.prototype.onBuild = function ()
|
||||||
|
|
||||||
}, 50);
|
}, 50);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -6794,7 +6816,7 @@ AdminContacts.prototype.onBuild = function ()
|
||||||
|
|
||||||
}, 50);
|
}, 50);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -6885,7 +6907,7 @@ AdminDomains.prototype.onDomainListChangeRequest = function ()
|
||||||
{
|
{
|
||||||
RL.reloadDomainList();
|
RL.reloadDomainList();
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -7000,7 +7022,7 @@ AdminSecurity.prototype.phpInfoLink = function ()
|
||||||
{
|
{
|
||||||
return RL.link().phpInfo();
|
return RL.link().phpInfo();
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -7013,10 +7035,8 @@ function AdminSocial()
|
||||||
this.googleEnable = oData.googleEnable;
|
this.googleEnable = oData.googleEnable;
|
||||||
this.googleClientID = oData.googleClientID;
|
this.googleClientID = oData.googleClientID;
|
||||||
this.googleClientSecret = oData.googleClientSecret;
|
this.googleClientSecret = oData.googleClientSecret;
|
||||||
this.googleApiKey = oData.googleApiKey;
|
|
||||||
this.googleTrigger1 = ko.observable(Enums.SaveSettingsStep.Idle);
|
this.googleTrigger1 = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||||
this.googleTrigger2 = ko.observable(Enums.SaveSettingsStep.Idle);
|
this.googleTrigger2 = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||||
this.googleTrigger3 = ko.observable(Enums.SaveSettingsStep.Idle);
|
|
||||||
|
|
||||||
this.facebookSupported = oData.facebookSupported;
|
this.facebookSupported = oData.facebookSupported;
|
||||||
this.facebookEnable = oData.facebookEnable;
|
this.facebookEnable = oData.facebookEnable;
|
||||||
|
|
@ -7050,7 +7070,6 @@ AdminSocial.prototype.onBuild = function ()
|
||||||
f4 = Utils.settingsSaveHelperSimpleFunction(self.twitterTrigger2, self),
|
f4 = Utils.settingsSaveHelperSimpleFunction(self.twitterTrigger2, self),
|
||||||
f5 = Utils.settingsSaveHelperSimpleFunction(self.googleTrigger1, self),
|
f5 = Utils.settingsSaveHelperSimpleFunction(self.googleTrigger1, self),
|
||||||
f6 = Utils.settingsSaveHelperSimpleFunction(self.googleTrigger2, self),
|
f6 = Utils.settingsSaveHelperSimpleFunction(self.googleTrigger2, self),
|
||||||
f7 = Utils.settingsSaveHelperSimpleFunction(self.googleTrigger3, self),
|
|
||||||
f8 = Utils.settingsSaveHelperSimpleFunction(self.dropboxTrigger1, self)
|
f8 = Utils.settingsSaveHelperSimpleFunction(self.dropboxTrigger1, self)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
@ -7117,12 +7136,6 @@ AdminSocial.prototype.onBuild = function ()
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
self.googleApiKey.subscribe(function (sValue) {
|
|
||||||
RL.remote().saveAdminConfig(f7, {
|
|
||||||
'GoogleApiKey': Utils.trim(sValue)
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
self.dropboxEnable.subscribe(function (bValue) {
|
self.dropboxEnable.subscribe(function (bValue) {
|
||||||
RL.remote().saveAdminConfig(Utils.emptyFunction, {
|
RL.remote().saveAdminConfig(Utils.emptyFunction, {
|
||||||
'DropboxEnable': bValue ? '1' : '0'
|
'DropboxEnable': bValue ? '1' : '0'
|
||||||
|
|
@ -7137,7 +7150,7 @@ AdminSocial.prototype.onBuild = function ()
|
||||||
|
|
||||||
}, 50);
|
}, 50);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -7236,7 +7249,7 @@ AdminPlugins.prototype.onPluginDisableRequest = function (sResult, oData)
|
||||||
|
|
||||||
RL.reloadPluginList();
|
RL.reloadPluginList();
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -7336,7 +7349,7 @@ AdminPackages.prototype.installPackage = function (oPackage)
|
||||||
RL.remote().packageInstall(this.requestHelper(oPackage, true), oPackage);
|
RL.remote().packageInstall(this.requestHelper(oPackage, true), oPackage);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -7393,7 +7406,7 @@ AdminLicensing.prototype.licenseExpiredMomentValue = function ()
|
||||||
;
|
;
|
||||||
|
|
||||||
return iTime && 1898625600 === iTime ? 'Never' : (oDate.format('LL') + ' (' + oDate.from(moment()) + ')');
|
return iTime && 1898625600 === iTime ? 'Never' : (oDate.format('LL') + ' (' + oDate.from(moment()) + ')');
|
||||||
};
|
};
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -7470,7 +7483,7 @@ AdminAbout.prototype.updateCoreData = function ()
|
||||||
RL.updateCoreData();
|
RL.updateCoreData();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -7598,14 +7611,13 @@ AbstractData.prototype.populateDataOnStart = function()
|
||||||
this.googleEnable(!!RL.settingsGet('AllowGoogleSocial'));
|
this.googleEnable(!!RL.settingsGet('AllowGoogleSocial'));
|
||||||
this.googleClientID(RL.settingsGet('GoogleClientID'));
|
this.googleClientID(RL.settingsGet('GoogleClientID'));
|
||||||
this.googleClientSecret(RL.settingsGet('GoogleClientSecret'));
|
this.googleClientSecret(RL.settingsGet('GoogleClientSecret'));
|
||||||
this.googleApiKey(RL.settingsGet('GoogleApiKey'));
|
|
||||||
|
|
||||||
this.dropboxEnable(!!RL.settingsGet('AllowDropboxSocial'));
|
this.dropboxEnable(!!RL.settingsGet('AllowDropboxSocial'));
|
||||||
this.dropboxApiKey(RL.settingsGet('DropboxApiKey'));
|
this.dropboxApiKey(RL.settingsGet('DropboxApiKey'));
|
||||||
|
|
||||||
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
|
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -7658,7 +7670,7 @@ _.extend(AdminDataStorage.prototype, AbstractData.prototype);
|
||||||
AdminDataStorage.prototype.populateDataOnStart = function()
|
AdminDataStorage.prototype.populateDataOnStart = function()
|
||||||
{
|
{
|
||||||
AbstractData.prototype.populateDataOnStart.call(this);
|
AbstractData.prototype.populateDataOnStart.call(this);
|
||||||
};
|
};
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -7942,7 +7954,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
|
||||||
'Version': sVersion
|
'Version': sVersion
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -8205,7 +8217,7 @@ AdminAjaxRemoteStorage.prototype.adminPing = function (fCallback)
|
||||||
{
|
{
|
||||||
this.defaultRequest(fCallback, 'AdminPing');
|
this.defaultRequest(fCallback, 'AdminPing');
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -8266,7 +8278,7 @@ AbstractCacheStorage.prototype.setServicesData = function (oData)
|
||||||
{
|
{
|
||||||
this.oServices = oData;
|
this.oServices = oData;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -8279,7 +8291,7 @@ function AdminCacheStorage()
|
||||||
}
|
}
|
||||||
|
|
||||||
_.extend(AdminCacheStorage.prototype, AbstractCacheStorage.prototype);
|
_.extend(AdminCacheStorage.prototype, AbstractCacheStorage.prototype);
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -8461,7 +8473,7 @@ AbstractSettings.prototype.routes = function ()
|
||||||
['', oRules]
|
['', oRules]
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -8478,7 +8490,7 @@ _.extend(AdminLoginScreen.prototype, KnoinAbstractScreen.prototype);
|
||||||
AdminLoginScreen.prototype.onShow = function ()
|
AdminLoginScreen.prototype.onShow = function ()
|
||||||
{
|
{
|
||||||
RL.setTitle('');
|
RL.setTitle('');
|
||||||
};
|
};
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -8498,7 +8510,7 @@ _.extend(AdminSettingsScreen.prototype, AbstractSettings.prototype);
|
||||||
AdminSettingsScreen.prototype.onShow = function ()
|
AdminSettingsScreen.prototype.onShow = function ()
|
||||||
{
|
{
|
||||||
RL.setTitle('');
|
RL.setTitle('');
|
||||||
};
|
};
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -8858,7 +8870,7 @@ AbstractApp.prototype.bootstart = function ()
|
||||||
|
|
||||||
ssm.ready();
|
ssm.ready();
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -9161,7 +9173,7 @@ AdminApp.prototype.bootstart = function ()
|
||||||
* @type {AdminApp}
|
* @type {AdminApp}
|
||||||
*/
|
*/
|
||||||
RL = new AdminApp();
|
RL = new AdminApp();
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
|
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
|
||||||
|
|
@ -9214,7 +9226,7 @@ window['__RLBOOT'] = function (fCall) {
|
||||||
window['__RLBOOT'] = null;
|
window['__RLBOOT'] = null;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
if (window.SimplePace) {
|
if (window.SimplePace) {
|
||||||
window.SimplePace.add(10);
|
window.SimplePace.add(10);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
8
rainloop/v/0.0.0/static/js/admin.min.js
vendored
8
rainloop/v/0.0.0/static/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -78,7 +78,7 @@ var
|
||||||
|
|
||||||
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
|
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
|
||||||
;
|
;
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/*jshint onevar: false*/
|
/*jshint onevar: false*/
|
||||||
|
|
@ -90,7 +90,7 @@ var
|
||||||
|
|
||||||
$proxyDiv = $('<div></div>')
|
$proxyDiv = $('<div></div>')
|
||||||
;
|
;
|
||||||
/*jshint onevar: true*/
|
/*jshint onevar: true*/
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -173,6 +173,11 @@ Globals.bAllowPdfPreview = !Globals.bMobileDevice;
|
||||||
*/
|
*/
|
||||||
Globals.bAnimationSupported = !Globals.bMobileDevice && $html.hasClass('csstransitions');
|
Globals.bAnimationSupported = !Globals.bMobileDevice && $html.hasClass('csstransitions');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {boolean}
|
||||||
|
*/
|
||||||
|
Globals.bXMLHttpRequestSupported = !!window.XMLHttpRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
|
|
@ -246,7 +251,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
|
||||||
return oType && 'application/pdf' === oType.type;
|
return oType && 'application/pdf' === oType.type;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
Consts.Defaults = {};
|
Consts.Defaults = {};
|
||||||
|
|
@ -366,7 +371,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
|
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -797,7 +802,7 @@ Enums.Notification = {
|
||||||
'UnknownNotification': 999,
|
'UnknownNotification': 999,
|
||||||
'UnknownError': 999
|
'UnknownError': 999
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
Utils.trim = $.trim;
|
Utils.trim = $.trim;
|
||||||
|
|
@ -1918,7 +1923,6 @@ Utils.initDataConstructorBySettings = function (oData)
|
||||||
oData.googleEnable = ko.observable(false);
|
oData.googleEnable = ko.observable(false);
|
||||||
oData.googleClientID = ko.observable('');
|
oData.googleClientID = ko.observable('');
|
||||||
oData.googleClientSecret = ko.observable('');
|
oData.googleClientSecret = ko.observable('');
|
||||||
oData.googleApiKey = ko.observable('');
|
|
||||||
|
|
||||||
oData.dropboxEnable = ko.observable(false);
|
oData.dropboxEnable = ko.observable(false);
|
||||||
oData.dropboxApiKey = ko.observable('');
|
oData.dropboxApiKey = ko.observable('');
|
||||||
|
|
@ -2817,6 +2821,24 @@ Utils.detectDropdownVisibility = _.debounce(function () {
|
||||||
}));
|
}));
|
||||||
}, 50);
|
}, 50);
|
||||||
|
|
||||||
|
Utils.triggerAutocompleteInputChange = function (bDelay) {
|
||||||
|
|
||||||
|
var fFunc = function () {
|
||||||
|
$('.checkAutocomplete').trigger('change');
|
||||||
|
};
|
||||||
|
|
||||||
|
if (bDelay)
|
||||||
|
{
|
||||||
|
_.delay(fFunc, 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fFunc();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*jslint bitwise: true*/
|
/*jslint bitwise: true*/
|
||||||
// Base64 encode / decode
|
// Base64 encode / decode
|
||||||
// http://www.webtoolkit.info/
|
// http://www.webtoolkit.info/
|
||||||
|
|
@ -2980,7 +3002,7 @@ Base64 = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*jslint bitwise: false*/
|
/*jslint bitwise: false*/
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
ko.bindingHandlers.tooltip = {
|
ko.bindingHandlers.tooltip = {
|
||||||
|
|
@ -3823,7 +3845,7 @@ ko.observable.fn.validateFunc = function (fFunc)
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -4129,7 +4151,7 @@ LinkBuilder.prototype.socialFacebook = function ()
|
||||||
{
|
{
|
||||||
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
|
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -4225,7 +4247,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
|
|
@ -4464,7 +4486,7 @@ NewHtmlEditorWrapper.prototype.clear = function (bFocus)
|
||||||
this.setHtml('', bFocus);
|
this.setHtml('', bFocus);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -5177,7 +5199,7 @@ Selector.prototype.on = function (sEventName, fCallback)
|
||||||
{
|
{
|
||||||
this.oCallbacks[sEventName] = fCallback;
|
this.oCallbacks[sEventName] = fCallback;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -5253,7 +5275,7 @@ CookieDriver.prototype.get = function (sKey)
|
||||||
|
|
||||||
return mResult;
|
return mResult;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -5326,7 +5348,7 @@ LocalStorageDriver.prototype.get = function (sKey)
|
||||||
|
|
||||||
return mResult;
|
return mResult;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -5371,7 +5393,7 @@ LocalStorage.prototype.get = function (iKey)
|
||||||
{
|
{
|
||||||
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
|
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -5386,7 +5408,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
|
||||||
{
|
{
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -5481,7 +5503,7 @@ KnoinAbstractViewModel.prototype.registerPopupKeyDown = function ()
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -5559,7 +5581,7 @@ KnoinAbstractScreen.prototype.__start = function ()
|
||||||
this.oCross = oRoute;
|
this.oCross = oRoute;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -5975,7 +5997,7 @@ Knoin.prototype.bootstart = function ()
|
||||||
};
|
};
|
||||||
|
|
||||||
kn = new Knoin();
|
kn = new Knoin();
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -6341,7 +6363,7 @@ EmailModel.prototype.inputoTagLine = function ()
|
||||||
{
|
{
|
||||||
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
|
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -6467,7 +6489,7 @@ ContactModel.prototype.lineAsCcc = function ()
|
||||||
|
|
||||||
return aResult.join(' ');
|
return aResult.join(' ');
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -6498,7 +6520,7 @@ function ContactPropertyModel(iType, sTypeStr, sValue, bFocused, sPlaceholder)
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -6544,7 +6566,7 @@ ContactTagModel.prototype.toLine = function (bEncodeHtml)
|
||||||
return (Utils.isUnd(bEncodeHtml) ? false : !!bEncodeHtml) ?
|
return (Utils.isUnd(bEncodeHtml) ? false : !!bEncodeHtml) ?
|
||||||
Utils.encodeHtml(this.name()) : this.name();
|
Utils.encodeHtml(this.name()) : this.name();
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -6782,7 +6804,7 @@ AttachmentModel.prototype.iconClass = function ()
|
||||||
|
|
||||||
return sClass;
|
return sClass;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -6845,7 +6867,7 @@ ComposeAttachmentModel.prototype.initByUploadJson = function (oJsonAttachment)
|
||||||
}
|
}
|
||||||
|
|
||||||
return bResult;
|
return bResult;
|
||||||
};
|
};
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -8071,7 +8093,7 @@ MessageModel.prototype.flagHash = function ()
|
||||||
return [this.deleted(), this.unseen(), this.flagged(), this.answered(), this.forwarded(),
|
return [this.deleted(), this.unseen(), this.flagged(), this.answered(), this.forwarded(),
|
||||||
this.isReadReceipt()].join('');
|
this.isReadReceipt()].join('');
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -8405,7 +8427,7 @@ FolderModel.prototype.printableFullName = function ()
|
||||||
{
|
{
|
||||||
return this.fullName.split(this.delimiter).join(' / ');
|
return this.fullName.split(this.delimiter).join(' / ');
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -8428,7 +8450,7 @@ AccountModel.prototype.email = '';
|
||||||
AccountModel.prototype.changeAccountLink = function ()
|
AccountModel.prototype.changeAccountLink = function ()
|
||||||
{
|
{
|
||||||
return RL.link().change(this.email);
|
return RL.link().change(this.email);
|
||||||
};
|
};
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -8466,7 +8488,7 @@ IdentityModel.prototype.formattedNameForEmail = function ()
|
||||||
var sName = this.name();
|
var sName = this.name();
|
||||||
return '' === sName ? this.email() : '"' + Utils.quoteName(sName) + '" <' + this.email() + '>';
|
return '' === sName ? this.email() : '"' + Utils.quoteName(sName) + '" <' + this.email() + '>';
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -8516,7 +8538,7 @@ FilterActionModel.prototype.removeSelf = function ()
|
||||||
{
|
{
|
||||||
this.parentList.remove(this);
|
this.parentList.remove(this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -8567,7 +8589,7 @@ FilterConditionModel.prototype.removeSelf = function ()
|
||||||
this.parentList.remove(this);
|
this.parentList.remove(this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -8623,7 +8645,7 @@ FilterModel.prototype.parse = function (oItem)
|
||||||
|
|
||||||
return bResult;
|
return bResult;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -8656,7 +8678,7 @@ OpenPgpKeyModel.prototype.user = '';
|
||||||
OpenPgpKeyModel.prototype.email = '';
|
OpenPgpKeyModel.prototype.email = '';
|
||||||
OpenPgpKeyModel.prototype.armor = '';
|
OpenPgpKeyModel.prototype.armor = '';
|
||||||
OpenPgpKeyModel.prototype.isPrivate = false;
|
OpenPgpKeyModel.prototype.isPrivate = false;
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -8754,7 +8776,7 @@ PopupsFolderClearViewModel.prototype.onShow = function (oFolder)
|
||||||
this.selectedFolder(oFolder);
|
this.selectedFolder(oFolder);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -8866,7 +8888,7 @@ PopupsFolderCreateViewModel.prototype.onFocus = function ()
|
||||||
{
|
{
|
||||||
this.folderName.focused(true);
|
this.folderName.focused(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -8981,7 +9003,7 @@ PopupsFolderSystemViewModel.prototype.onShow = function (iNotificationType)
|
||||||
this.notification(sNotification);
|
this.notification(sNotification);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -9331,7 +9353,7 @@ function PopupsComposeViewModel()
|
||||||
return this.dropboxEnabled();
|
return this.dropboxEnabled();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.driveEnabled = ko.observable(!!RL.settingsGet('GoogleApiKey') && !!RL.settingsGet('GoogleClientID'));
|
this.driveEnabled = ko.observable(false && Globals.bXMLHttpRequestSupported && !!RL.settingsGet('GoogleClientID'));
|
||||||
this.driveVisible = ko.observable(false);
|
this.driveVisible = ko.observable(false);
|
||||||
|
|
||||||
this.driveCommand = Utils.createCommand(this, function () {
|
this.driveCommand = Utils.createCommand(this, function () {
|
||||||
|
|
@ -9976,13 +9998,40 @@ PopupsComposeViewModel.prototype.onBuild = function ()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
PopupsComposeViewModel.prototype.driveCallback = function (oData)
|
PopupsComposeViewModel.prototype.driveCallback = function (sAccessToken, oData)
|
||||||
{
|
{
|
||||||
if (oData && window.google && oData[window.google.picker.Response.ACTION] === window.google.picker.Action.PICKED &&
|
if (oData && window.google && oData[window.google.picker.Response.ACTION] === window.google.picker.Action.PICKED &&
|
||||||
oData[window.google.picker.Response.DOCUMENTS] && oData[window.google.picker.Response.DOCUMENTS][0] &&
|
oData[window.google.picker.Response.DOCUMENTS] && oData[window.google.picker.Response.DOCUMENTS][0] &&
|
||||||
oData[window.google.picker.Response.DOCUMENTS][0]['url'])
|
oData[window.google.picker.Response.DOCUMENTS][0]['id'])
|
||||||
{
|
{
|
||||||
this.addDriveAttachment(oData[window.google.picker.Response.DOCUMENTS][0]);
|
var
|
||||||
|
self = this,
|
||||||
|
oRequest = new window.XMLHttpRequest()
|
||||||
|
;
|
||||||
|
|
||||||
|
oRequest.open('GET', 'https://www.googleapis.com/drive/v2/files/' + oData[window.google.picker.Response.DOCUMENTS][0]['id']);
|
||||||
|
oRequest.setRequestHeader('Authorization', 'Bearer ' + sAccessToken);
|
||||||
|
oRequest.addEventListener('load', function() {
|
||||||
|
if (oRequest && oRequest.responseText)
|
||||||
|
{
|
||||||
|
var oItem = JSON.parse(oRequest.responseText);
|
||||||
|
if (oItem && oItem['downloadUrl'])
|
||||||
|
{
|
||||||
|
window.console.log(oItem['downloadUrl']);
|
||||||
|
var oSubRequest = new window.XMLHttpRequest();
|
||||||
|
oSubRequest.open('GET', oItem['downloadUrl']);
|
||||||
|
oSubRequest.setRequestHeader('Authorization', 'Bearer ' + sAccessToken);
|
||||||
|
oSubRequest.addEventListener('load', function() {
|
||||||
|
window.console.log(oSubRequest);
|
||||||
|
});
|
||||||
|
|
||||||
|
oSubRequest.send();
|
||||||
|
// self.addDriveAttachment(oItem, sAccessToken);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
oRequest.send();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -10002,9 +10051,8 @@ PopupsComposeViewModel.prototype.driveCreatePiker = function (oOauthToken)
|
||||||
.setIncludeFolders(true)
|
.setIncludeFolders(true)
|
||||||
)
|
)
|
||||||
.setAppId(RL.settingsGet('GoogleClientID'))
|
.setAppId(RL.settingsGet('GoogleClientID'))
|
||||||
.setDeveloperKey(RL.settingsGet('GoogleApiKey'))
|
|
||||||
.setOAuthToken(oOauthToken.access_token)
|
.setOAuthToken(oOauthToken.access_token)
|
||||||
.setCallback(_.bind(self.driveCallback, self))
|
.setCallback(_.bind(self.driveCallback, self, oOauthToken.access_token))
|
||||||
.enableFeature(window.google.picker.Feature.NAV_HIDDEN)
|
.enableFeature(window.google.picker.Feature.NAV_HIDDEN)
|
||||||
.build()
|
.build()
|
||||||
;
|
;
|
||||||
|
|
@ -10028,7 +10076,9 @@ PopupsComposeViewModel.prototype.driveOpenPopup = function ()
|
||||||
{
|
{
|
||||||
window.gapi.auth.authorize({
|
window.gapi.auth.authorize({
|
||||||
'client_id': RL.settingsGet('GoogleClientID'),
|
'client_id': RL.settingsGet('GoogleClientID'),
|
||||||
'scope': 'https://www.googleapis.com/auth/drive.readonly',
|
'scope': [
|
||||||
|
'https://www.googleapis.com/auth/drive.readonly'
|
||||||
|
].join(' '),
|
||||||
'immediate': false
|
'immediate': false
|
||||||
}, function (oAuthResult) {
|
}, function (oAuthResult) {
|
||||||
if (oAuthResult && !oAuthResult.error)
|
if (oAuthResult && !oAuthResult.error)
|
||||||
|
|
@ -10374,12 +10424,64 @@ PopupsComposeViewModel.prototype.addDropboxAttachment = function (oDropboxFile)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Object} oDriveFile
|
* @param {Object} oDriveFile
|
||||||
|
* @param {string} sAccessToken
|
||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
PopupsComposeViewModel.prototype.addDriveAttachment = function (oDriveFile)
|
PopupsComposeViewModel.prototype.addDriveAttachment = function (oDriveFile, sAccessToken)
|
||||||
{
|
{
|
||||||
window.console.log(oDriveFile);
|
var
|
||||||
return false;
|
self = this,
|
||||||
|
fCancelFunc = function (sId) {
|
||||||
|
return function () {
|
||||||
|
self.attachments.remove(function (oItem) {
|
||||||
|
return oItem && oItem.id === sId;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
},
|
||||||
|
iAttachmentSizeLimit = Utils.pInt(RL.settingsGet('AttachmentLimit')),
|
||||||
|
oAttachment = null,
|
||||||
|
mSize = Utils.pInt(oDriveFile['fileSize'])
|
||||||
|
;
|
||||||
|
|
||||||
|
oAttachment = new ComposeAttachmentModel(
|
||||||
|
oDriveFile['downloadUrl'], oDriveFile['originalFilename'], mSize
|
||||||
|
);
|
||||||
|
|
||||||
|
oAttachment.fromMessage = false;
|
||||||
|
oAttachment.cancel = fCancelFunc(oDriveFile['downloadUrl']);
|
||||||
|
oAttachment.waiting(false).uploading(true);
|
||||||
|
|
||||||
|
this.attachments.push(oAttachment);
|
||||||
|
|
||||||
|
if (0 < mSize && 0 < iAttachmentSizeLimit && iAttachmentSizeLimit < mSize)
|
||||||
|
{
|
||||||
|
oAttachment.uploading(false);
|
||||||
|
oAttachment.error(Utils.i18n('UPLOAD/ERROR_FILE_IS_TOO_BIG'));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
RL.remote().composeUploadDrive(function (sResult, oData) {
|
||||||
|
|
||||||
|
var bResult = false;
|
||||||
|
oAttachment.uploading(false);
|
||||||
|
|
||||||
|
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
|
||||||
|
{
|
||||||
|
if (oData.Result[oAttachment.id])
|
||||||
|
{
|
||||||
|
bResult = true;
|
||||||
|
oAttachment.tempName(oData.Result[oAttachment.id]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!bResult)
|
||||||
|
{
|
||||||
|
oAttachment.error(Utils.getUploadErrorDescByCode(Enums.UploadErrorCode.FileNoUploaded));
|
||||||
|
}
|
||||||
|
|
||||||
|
}, oDriveFile['downloadUrl'], sAccessToken);
|
||||||
|
|
||||||
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -10547,7 +10649,7 @@ PopupsComposeViewModel.prototype.triggerForResize = function ()
|
||||||
this.editorResizeThrottle();
|
this.editorResizeThrottle();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -11291,7 +11393,7 @@ PopupsContactsViewModel.prototype.onHide = function ()
|
||||||
// oItem.checked(false);
|
// oItem.checked(false);
|
||||||
// });
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -11429,7 +11531,7 @@ PopupsAdvancedSearchViewModel.prototype.onFocus = function ()
|
||||||
{
|
{
|
||||||
this.fromFocus(true);
|
this.fromFocus(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -11525,7 +11627,7 @@ PopupsAddAccountViewModel.prototype.onFocus = function ()
|
||||||
{
|
{
|
||||||
this.emailFocus(true);
|
this.emailFocus(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -11616,7 +11718,7 @@ PopupsAddOpenPgpKeyViewModel.prototype.onFocus = function ()
|
||||||
{
|
{
|
||||||
this.key.focus(true);
|
this.key.focus(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -11658,7 +11760,7 @@ PopupsViewOpenPgpKeyViewModel.prototype.onShow = function (oOpenPgpKey)
|
||||||
this.key(oOpenPgpKey.armor);
|
this.key(oOpenPgpKey.armor);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -11755,7 +11857,7 @@ PopupsGenerateNewOpenPgpKeyViewModel.prototype.onFocus = function ()
|
||||||
{
|
{
|
||||||
this.email.focus(true);
|
this.email.focus(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -11997,7 +12099,7 @@ PopupsComposeOpenPgpViewModel.prototype.onShow = function (fCallback, sText, sFr
|
||||||
this.to(aRec);
|
this.to(aRec);
|
||||||
this.text(sText);
|
this.text(sText);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -12147,7 +12249,7 @@ PopupsIdentityViewModel.prototype.onFocus = function ()
|
||||||
this.email.focused(true);
|
this.email.focused(true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -12209,7 +12311,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
|
||||||
RL.data().mainLanguage(sLang);
|
RL.data().mainLanguage(sLang);
|
||||||
this.cancelCommand();
|
this.cancelCommand();
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -12265,7 +12367,7 @@ PopupsTwoFactorTestViewModel.prototype.onFocus = function ()
|
||||||
{
|
{
|
||||||
this.code.focused(true);
|
this.code.focused(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -12378,7 +12480,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
|
||||||
}, this));
|
}, this));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -12425,7 +12527,7 @@ PopupsKeyboardShortcutsHelpViewModel.prototype.onBuild = function (oDom)
|
||||||
}
|
}
|
||||||
}, this));
|
}, this));
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -12501,6 +12603,8 @@ function LoginViewModel()
|
||||||
|
|
||||||
this.submitCommand = Utils.createCommand(this, function () {
|
this.submitCommand = Utils.createCommand(this, function () {
|
||||||
|
|
||||||
|
Utils.triggerAutocompleteInputChange();
|
||||||
|
|
||||||
this.emailError('' === Utils.trim(this.email()));
|
this.emailError('' === Utils.trim(this.email()));
|
||||||
this.passwordError('' === Utils.trim(this.password()));
|
this.passwordError('' === Utils.trim(this.password()));
|
||||||
|
|
||||||
|
|
@ -12754,9 +12858,7 @@ LoginViewModel.prototype.onBuild = function ()
|
||||||
});
|
});
|
||||||
}, 50);
|
}, 50);
|
||||||
|
|
||||||
_.delay(function () {
|
Utils.triggerAutocompleteInputChange(true);
|
||||||
$('.checkAutocomplete').trigger('change');
|
|
||||||
}, 100);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -12770,7 +12872,7 @@ LoginViewModel.prototype.selectLanguage = function ()
|
||||||
kn.showScreenPopup(PopupsLanguagesViewModel);
|
kn.showScreenPopup(PopupsLanguagesViewModel);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -12868,7 +12970,7 @@ AbstractSystemDropDownViewModel.prototype.onBuild = function ()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -12882,7 +12984,7 @@ function MailBoxSystemDropDownViewModel()
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('MailBoxSystemDropDownViewModel', MailBoxSystemDropDownViewModel, AbstractSystemDropDownViewModel);
|
Utils.extendAsViewModel('MailBoxSystemDropDownViewModel', MailBoxSystemDropDownViewModel, AbstractSystemDropDownViewModel);
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -12896,7 +12998,7 @@ function SettingsSystemDropDownViewModel()
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('SettingsSystemDropDownViewModel', SettingsSystemDropDownViewModel, AbstractSystemDropDownViewModel);
|
Utils.extendAsViewModel('SettingsSystemDropDownViewModel', SettingsSystemDropDownViewModel, AbstractSystemDropDownViewModel);
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -13146,7 +13248,7 @@ MailBoxFolderListViewModel.prototype.contactsClick = function ()
|
||||||
kn.showScreenPopup(PopupsContactsViewModel);
|
kn.showScreenPopup(PopupsContactsViewModel);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -14051,7 +14153,7 @@ MailBoxMessageListViewModel.prototype.initUploaderForAppend = function ()
|
||||||
;
|
;
|
||||||
|
|
||||||
return !!oJua;
|
return !!oJua;
|
||||||
};
|
};
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -14745,7 +14847,7 @@ MailBoxMessageViewViewModel.prototype.readReceipt = function (oMessage)
|
||||||
RL.reloadFlagsCurrentMessageListAndMessageFromCache();
|
RL.reloadFlagsCurrentMessageListAndMessageFromCache();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -14776,7 +14878,7 @@ SettingsMenuViewModel.prototype.backToMailBoxClick = function ()
|
||||||
{
|
{
|
||||||
kn.setHash(RL.link().inbox());
|
kn.setHash(RL.link().inbox());
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -14809,7 +14911,7 @@ SettingsPaneViewModel.prototype.backToMailBoxClick = function ()
|
||||||
{
|
{
|
||||||
kn.setHash(RL.link().inbox());
|
kn.setHash(RL.link().inbox());
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -14971,7 +15073,7 @@ SettingsGeneral.prototype.selectLanguage = function ()
|
||||||
{
|
{
|
||||||
kn.showScreenPopup(PopupsLanguagesViewModel);
|
kn.showScreenPopup(PopupsLanguagesViewModel);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -15023,7 +15125,7 @@ SettingsContacts.prototype.onBuild = function ()
|
||||||
//{
|
//{
|
||||||
//
|
//
|
||||||
//};
|
//};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -15106,7 +15208,7 @@ SettingsAccounts.prototype.deleteAccount = function (oAccountToRemove)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -15196,7 +15298,7 @@ SettingsIdentity.prototype.onBuild = function ()
|
||||||
|
|
||||||
}, 50);
|
}, 50);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -15415,7 +15517,7 @@ SettingsIdentities.prototype.onBuild = function (oDom)
|
||||||
});
|
});
|
||||||
|
|
||||||
}, 50);
|
}, 50);
|
||||||
};
|
};
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -15452,7 +15554,7 @@ SettingsFilters.prototype.addFilter = function ()
|
||||||
|
|
||||||
this.filters.push(oFilter);
|
this.filters.push(oFilter);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -15604,7 +15706,7 @@ SettingsSecurity.prototype.onBuild = function ()
|
||||||
this.processing(true);
|
this.processing(true);
|
||||||
RL.remote().getTwoFactor(this.onResult);
|
RL.remote().getTwoFactor(this.onResult);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -15673,7 +15775,7 @@ function SettingsSocialScreen()
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.addSettingsViewModel(SettingsSocialScreen, 'SettingsSocial', 'SETTINGS_LABELS/LABEL_SOCIAL_NAME', 'social');
|
Utils.addSettingsViewModel(SettingsSocialScreen, 'SettingsSocial', 'SETTINGS_LABELS/LABEL_SOCIAL_NAME', 'social');
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -15780,7 +15882,7 @@ SettingsChangePasswordScreen.prototype.onChangePasswordResponse = function (sRes
|
||||||
Utils.getNotification(Enums.Notification.CouldNotSaveNewPassword));
|
Utils.getNotification(Enums.Notification.CouldNotSaveNewPassword));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -15977,7 +16079,7 @@ SettingsFolders.prototype.unSubscribeFolder = function (oFolder)
|
||||||
|
|
||||||
oFolder.subScribed(false);
|
oFolder.subScribed(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -16093,7 +16195,7 @@ SettingsThemes.prototype.onBuild = function ()
|
||||||
};
|
};
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -16163,7 +16265,7 @@ SettingsOpenPGP.prototype.deleteOpenPgpKey = function (oOpenPgpKeyToRemove)
|
||||||
RL.reloadOpenPgpKeys();
|
RL.reloadOpenPgpKeys();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -16291,14 +16393,13 @@ AbstractData.prototype.populateDataOnStart = function()
|
||||||
this.googleEnable(!!RL.settingsGet('AllowGoogleSocial'));
|
this.googleEnable(!!RL.settingsGet('AllowGoogleSocial'));
|
||||||
this.googleClientID(RL.settingsGet('GoogleClientID'));
|
this.googleClientID(RL.settingsGet('GoogleClientID'));
|
||||||
this.googleClientSecret(RL.settingsGet('GoogleClientSecret'));
|
this.googleClientSecret(RL.settingsGet('GoogleClientSecret'));
|
||||||
this.googleApiKey(RL.settingsGet('GoogleApiKey'));
|
|
||||||
|
|
||||||
this.dropboxEnable(!!RL.settingsGet('AllowDropboxSocial'));
|
this.dropboxEnable(!!RL.settingsGet('AllowDropboxSocial'));
|
||||||
this.dropboxApiKey(RL.settingsGet('DropboxApiKey'));
|
this.dropboxApiKey(RL.settingsGet('DropboxApiKey'));
|
||||||
|
|
||||||
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
|
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -17555,7 +17656,7 @@ WebMailDataStorage.prototype.findSelfPrivateKey = function (sPassword)
|
||||||
{
|
{
|
||||||
return this.findPrivateKeyByEmail(this.accountEmail(), sPassword);
|
return this.findPrivateKeyByEmail(this.accountEmail(), sPassword);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -17839,7 +17940,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
|
||||||
'Version': sVersion
|
'Version': sVersion
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -18144,6 +18245,18 @@ WebMailAjaxRemoteStorage.prototype.composeUploadExternals = function (fCallback,
|
||||||
}, 999000);
|
}, 999000);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {?Function} fCallback
|
||||||
|
* @param {Array} aExternals
|
||||||
|
*/
|
||||||
|
WebMailAjaxRemoteStorage.prototype.composeUploadDrive = function (fCallback, sUrl, sAccessToken)
|
||||||
|
{
|
||||||
|
this.defaultRequest(fCallback, 'ComposeUploadDrive', {
|
||||||
|
'AccessToken': sAccessToken,
|
||||||
|
'Url': sUrl
|
||||||
|
}, 999000);
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {?Function} fCallback
|
* @param {?Function} fCallback
|
||||||
* @param {string} sFolder
|
* @param {string} sFolder
|
||||||
|
|
@ -18626,7 +18739,7 @@ WebMailAjaxRemoteStorage.prototype.socialUsers = function (fCallback)
|
||||||
this.defaultRequest(fCallback, 'SocialUsers');
|
this.defaultRequest(fCallback, 'SocialUsers');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -18687,7 +18800,7 @@ AbstractCacheStorage.prototype.setServicesData = function (oData)
|
||||||
{
|
{
|
||||||
this.oServices = oData;
|
this.oServices = oData;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -19007,7 +19120,7 @@ WebMailCacheStorage.prototype.storeMessageFlagsToCacheByFolderAndUid = function
|
||||||
this.setMessageFlagsToCache(sFolder, sUid, aFlags);
|
this.setMessageFlagsToCache(sFolder, sUid, aFlags);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -19189,7 +19302,7 @@ AbstractSettings.prototype.routes = function ()
|
||||||
['', oRules]
|
['', oRules]
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -19206,7 +19319,7 @@ _.extend(LoginScreen.prototype, KnoinAbstractScreen.prototype);
|
||||||
LoginScreen.prototype.onShow = function ()
|
LoginScreen.prototype.onShow = function ()
|
||||||
{
|
{
|
||||||
RL.setTitle('');
|
RL.setTitle('');
|
||||||
};
|
};
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -19379,7 +19492,7 @@ MailBoxScreen.prototype.routes = function ()
|
||||||
[/^([^\/]*)$/, {'normalize_': fNormS}]
|
[/^([^\/]*)$/, {'normalize_': fNormS}]
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -19408,7 +19521,7 @@ SettingsScreen.prototype.onShow = function ()
|
||||||
RL.setTitle(this.sSettingsTitle);
|
RL.setTitle(this.sSettingsTitle);
|
||||||
RL.data().keyScope(Enums.KeyState.Settings);
|
RL.data().keyScope(Enums.KeyState.Settings);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -19768,7 +19881,7 @@ AbstractApp.prototype.bootstart = function ()
|
||||||
|
|
||||||
ssm.ready();
|
ssm.ready();
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -21065,7 +21178,7 @@ RainLoopApp.prototype.bootstart = function ()
|
||||||
* @type {RainLoopApp}
|
* @type {RainLoopApp}
|
||||||
*/
|
*/
|
||||||
RL = new RainLoopApp();
|
RL = new RainLoopApp();
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
|
|
||||||
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
|
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
|
||||||
|
|
@ -21118,7 +21231,7 @@ window['__RLBOOT'] = function (fCall) {
|
||||||
window['__RLBOOT'] = null;
|
window['__RLBOOT'] = null;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
if (window.SimplePace) {
|
if (window.SimplePace) {
|
||||||
window.SimplePace.add(10);
|
window.SimplePace.add(10);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
18
rainloop/v/0.0.0/static/js/app.min.js
vendored
18
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
||||||
/*! See http://www.JSON.org/js.html */
|
/*! See http://www.JSON.org/js.html */
|
||||||
var JSON;JSON||(JSON={}),function(){function str(a,b){var c,d,e,f,g=gap,h,i=b[a];i&&typeof i=="object"&&typeof i.toJSON=="function"&&(i=i.toJSON(a)),typeof rep=="function"&&(i=rep.call(b,a,i));switch(typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";gap+=indent,h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c<f;c+=1)h[c]=str(c,i)||"null";e=h.length===0?"[]":gap?"[\n"+gap+h.join(",\n"+gap)+"\n"+g+"]":"["+h.join(",")+"]",gap=g;return e}if(rep&&typeof rep=="object"){f=rep.length;for(c=0;c<f;c+=1)d=rep[c],typeof d=="string"&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e))}else for(d in i)Object.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e));e=h.length===0?"{}":gap?"{\n"+gap+h.join(",\n"+gap)+"\n"+g+"}":"{"+h.join(",")+"}",gap=g;return e}}function quote(a){escapable.lastIndex=0;return escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return typeof b=="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function f(a){return a<10?"0"+a:a}"use strict",typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(a){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(a,b,c){var d;gap="",indent="";if(typeof c=="number")for(d=0;d<c;d+=1)indent+=" ";else typeof c=="string"&&(indent=c);rep=b;if(b&&typeof b!="function"&&(typeof b!="object"||typeof b.length!="number"))throw new Error("JSON.stringify");return str("",{"":a})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&typeof e=="object")for(c in e)Object.hasOwnProperty.call(e,c)&&(d=walk(e,c),d!==undefined?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver=="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")})}();
|
var JSON;JSON||(JSON={}),function(){function str(a,b){var c,d,e,f,g=gap,h,i=b[a];i&&typeof i=="object"&&typeof i.toJSON=="function"&&(i=i.toJSON(a)),typeof rep=="function"&&(i=rep.call(b,a,i));switch(typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";gap+=indent,h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c<f;c+=1)h[c]=str(c,i)||"null";e=h.length===0?"[]":gap?"[\n"+gap+h.join(",\n"+gap)+"\n"+g+"]":"["+h.join(",")+"]",gap=g;return e}if(rep&&typeof rep=="object"){f=rep.length;for(c=0;c<f;c+=1)d=rep[c],typeof d=="string"&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e))}else for(d in i)Object.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e));e=h.length===0?"{}":gap?"{\n"+gap+h.join(",\n"+gap)+"\n"+g+"}":"{"+h.join(",")+"}",gap=g;return e}}function quote(a){escapable.lastIndex=0;return escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return typeof b=="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function f(a){return a<10?"0"+a:a}"use strict",typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(a){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(a,b,c){var d;gap="",indent="";if(typeof c=="number")for(d=0;d<c;d+=1)indent+=" ";else typeof c=="string"&&(indent=c);rep=b;if(b&&typeof b!="function"&&(typeof b!="object"||typeof b.length!="number"))throw new Error("JSON.stringify");return str("",{"":a})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&typeof e=="object")for(c in e)Object.hasOwnProperty.call(e,c)&&(d=walk(e,c),d!==undefined?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver=="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")})}();
|
||||||
/*! RainLoop Simple Pace v1.0 (c) 2013 RainLoop Team; Licensed under MIT */
|
/*! RainLoop Simple Pace v1.0 (c) 2013 RainLoop Team; Licensed under MIT */
|
||||||
!function(e){function s(){var s=this;s.el=null,s.done=!1,s.progress=0,s.addInterval=0,s.addSpeed=3,s.stopProgress=100,s.interval=e.setInterval(function(){var t=s.build();t&&e.clearInterval(s.interval)},100)}if(s.prototype.startAddInterval=function(){var s=this;s.stopAddInterval(),s.addInterval=e.setInterval(function(){0<s.progress&&s.stopProgress>s.progress&&s.add(s.addSpeed)},500)},s.prototype.stopAddInterval=function(){e.clearInterval(this.addInterval),this.addInterval=0},s.prototype.build=function(){if(null===this.el){var e=document.querySelector("body");e&&(this.el=document.createElement("div"),this.el.className="simple-pace simple-pace-active",this.el.innerHTML='<div class="simple-pace-progress"><div class="simple-pace-progress-inner"></div></div><div class="simple-pace-activity"></div>',e.firstChild?e.insertBefore(this.el,e.firstChild):e.appendChild(this.el))}return this.el},s.prototype.reset=function(){return this.progress=0,this.render()},s.prototype.update=function(s){var t=e.parseInt(s,10);return t>this.progress&&(this.progress=t,this.progress=100<this.progress?100:this.progress,this.progress=0>this.progress?0:this.progress),this.render()},s.prototype.add=function(s){return this.progress+=e.parseInt(s,10),this.progress=100<this.progress?100:this.progress,this.progress=0>this.progress?0:this.progress,this.render()},s.prototype.setSpeed=function(e,s){this.addSpeed=e,this.stopProgress=s||100},s.prototype.render=function(){var s=this.build();s&&s.children&&s.children[0]&&s.children[0].setAttribute("style","width:"+this.progress+"%"),100!==this.progress||this.done?100>this.progress&&this.done?(this.done=!1,this.startAddInterval(),s.className=s.className.replace("simple-pace-inactive",""),s.className+=" simple-pace-inactive"):100>this.progress&&!this.done&&0===this.addInterval&&this.startAddInterval():(this.done=!0,this.stopAddInterval(),e.setTimeout(function(){s.className=s.className.replace("simple-pace-active",""),s.className+=" simple-pace-inactive"},500))},!e.SimplePace){var t=new s;e.SimplePace={sleep:function(){t.setSpeed(2,95)},set:function(e){t.update(e)},add:function(e){t.add(e)}}}}(window);
|
!function(e){function s(){var s=this;s.el=null,s.done=!1,s.progress=0,s.addInterval=0,s.addSpeed=3,s.stopProgress=100,s.interval=e.setInterval(function(){var t=s.build();t&&e.clearInterval(s.interval)},100)}if(s.prototype.startAddInterval=function(){var s=this;s.stopAddInterval(),s.addInterval=e.setInterval(function(){0<s.progress&&s.stopProgress>s.progress&&s.add(s.addSpeed)},500)},s.prototype.stopAddInterval=function(){e.clearInterval(this.addInterval),this.addInterval=0},s.prototype.build=function(){if(null===this.el){var e=document.querySelector("body");e&&(this.el=document.createElement("div"),this.el.className="simple-pace simple-pace-active",this.el.innerHTML='<div class="simple-pace-progress"><div class="simple-pace-progress-inner"></div></div><div class="simple-pace-activity"></div>',e.firstChild?e.insertBefore(this.el,e.firstChild):e.appendChild(this.el))}return this.el},s.prototype.reset=function(){return this.progress=0,this.render()},s.prototype.update=function(s){var t=e.parseInt(s,10);return t>this.progress&&(this.progress=t,this.progress=100<this.progress?100:this.progress,this.progress=0>this.progress?0:this.progress),this.render()},s.prototype.add=function(s){return this.progress+=e.parseInt(s,10),this.progress=100<this.progress?100:this.progress,this.progress=0>this.progress?0:this.progress,this.render()},s.prototype.setSpeed=function(e,s){this.addSpeed=e,this.stopProgress=s||100},s.prototype.render=function(){var s=this.build();s&&s.children&&s.children[0]&&s.children[0].setAttribute("style","width:"+this.progress+"%"),100!==this.progress||this.done?100>this.progress&&this.done?(this.done=!1,this.startAddInterval(),s.className=s.className.replace("simple-pace-inactive",""),s.className+=" simple-pace-inactive"):100>this.progress&&!this.done&&0===this.addInterval&&this.startAddInterval():(this.done=!0,this.stopAddInterval(),e.setTimeout(function(){s.className=s.className.replace("simple-pace-active",""),s.className+=" simple-pace-inactive"},500))},!e.SimplePace){var t=new s;e.SimplePace={sleep:function(){t.setSpeed(2,95)},set:function(e){t.update(e)},add:function(e){t.add(e)}}}}(window);
|
||||||
/*! RainLoop Top Driver v1.0 (c) 2013 RainLoop Team; Licensed under MIT */
|
/*! RainLoop Top Driver v1.0 (c) 2013 RainLoop Team; Licensed under MIT */
|
||||||
!function(t,h){function s(){}s.prototype.s=t.sessionStorage,s.prototype.t=t.top||t,s.prototype.getHash=function(){var t=null;if(this.s)t=this.s.getItem("__rlA")||null;else if(this.t){var s=this.t.name&&h&&"{"===this.t.name.toString().substr(0,1)?h.parse(this.t.name.toString()):null;t=s?s.__rlA||null:null}return t},s.prototype.setHash=function(){var s=t.rainloopAppData,n=null;this.s?this.s.setItem("__rlA",s&&s.AuthAccountHash?s.AuthAccountHash:""):this.t&&h&&(n={},n.__rlA=s&&s.AuthAccountHash?s.AuthAccountHash:"",this.t.name=h.stringify(n))},s.prototype.clearHash=function(){this.s?this.s.setItem("__rlA",""):this.t&&(this.t.name="")},t._rlhh=new s,t.__rlah=function(){return t._rlhh?t._rlhh.getHash():null},t.__rlah_set=function(){t._rlhh&&t._rlhh.setHash()},t.__rlah_clear=function(){t._rlhh&&t._rlhh.clearHash()}}(window,window.JSON);
|
!function(t,h){function s(){}s.prototype.s=t.sessionStorage,s.prototype.t=t.top||t,s.prototype.getHash=function(){var t=null;if(this.s)t=this.s.getItem("__rlA")||null;else if(this.t){var s=this.t.name&&h&&"{"===this.t.name.toString().substr(0,1)?h.parse(this.t.name.toString()):null;t=s?s.__rlA||null:null}return t},s.prototype.setHash=function(){var s=t.rainloopAppData,n=null;this.s?this.s.setItem("__rlA",s&&s.AuthAccountHash?s.AuthAccountHash:""):this.t&&h&&(n={},n.__rlA=s&&s.AuthAccountHash?s.AuthAccountHash:"",this.t.name=h.stringify(n))},s.prototype.clearHash=function(){this.s?this.s.setItem("__rlA",""):this.t&&(this.t.name="")},t._rlhh=new s,t.__rlah=function(){return t._rlhh?t._rlhh.getHash():null},t.__rlah_set=function(){t._rlhh&&t._rlhh.setHash()},t.__rlah_clear=function(){t._rlhh&&t._rlhh.clearHash()}}(window,window.JSON);
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue