mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 23:55:55 +08:00
Google Drive (first look)
This commit is contained in:
parent
ba1f0403f7
commit
4d2df09946
|
@ -10,8 +10,10 @@ function AdminSocial()
|
|||
this.googleEnable = oData.googleEnable;
|
||||
this.googleClientID = oData.googleClientID;
|
||||
this.googleClientSecret = oData.googleClientSecret;
|
||||
this.googleApiKey = oData.googleApiKey;
|
||||
this.googleTrigger1 = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
this.googleTrigger2 = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
this.googleTrigger3 = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
|
||||
this.facebookSupported = oData.facebookSupported;
|
||||
this.facebookEnable = oData.facebookEnable;
|
||||
|
@ -45,7 +47,8 @@ AdminSocial.prototype.onBuild = function ()
|
|||
f4 = Utils.settingsSaveHelperSimpleFunction(self.twitterTrigger2, self),
|
||||
f5 = Utils.settingsSaveHelperSimpleFunction(self.googleTrigger1, self),
|
||||
f6 = Utils.settingsSaveHelperSimpleFunction(self.googleTrigger2, self),
|
||||
f7 = Utils.settingsSaveHelperSimpleFunction(self.dropboxTrigger1, self)
|
||||
f7 = Utils.settingsSaveHelperSimpleFunction(self.googleTrigger3, self),
|
||||
f8 = Utils.settingsSaveHelperSimpleFunction(self.dropboxTrigger1, self)
|
||||
;
|
||||
|
||||
self.facebookEnable.subscribe(function (bValue) {
|
||||
|
@ -111,6 +114,12 @@ AdminSocial.prototype.onBuild = function ()
|
|||
});
|
||||
});
|
||||
|
||||
self.googleApiKey.subscribe(function (sValue) {
|
||||
RL.remote().saveAdminConfig(f7, {
|
||||
'GoogleApiKey': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.dropboxEnable.subscribe(function (bValue) {
|
||||
RL.remote().saveAdminConfig(Utils.emptyFunction, {
|
||||
'DropboxEnable': bValue ? '1' : '0'
|
||||
|
@ -118,7 +127,7 @@ AdminSocial.prototype.onBuild = function ()
|
|||
});
|
||||
|
||||
self.dropboxApiKey.subscribe(function (sValue) {
|
||||
RL.remote().saveAdminConfig(f7, {
|
||||
RL.remote().saveAdminConfig(f8, {
|
||||
'DropboxApiKey': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1118,6 +1118,7 @@ Utils.initDataConstructorBySettings = function (oData)
|
|||
oData.googleEnable = ko.observable(false);
|
||||
oData.googleClientID = ko.observable('');
|
||||
oData.googleClientSecret = ko.observable('');
|
||||
oData.googleApiKey = ko.observable('');
|
||||
|
||||
oData.dropboxEnable = ko.observable(false);
|
||||
oData.dropboxApiKey = ko.observable('');
|
||||
|
|
|
@ -125,6 +125,7 @@ AbstractData.prototype.populateDataOnStart = function()
|
|||
this.googleEnable(!!RL.settingsGet('AllowGoogleSocial'));
|
||||
this.googleClientID(RL.settingsGet('GoogleClientID'));
|
||||
this.googleClientSecret(RL.settingsGet('GoogleClientSecret'));
|
||||
this.googleApiKey(RL.settingsGet('GoogleApiKey'));
|
||||
|
||||
this.dropboxEnable(!!RL.settingsGet('AllowDropboxSocial'));
|
||||
this.dropboxApiKey(RL.settingsGet('DropboxApiKey'));
|
||||
|
|
|
@ -321,7 +321,7 @@ function PopupsComposeViewModel()
|
|||
this.triggerForResize();
|
||||
}, this);
|
||||
|
||||
this.dropboxEnabled = ko.observable(RL.settingsGet('DropboxApiKey') ? true : false);
|
||||
this.dropboxEnabled = ko.observable(!!RL.settingsGet('DropboxApiKey'));
|
||||
|
||||
this.dropboxCommand = Utils.createCommand(this, function () {
|
||||
|
||||
|
@ -347,18 +347,19 @@ function PopupsComposeViewModel()
|
|||
return this.dropboxEnabled();
|
||||
});
|
||||
|
||||
this.driveEnabled = ko.observable(false);
|
||||
this.driveEnabled = ko.observable(!!RL.settingsGet('GoogleApiKey') && !!RL.settingsGet('GoogleClientID'));
|
||||
this.driveVisible = ko.observable(false);
|
||||
|
||||
this.driveCommand = Utils.createCommand(this, function () {
|
||||
|
||||
// this.driveOpenPopup();
|
||||
this.driveOpenPopup();
|
||||
return true;
|
||||
|
||||
}, function () {
|
||||
return this.driveEnabled();
|
||||
});
|
||||
|
||||
// this.driveCallback = _.bind(this.driveCallback, this);
|
||||
this.driveCallback = _.bind(this.driveCallback, this);
|
||||
|
||||
this.bDisabeCloseOnEsc = true;
|
||||
this.sDefaultKeyScope = Enums.KeyState.Compose;
|
||||
|
@ -980,41 +981,89 @@ PopupsComposeViewModel.prototype.onBuild = function ()
|
|||
document.body.appendChild(oScript);
|
||||
}
|
||||
|
||||
// TODO (Google Drive)
|
||||
// if (false)
|
||||
// {
|
||||
// $.getScript('http://www.google.com/jsapi', function () {
|
||||
// if (window.google)
|
||||
// {
|
||||
// window.google.load('picker', '1', {
|
||||
// 'callback': Utils.emptyFunction
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
if (this.driveEnabled())
|
||||
{
|
||||
$.getScript('https://apis.google.com/js/api.js', function () {
|
||||
if (window.gapi)
|
||||
{
|
||||
self.driveVisible(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//PopupsComposeViewModel.prototype.driveCallback = function (oData)
|
||||
//{
|
||||
// if (oData && window.google && oData['action'] === window.google.picker.Action.PICKED)
|
||||
// {
|
||||
// }
|
||||
//};
|
||||
//
|
||||
//PopupsComposeViewModel.prototype.driveOpenPopup = function ()
|
||||
//{
|
||||
// if (window.google)
|
||||
// {
|
||||
// var
|
||||
// oPicker = new window.google.picker.PickerBuilder()
|
||||
// .enableFeature(window.google.picker.Feature.NAV_HIDDEN)
|
||||
// .addView(new window.google.picker.View(window.google.picker.ViewId.DOCS))
|
||||
// .setCallback(this.driveCallback).build()
|
||||
// ;
|
||||
//
|
||||
// oPicker.setVisible(true);
|
||||
// }
|
||||
//};
|
||||
PopupsComposeViewModel.prototype.driveCallback = function (oData)
|
||||
{
|
||||
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][0]['url'])
|
||||
{
|
||||
this.addDriveAttachment(oData[window.google.picker.Response.DOCUMENTS][0]);
|
||||
}
|
||||
};
|
||||
|
||||
PopupsComposeViewModel.prototype.driveCreatePiker = function (oOauthToken)
|
||||
{
|
||||
if (window.gapi && oOauthToken && oOauthToken.access_token)
|
||||
{
|
||||
var self = this;
|
||||
|
||||
window.gapi.load('picker', {'callback': function () {
|
||||
|
||||
if (window.google && window.google.picker)
|
||||
{
|
||||
var drivePicker = new window.google.picker.PickerBuilder()
|
||||
.addView(
|
||||
new window.google.picker.DocsView()
|
||||
.setIncludeFolders(true)
|
||||
)
|
||||
.setAppId(RL.settingsGet('GoogleClientID'))
|
||||
.setDeveloperKey(RL.settingsGet('GoogleApiKey'))
|
||||
.setOAuthToken(oOauthToken.access_token)
|
||||
.setCallback(_.bind(self.driveCallback, self))
|
||||
.enableFeature(window.google.picker.Feature.NAV_HIDDEN)
|
||||
.build()
|
||||
;
|
||||
|
||||
drivePicker.setVisible(true);
|
||||
}
|
||||
}});
|
||||
}
|
||||
};
|
||||
|
||||
PopupsComposeViewModel.prototype.driveOpenPopup = function ()
|
||||
{
|
||||
if (window.gapi)
|
||||
{
|
||||
var self = this;
|
||||
|
||||
window.gapi.load('auth', {'callback': function () {
|
||||
|
||||
var oAuthToken = window.gapi.auth.getToken();
|
||||
if (!oAuthToken)
|
||||
{
|
||||
window.gapi.auth.authorize({
|
||||
'client_id': RL.settingsGet('GoogleClientID'),
|
||||
'scope': 'https://www.googleapis.com/auth/drive.readonly',
|
||||
'immediate': false
|
||||
}, function (oAuthResult) {
|
||||
if (oAuthResult && !oAuthResult.error)
|
||||
{
|
||||
var oAuthToken = window.gapi.auth.getToken();
|
||||
if (oAuthToken)
|
||||
{
|
||||
self.driveCreatePiker(oAuthToken);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
self.driveCreatePiker(oAuthToken);
|
||||
}
|
||||
}});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sId
|
||||
|
@ -1339,6 +1388,16 @@ PopupsComposeViewModel.prototype.addDropboxAttachment = function (oDropboxFile)
|
|||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Object} oDriveFile
|
||||
* @return {boolean}
|
||||
*/
|
||||
PopupsComposeViewModel.prototype.addDriveAttachment = function (oDriveFile)
|
||||
{
|
||||
window.console.log(oDriveFile);
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {MessageModel} oMessage
|
||||
* @param {string} sType
|
||||
|
|
|
@ -626,6 +626,74 @@ class Utils
|
|||
return \trim($sValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sAttrName
|
||||
* @param string $sValue = 'utf-8'
|
||||
* @param string $sCharset = ''
|
||||
* @param string $sLang = ''
|
||||
* @param int $iLen = 78
|
||||
*
|
||||
* @return string|bool
|
||||
*/
|
||||
public static function AttributeRfc2231Encode($sAttrName, $sValue, $sCharset = 'utf-8', $sLang = '', $iLen = 1000)
|
||||
{
|
||||
$sValue = \strtoupper($sCharset).'\''.$sLang.'\''.
|
||||
\preg_replace_callback('/[\x00-\x20*\'%()<>@,;:\\\\"\/[\]?=\x80-\xFF]/', function ($match) {
|
||||
return \rawurlencode($match[0]);
|
||||
}, $sValue);
|
||||
|
||||
$iNlen = \strlen($sAttrName);
|
||||
$iVlen = \strlen($sValue);
|
||||
|
||||
if (\strlen($sAttrName) + $iVlen > $iLen - 3)
|
||||
{
|
||||
$sections = array();
|
||||
$section = 0;
|
||||
|
||||
for ($i = 0, $j = 0; $i < $iVlen; $i += $j)
|
||||
{
|
||||
$j = $iLen - $iNlen - \strlen($section) - 4;
|
||||
$sections[$section++] = \substr($sValue, $i, $j);
|
||||
}
|
||||
|
||||
for ($i = 0, $n = $section; $i < $n; $i++)
|
||||
{
|
||||
$sections[$i] = ' '.$sAttrName.'*'.$i.'*='.$sections[$i];
|
||||
}
|
||||
|
||||
return \implode(";\r\n", $sections);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $sAttrName.'*='.$sValue;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param string $sAttrName
|
||||
* @param string $sValue
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function EncodeHeaderUtf8AttributeValue($sAttrName, $sValue)
|
||||
{
|
||||
$sAttrName = \trim($sAttrName);
|
||||
$sValue = \trim($sValue);
|
||||
|
||||
if (0 < \strlen($sValue) && !\MailSo\Base\Utils::IsAscii($sValue))
|
||||
{
|
||||
if (!empty($_SERVER['HTTP_USER_AGENT']) && 0 < \strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE'))
|
||||
{
|
||||
$sValue = $sAttrName.'="'.\preg_replace('/[+\s]+/', '%20', \urlencode($sValue)).'"';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sValue = \MailSo\Base\Utils::AttributeRfc2231Encode($sAttrName, $sValue);
|
||||
}
|
||||
}
|
||||
|
||||
return \trim($sValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sEmail
|
||||
*
|
||||
|
|
|
@ -361,7 +361,7 @@ class Message
|
|||
}
|
||||
|
||||
/**
|
||||
* @param $iDateTime $iDateTime
|
||||
* @param int $iDateTime
|
||||
*
|
||||
* @return \MailSo\Mime\Message
|
||||
*/
|
||||
|
|
|
@ -1129,10 +1129,14 @@ class Actions
|
|||
}
|
||||
|
||||
$aResult['AllowGoogleSocial'] = (bool) $oConfig->Get('social', 'google_enable', false);
|
||||
$aResult['GoogleClientID'] = \trim($oConfig->Get('social', 'google_client_id', ''));
|
||||
$aResult['GoogleApiKey'] = \trim($oConfig->Get('social', 'google_api_key', ''));
|
||||
if ($aResult['AllowGoogleSocial'] && (
|
||||
'' === \trim($oConfig->Get('social', 'google_client_id', '')) || '' === \trim($oConfig->Get('social', 'google_client_secret', ''))))
|
||||
{
|
||||
$aResult['AllowGoogleSocial'] = false;
|
||||
$aResult['GoogleClientID'] = '';
|
||||
$aResult['GoogleApiKey'] = '';
|
||||
}
|
||||
|
||||
$aResult['AllowFacebookSocial'] = (bool) $oConfig->Get('social', 'fb_enable', false);
|
||||
|
@ -1189,6 +1193,7 @@ class Actions
|
|||
$aResult['AllowGoogleSocial'] = (bool) $oConfig->Get('social', 'google_enable', false);
|
||||
$aResult['GoogleClientID'] = (string) $oConfig->Get('social', 'google_client_id', '');
|
||||
$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['FacebookAppID'] = (string) $oConfig->Get('social', 'fb_app_id', '');
|
||||
|
@ -2394,6 +2399,7 @@ class Actions
|
|||
$this->setConfigFromParams($oConfig, 'GoogleEnable', 'social', 'google_enable', 'bool');
|
||||
$this->setConfigFromParams($oConfig, 'GoogleClientID', 'social', 'google_client_id', '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, 'FacebookAppID', 'social', 'fb_app_id', 'string');
|
||||
|
@ -6389,7 +6395,7 @@ class Actions
|
|||
$self = $this;
|
||||
return $this->MailClient()->MessageMimeStream(
|
||||
function($rResource, $sContentType, $sFileName, $sMimeIndex = '') use ($self, $sRawKey, $sContentTypeIn, $sFileNameIn, $bDownload) {
|
||||
if (is_resource($rResource))
|
||||
if (\is_resource($rResource))
|
||||
{
|
||||
$sContentTypeOut = $sContentTypeIn;
|
||||
if (empty($sContentTypeOut))
|
||||
|
@ -6409,10 +6415,12 @@ class Actions
|
|||
|
||||
$sFileNameOut = $self->MainClearFileName($sFileNameOut, $sContentTypeOut, $sMimeIndex);
|
||||
|
||||
header('Content-Type: '.$sContentTypeOut);
|
||||
header('Content-Disposition: '.($bDownload ? 'attachment' : 'inline').'; filename="'.$sFileNameOut.'"; charset=utf-8', true);
|
||||
header('Accept-Ranges: none', true);
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
\header('Content-Type: '.$sContentTypeOut);
|
||||
\header('Content-Disposition: '.($bDownload ? 'attachment' : 'inline').'; '.
|
||||
\trim(\MailSo\Base\Utils::EncodeHeaderUtf8AttributeValue('filename', $sFileNameOut)), true);
|
||||
|
||||
\header('Accept-Ranges: none', true);
|
||||
\header('Content-Transfer-Encoding: binary');
|
||||
|
||||
$self->cacheByKey($sRawKey);
|
||||
|
||||
|
|
|
@ -182,6 +182,7 @@ Examples:
|
|||
'google_enable' => array(false, 'Google'),
|
||||
'google_client_id' => array(''),
|
||||
'google_client_secret' => array(''),
|
||||
'google_api_key' => array(''),
|
||||
|
||||
'fb_enable' => array(false, 'Facebook'),
|
||||
'fb_app_id' => array(''),
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
Client ID
|
||||
</label>
|
||||
<label class="control-label">
|
||||
Client ID
|
||||
</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="span5" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||
data-bind="value: googleClientID, saveTrigger: googleTrigger1" />
|
||||
|
@ -28,15 +28,25 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
Client Secret
|
||||
</label>
|
||||
<label class="control-label">
|
||||
Client Secret
|
||||
</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="span5" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||
data-bind="value: googleClientSecret, saveTrigger: googleTrigger2" />
|
||||
<div data-bind="saveTrigger: googleTrigger2"></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">
|
||||
Facebook
|
||||
<span style="color: #ccc; font-size: 14px;" data-bind="visible: !facebookSupported()">(requires PHP 5.4 or greater)</span>
|
||||
|
@ -51,9 +61,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
App ID
|
||||
</label>
|
||||
<label class="control-label">
|
||||
App ID
|
||||
</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="span5" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||
data-bind="value: facebookAppID, saveTrigger: facebookTrigger1" />
|
||||
|
@ -61,9 +71,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
App Secret
|
||||
</label>
|
||||
<label class="control-label">
|
||||
App Secret
|
||||
</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="span5" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||
data-bind="value: facebookAppSecret, saveTrigger: facebookTrigger2" />
|
||||
|
@ -83,9 +93,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
Consumer Key
|
||||
</label>
|
||||
<label class="control-label">
|
||||
Consumer Key
|
||||
</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="span5" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||
data-bind="value: twitterConsumerKey, saveTrigger: twitterTrigger1" />
|
||||
|
@ -93,9 +103,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
Consumer Secret
|
||||
</label>
|
||||
<label class="control-label">
|
||||
Consumer Secret
|
||||
</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="span5" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||
data-bind="value: twitterConsumerSecret, saveTrigger: twitterTrigger2" />
|
||||
|
@ -114,9 +124,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
Api Key
|
||||
</label>
|
||||
<label class="control-label">
|
||||
Api Key
|
||||
</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="span5" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||
data-bind="value: dropboxApiKey, saveTrigger: dropboxTrigger1" />
|
||||
|
|
|
@ -140,7 +140,7 @@
|
|||
<a class="btn" data-tooltip-placement="top" data-bind="visible: dropboxEnabled, command: dropboxCommand, tooltip: 'COMPOSE/DROPBOX'">
|
||||
<i class="icon-dropbox"></i>
|
||||
</a>
|
||||
<a class="btn" data-tooltip-placement="top" data-bind="visible: driveEnabled, command: driveCommand, tooltip: 'COMPOSE/GOOGLE_DRIVE'">
|
||||
<a class="btn" data-tooltip-placement="top" data-bind="visible: driveEnabled() && driveVisible(), command: driveCommand, tooltip: 'COMPOSE/GOOGLE_DRIVE'">
|
||||
<i class="icon-google-drive"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -637,7 +637,7 @@
|
|||
border-radius: 8px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */
|
||||
|
||||
/* =============================================================================
|
||||
|
@ -1142,7 +1142,7 @@ table {
|
|||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
|
||||
@charset "UTF-8";
|
||||
|
||||
@font-face {
|
||||
|
@ -1513,7 +1513,7 @@ table {
|
|||
.icon-resize-out:before {
|
||||
content: "\e06d";
|
||||
}
|
||||
|
||||
|
||||
/** initial setup **/
|
||||
.nano {
|
||||
/*
|
||||
|
@ -1630,7 +1630,7 @@ table {
|
|||
.nano > .pane2:hover > .slider2, .nano > .pane2.active > .slider2 {
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
|
||||
/* Magnific Popup CSS */
|
||||
.mfp-bg {
|
||||
top: 0;
|
||||
|
@ -1995,7 +1995,7 @@ img.mfp-img {
|
|||
right: 0;
|
||||
padding-top: 0; }
|
||||
|
||||
|
||||
|
||||
|
||||
/* overlay at start */
|
||||
.mfp-fade.mfp-bg {
|
||||
|
@ -2041,7 +2041,7 @@ img.mfp-img {
|
|||
-moz-transform: translateX(50px);
|
||||
transform: translateX(50px);
|
||||
}
|
||||
|
||||
|
||||
.simple-pace {
|
||||
-webkit-pointer-events: none;
|
||||
pointer-events: none;
|
||||
|
@ -2112,7 +2112,7 @@ img.mfp-img {
|
|||
@keyframes simple-pace-stripe-animation {
|
||||
0% { transform: none; transform: none; }
|
||||
100% { transform: translate(-32px, 0); transform: translate(-32px, 0); }
|
||||
}
|
||||
}
|
||||
.inputosaurus-container {
|
||||
background-color:#fff;
|
||||
border:1px solid #bcbec0;
|
||||
|
@ -2180,7 +2180,7 @@ img.mfp-img {
|
|||
box-shadow:none;
|
||||
}
|
||||
.inputosaurus-input-hidden { display:none; }
|
||||
|
||||
|
||||
.flag-wrapper {
|
||||
width: 24px;
|
||||
height: 16px;
|
||||
|
@ -2226,7 +2226,7 @@ img.mfp-img {
|
|||
.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}
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
.clearfix {
|
||||
*zoom: 1;
|
||||
|
|
|
@ -78,7 +78,7 @@ var
|
|||
|
||||
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
|
||||
;
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/*jshint onevar: false*/
|
||||
|
@ -87,7 +87,7 @@ var
|
|||
*/
|
||||
var RL = null;
|
||||
/*jshint onevar: true*/
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -243,7 +243,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
|
|||
return oType && 'application/pdf' === oType.type;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
Consts.Defaults = {};
|
||||
|
@ -363,7 +363,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
|
|||
* @type {string}
|
||||
*/
|
||||
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -794,7 +794,7 @@ Enums.Notification = {
|
|||
'UnknownNotification': 999,
|
||||
'UnknownError': 999
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
Utils.trim = $.trim;
|
||||
|
@ -1915,6 +1915,7 @@ Utils.initDataConstructorBySettings = function (oData)
|
|||
oData.googleEnable = ko.observable(false);
|
||||
oData.googleClientID = ko.observable('');
|
||||
oData.googleClientSecret = ko.observable('');
|
||||
oData.googleApiKey = ko.observable('');
|
||||
|
||||
oData.dropboxEnable = ko.observable(false);
|
||||
oData.dropboxApiKey = ko.observable('');
|
||||
|
@ -2812,7 +2813,7 @@ Utils.detectDropdownVisibility = _.debounce(function () {
|
|||
return oItem.hasClass('open');
|
||||
}));
|
||||
}, 50);
|
||||
|
||||
|
||||
/*jslint bitwise: true*/
|
||||
// Base64 encode / decode
|
||||
// http://www.webtoolkit.info/
|
||||
|
@ -2976,7 +2977,7 @@ Base64 = {
|
|||
}
|
||||
};
|
||||
|
||||
/*jslint bitwise: false*/
|
||||
/*jslint bitwise: false*/
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
ko.bindingHandlers.tooltip = {
|
||||
|
@ -3819,7 +3820,7 @@ ko.observable.fn.validateFunc = function (fFunc)
|
|||
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -4125,7 +4126,7 @@ LinkBuilder.prototype.socialFacebook = function ()
|
|||
{
|
||||
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -4221,7 +4222,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
|
|||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -4297,7 +4298,7 @@ CookieDriver.prototype.get = function (sKey)
|
|||
|
||||
return mResult;
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -4370,7 +4371,7 @@ LocalStorageDriver.prototype.get = function (sKey)
|
|||
|
||||
return mResult;
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -4415,7 +4416,7 @@ LocalStorage.prototype.get = function (iKey)
|
|||
{
|
||||
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -4430,7 +4431,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
|
|||
{
|
||||
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -4525,7 +4526,7 @@ KnoinAbstractViewModel.prototype.registerPopupKeyDown = function ()
|
|||
return true;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -4603,7 +4604,7 @@ KnoinAbstractScreen.prototype.__start = function ()
|
|||
this.oCross = oRoute;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -5019,7 +5020,7 @@ Knoin.prototype.bootstart = function ()
|
|||
};
|
||||
|
||||
kn = new Knoin();
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -5385,7 +5386,7 @@ EmailModel.prototype.inputoTagLine = function ()
|
|||
{
|
||||
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -5431,7 +5432,7 @@ ContactTagModel.prototype.toLine = function (bEncodeHtml)
|
|||
return (Utils.isUnd(bEncodeHtml) ? false : !!bEncodeHtml) ?
|
||||
Utils.encodeHtml(this.name()) : this.name();
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -5728,7 +5729,7 @@ PopupsDomainViewModel.prototype.clearForm = function ()
|
|||
this.smtpAuth(true);
|
||||
this.whiteList('');
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -5872,7 +5873,7 @@ PopupsPluginViewModel.prototype.onBuild = function ()
|
|||
return false;
|
||||
}, this));
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -5990,7 +5991,7 @@ PopupsActivateViewModel.prototype.validateSubscriptionKey = function ()
|
|||
{
|
||||
var sValue = this.key();
|
||||
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 */
|
||||
|
||||
/**
|
||||
|
@ -6052,7 +6053,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
|
|||
RL.data().mainLanguage(sLang);
|
||||
this.cancelCommand();
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -6165,7 +6166,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
|
|||
}, this));
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -6254,7 +6255,7 @@ AdminLoginViewModel.prototype.onHide = function ()
|
|||
{
|
||||
this.loginFocus(false);
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -6280,7 +6281,7 @@ AdminMenuViewModel.prototype.link = function (sRoute)
|
|||
{
|
||||
return '#/' + sRoute;
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -6306,7 +6307,7 @@ AdminPaneViewModel.prototype.logoutClick = function ()
|
|||
RL.remote().adminLogout(function () {
|
||||
RL.loginAndLogoutReload();
|
||||
});
|
||||
};
|
||||
};
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -6434,7 +6435,7 @@ AdminGeneral.prototype.phpInfoLink = function ()
|
|||
return RL.link().phpInfo();
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -6488,7 +6489,7 @@ AdminLogin.prototype.onBuild = function ()
|
|||
|
||||
}, 50);
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -6559,7 +6560,7 @@ AdminBranding.prototype.onBuild = function ()
|
|||
|
||||
}, 50);
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -6781,7 +6782,7 @@ AdminContacts.prototype.onBuild = function ()
|
|||
|
||||
}, 50);
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -6872,7 +6873,7 @@ AdminDomains.prototype.onDomainListChangeRequest = function ()
|
|||
{
|
||||
RL.reloadDomainList();
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -6987,7 +6988,7 @@ AdminSecurity.prototype.phpInfoLink = function ()
|
|||
{
|
||||
return RL.link().phpInfo();
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -7000,8 +7001,10 @@ function AdminSocial()
|
|||
this.googleEnable = oData.googleEnable;
|
||||
this.googleClientID = oData.googleClientID;
|
||||
this.googleClientSecret = oData.googleClientSecret;
|
||||
this.googleApiKey = oData.googleApiKey;
|
||||
this.googleTrigger1 = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
this.googleTrigger2 = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
this.googleTrigger3 = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
|
||||
this.facebookSupported = oData.facebookSupported;
|
||||
this.facebookEnable = oData.facebookEnable;
|
||||
|
@ -7035,7 +7038,8 @@ AdminSocial.prototype.onBuild = function ()
|
|||
f4 = Utils.settingsSaveHelperSimpleFunction(self.twitterTrigger2, self),
|
||||
f5 = Utils.settingsSaveHelperSimpleFunction(self.googleTrigger1, self),
|
||||
f6 = Utils.settingsSaveHelperSimpleFunction(self.googleTrigger2, self),
|
||||
f7 = Utils.settingsSaveHelperSimpleFunction(self.dropboxTrigger1, self)
|
||||
f7 = Utils.settingsSaveHelperSimpleFunction(self.googleTrigger3, self),
|
||||
f8 = Utils.settingsSaveHelperSimpleFunction(self.dropboxTrigger1, self)
|
||||
;
|
||||
|
||||
self.facebookEnable.subscribe(function (bValue) {
|
||||
|
@ -7101,6 +7105,12 @@ AdminSocial.prototype.onBuild = function ()
|
|||
});
|
||||
});
|
||||
|
||||
self.googleApiKey.subscribe(function (sValue) {
|
||||
RL.remote().saveAdminConfig(f7, {
|
||||
'GoogleApiKey': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.dropboxEnable.subscribe(function (bValue) {
|
||||
RL.remote().saveAdminConfig(Utils.emptyFunction, {
|
||||
'DropboxEnable': bValue ? '1' : '0'
|
||||
|
@ -7108,14 +7118,14 @@ AdminSocial.prototype.onBuild = function ()
|
|||
});
|
||||
|
||||
self.dropboxApiKey.subscribe(function (sValue) {
|
||||
RL.remote().saveAdminConfig(f7, {
|
||||
RL.remote().saveAdminConfig(f8, {
|
||||
'DropboxApiKey': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
}, 50);
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -7214,7 +7224,7 @@ AdminPlugins.prototype.onPluginDisableRequest = function (sResult, oData)
|
|||
|
||||
RL.reloadPluginList();
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -7314,7 +7324,7 @@ AdminPackages.prototype.installPackage = function (oPackage)
|
|||
RL.remote().packageInstall(this.requestHelper(oPackage, true), oPackage);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -7371,7 +7381,7 @@ AdminLicensing.prototype.licenseExpiredMomentValue = function ()
|
|||
;
|
||||
|
||||
return iTime && 1898625600 === iTime ? 'Never' : (oDate.format('LL') + ' (' + oDate.from(moment()) + ')');
|
||||
};
|
||||
};
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -7448,7 +7458,7 @@ AdminAbout.prototype.updateCoreData = function ()
|
|||
RL.updateCoreData();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -7576,13 +7586,14 @@ AbstractData.prototype.populateDataOnStart = function()
|
|||
this.googleEnable(!!RL.settingsGet('AllowGoogleSocial'));
|
||||
this.googleClientID(RL.settingsGet('GoogleClientID'));
|
||||
this.googleClientSecret(RL.settingsGet('GoogleClientSecret'));
|
||||
this.googleApiKey(RL.settingsGet('GoogleApiKey'));
|
||||
|
||||
this.dropboxEnable(!!RL.settingsGet('AllowDropboxSocial'));
|
||||
this.dropboxApiKey(RL.settingsGet('DropboxApiKey'));
|
||||
|
||||
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -7635,7 +7646,7 @@ _.extend(AdminDataStorage.prototype, AbstractData.prototype);
|
|||
AdminDataStorage.prototype.populateDataOnStart = function()
|
||||
{
|
||||
AbstractData.prototype.populateDataOnStart.call(this);
|
||||
};
|
||||
};
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -7919,7 +7930,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
|
|||
'Version': sVersion
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -8182,7 +8193,7 @@ AdminAjaxRemoteStorage.prototype.adminPing = function (fCallback)
|
|||
{
|
||||
this.defaultRequest(fCallback, 'AdminPing');
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -8243,7 +8254,7 @@ AbstractCacheStorage.prototype.setServicesData = function (oData)
|
|||
{
|
||||
this.oServices = oData;
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -8256,7 +8267,7 @@ function AdminCacheStorage()
|
|||
}
|
||||
|
||||
_.extend(AdminCacheStorage.prototype, AbstractCacheStorage.prototype);
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -8438,7 +8449,7 @@ AbstractSettings.prototype.routes = function ()
|
|||
['', oRules]
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -8455,7 +8466,7 @@ _.extend(AdminLoginScreen.prototype, KnoinAbstractScreen.prototype);
|
|||
AdminLoginScreen.prototype.onShow = function ()
|
||||
{
|
||||
RL.setTitle('');
|
||||
};
|
||||
};
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -8475,7 +8486,7 @@ _.extend(AdminSettingsScreen.prototype, AbstractSettings.prototype);
|
|||
AdminSettingsScreen.prototype.onShow = function ()
|
||||
{
|
||||
RL.setTitle('');
|
||||
};
|
||||
};
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -8835,7 +8846,7 @@ AbstractApp.prototype.bootstart = function ()
|
|||
|
||||
ssm.ready();
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -9138,7 +9149,7 @@ AdminApp.prototype.bootstart = function ()
|
|||
* @type {AdminApp}
|
||||
*/
|
||||
RL = new AdminApp();
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
|
||||
|
@ -9191,7 +9202,7 @@ window['__RLBOOT'] = function (fCall) {
|
|||
window['__RLBOOT'] = null;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
if (window.SimplePace) {
|
||||
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
|
||||
;
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/*jshint onevar: false*/
|
||||
|
@ -90,7 +90,7 @@ var
|
|||
|
||||
$proxyDiv = $('<div></div>')
|
||||
;
|
||||
/*jshint onevar: true*/
|
||||
/*jshint onevar: true*/
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -246,7 +246,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
|
|||
return oType && 'application/pdf' === oType.type;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
Consts.Defaults = {};
|
||||
|
@ -366,7 +366,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
|
|||
* @type {string}
|
||||
*/
|
||||
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -797,7 +797,7 @@ Enums.Notification = {
|
|||
'UnknownNotification': 999,
|
||||
'UnknownError': 999
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
Utils.trim = $.trim;
|
||||
|
@ -1918,6 +1918,7 @@ Utils.initDataConstructorBySettings = function (oData)
|
|||
oData.googleEnable = ko.observable(false);
|
||||
oData.googleClientID = ko.observable('');
|
||||
oData.googleClientSecret = ko.observable('');
|
||||
oData.googleApiKey = ko.observable('');
|
||||
|
||||
oData.dropboxEnable = ko.observable(false);
|
||||
oData.dropboxApiKey = ko.observable('');
|
||||
|
@ -2815,7 +2816,7 @@ Utils.detectDropdownVisibility = _.debounce(function () {
|
|||
return oItem.hasClass('open');
|
||||
}));
|
||||
}, 50);
|
||||
|
||||
|
||||
/*jslint bitwise: true*/
|
||||
// Base64 encode / decode
|
||||
// http://www.webtoolkit.info/
|
||||
|
@ -2979,7 +2980,7 @@ Base64 = {
|
|||
}
|
||||
};
|
||||
|
||||
/*jslint bitwise: false*/
|
||||
/*jslint bitwise: false*/
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
ko.bindingHandlers.tooltip = {
|
||||
|
@ -3822,7 +3823,7 @@ ko.observable.fn.validateFunc = function (fFunc)
|
|||
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -4128,7 +4129,7 @@ LinkBuilder.prototype.socialFacebook = function ()
|
|||
{
|
||||
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -4224,7 +4225,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
|
|||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
|
@ -4463,7 +4464,7 @@ NewHtmlEditorWrapper.prototype.clear = function (bFocus)
|
|||
this.setHtml('', bFocus);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -5176,7 +5177,7 @@ Selector.prototype.on = function (sEventName, fCallback)
|
|||
{
|
||||
this.oCallbacks[sEventName] = fCallback;
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -5252,7 +5253,7 @@ CookieDriver.prototype.get = function (sKey)
|
|||
|
||||
return mResult;
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -5325,7 +5326,7 @@ LocalStorageDriver.prototype.get = function (sKey)
|
|||
|
||||
return mResult;
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -5370,7 +5371,7 @@ LocalStorage.prototype.get = function (iKey)
|
|||
{
|
||||
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -5385,7 +5386,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
|
|||
{
|
||||
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -5480,7 +5481,7 @@ KnoinAbstractViewModel.prototype.registerPopupKeyDown = function ()
|
|||
return true;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -5558,7 +5559,7 @@ KnoinAbstractScreen.prototype.__start = function ()
|
|||
this.oCross = oRoute;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -5974,7 +5975,7 @@ Knoin.prototype.bootstart = function ()
|
|||
};
|
||||
|
||||
kn = new Knoin();
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -6340,7 +6341,7 @@ EmailModel.prototype.inputoTagLine = function ()
|
|||
{
|
||||
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -6466,7 +6467,7 @@ ContactModel.prototype.lineAsCcc = function ()
|
|||
|
||||
return aResult.join(' ');
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -6497,7 +6498,7 @@ function ContactPropertyModel(iType, sTypeStr, sValue, bFocused, sPlaceholder)
|
|||
}, this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -6543,7 +6544,7 @@ ContactTagModel.prototype.toLine = function (bEncodeHtml)
|
|||
return (Utils.isUnd(bEncodeHtml) ? false : !!bEncodeHtml) ?
|
||||
Utils.encodeHtml(this.name()) : this.name();
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -6781,7 +6782,7 @@ AttachmentModel.prototype.iconClass = function ()
|
|||
|
||||
return sClass;
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -6844,7 +6845,7 @@ ComposeAttachmentModel.prototype.initByUploadJson = function (oJsonAttachment)
|
|||
}
|
||||
|
||||
return bResult;
|
||||
};
|
||||
};
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -8070,7 +8071,7 @@ MessageModel.prototype.flagHash = function ()
|
|||
return [this.deleted(), this.unseen(), this.flagged(), this.answered(), this.forwarded(),
|
||||
this.isReadReceipt()].join('');
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -8404,7 +8405,7 @@ FolderModel.prototype.printableFullName = function ()
|
|||
{
|
||||
return this.fullName.split(this.delimiter).join(' / ');
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -8427,7 +8428,7 @@ AccountModel.prototype.email = '';
|
|||
AccountModel.prototype.changeAccountLink = function ()
|
||||
{
|
||||
return RL.link().change(this.email);
|
||||
};
|
||||
};
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -8465,7 +8466,7 @@ IdentityModel.prototype.formattedNameForEmail = function ()
|
|||
var sName = this.name();
|
||||
return '' === sName ? this.email() : '"' + Utils.quoteName(sName) + '" <' + this.email() + '>';
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -8515,7 +8516,7 @@ FilterActionModel.prototype.removeSelf = function ()
|
|||
{
|
||||
this.parentList.remove(this);
|
||||
}
|
||||
};
|
||||
};
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -8566,7 +8567,7 @@ FilterConditionModel.prototype.removeSelf = function ()
|
|||
this.parentList.remove(this);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -8622,7 +8623,7 @@ FilterModel.prototype.parse = function (oItem)
|
|||
|
||||
return bResult;
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -8655,7 +8656,7 @@ OpenPgpKeyModel.prototype.user = '';
|
|||
OpenPgpKeyModel.prototype.email = '';
|
||||
OpenPgpKeyModel.prototype.armor = '';
|
||||
OpenPgpKeyModel.prototype.isPrivate = false;
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -8753,7 +8754,7 @@ PopupsFolderClearViewModel.prototype.onShow = function (oFolder)
|
|||
this.selectedFolder(oFolder);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -8865,7 +8866,7 @@ PopupsFolderCreateViewModel.prototype.onFocus = function ()
|
|||
{
|
||||
this.folderName.focused(true);
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -8980,7 +8981,7 @@ PopupsFolderSystemViewModel.prototype.onShow = function (iNotificationType)
|
|||
this.notification(sNotification);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -9304,7 +9305,7 @@ function PopupsComposeViewModel()
|
|||
this.triggerForResize();
|
||||
}, this);
|
||||
|
||||
this.dropboxEnabled = ko.observable(RL.settingsGet('DropboxApiKey') ? true : false);
|
||||
this.dropboxEnabled = ko.observable(!!RL.settingsGet('DropboxApiKey'));
|
||||
|
||||
this.dropboxCommand = Utils.createCommand(this, function () {
|
||||
|
||||
|
@ -9330,18 +9331,19 @@ function PopupsComposeViewModel()
|
|||
return this.dropboxEnabled();
|
||||
});
|
||||
|
||||
this.driveEnabled = ko.observable(false);
|
||||
this.driveEnabled = ko.observable(!!RL.settingsGet('GoogleApiKey') && !!RL.settingsGet('GoogleClientID'));
|
||||
this.driveVisible = ko.observable(false);
|
||||
|
||||
this.driveCommand = Utils.createCommand(this, function () {
|
||||
|
||||
// this.driveOpenPopup();
|
||||
this.driveOpenPopup();
|
||||
return true;
|
||||
|
||||
}, function () {
|
||||
return this.driveEnabled();
|
||||
});
|
||||
|
||||
// this.driveCallback = _.bind(this.driveCallback, this);
|
||||
this.driveCallback = _.bind(this.driveCallback, this);
|
||||
|
||||
this.bDisabeCloseOnEsc = true;
|
||||
this.sDefaultKeyScope = Enums.KeyState.Compose;
|
||||
|
@ -9963,41 +9965,89 @@ PopupsComposeViewModel.prototype.onBuild = function ()
|
|||
document.body.appendChild(oScript);
|
||||
}
|
||||
|
||||
// TODO (Google Drive)
|
||||
// if (false)
|
||||
// {
|
||||
// $.getScript('http://www.google.com/jsapi', function () {
|
||||
// if (window.google)
|
||||
// {
|
||||
// window.google.load('picker', '1', {
|
||||
// 'callback': Utils.emptyFunction
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
if (this.driveEnabled())
|
||||
{
|
||||
$.getScript('https://apis.google.com/js/api.js', function () {
|
||||
if (window.gapi)
|
||||
{
|
||||
self.driveVisible(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//PopupsComposeViewModel.prototype.driveCallback = function (oData)
|
||||
//{
|
||||
// if (oData && window.google && oData['action'] === window.google.picker.Action.PICKED)
|
||||
// {
|
||||
// }
|
||||
//};
|
||||
//
|
||||
//PopupsComposeViewModel.prototype.driveOpenPopup = function ()
|
||||
//{
|
||||
// if (window.google)
|
||||
// {
|
||||
// var
|
||||
// oPicker = new window.google.picker.PickerBuilder()
|
||||
// .enableFeature(window.google.picker.Feature.NAV_HIDDEN)
|
||||
// .addView(new window.google.picker.View(window.google.picker.ViewId.DOCS))
|
||||
// .setCallback(this.driveCallback).build()
|
||||
// ;
|
||||
//
|
||||
// oPicker.setVisible(true);
|
||||
// }
|
||||
//};
|
||||
PopupsComposeViewModel.prototype.driveCallback = function (oData)
|
||||
{
|
||||
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][0]['url'])
|
||||
{
|
||||
this.addDriveAttachment(oData[window.google.picker.Response.DOCUMENTS][0]);
|
||||
}
|
||||
};
|
||||
|
||||
PopupsComposeViewModel.prototype.driveCreatePiker = function (oOauthToken)
|
||||
{
|
||||
if (window.gapi && oOauthToken && oOauthToken.access_token)
|
||||
{
|
||||
var self = this;
|
||||
|
||||
window.gapi.load('picker', {'callback': function () {
|
||||
|
||||
if (window.google && window.google.picker)
|
||||
{
|
||||
var drivePicker = new window.google.picker.PickerBuilder()
|
||||
.addView(
|
||||
new window.google.picker.DocsView()
|
||||
.setIncludeFolders(true)
|
||||
)
|
||||
.setAppId(RL.settingsGet('GoogleClientID'))
|
||||
.setDeveloperKey(RL.settingsGet('GoogleApiKey'))
|
||||
.setOAuthToken(oOauthToken.access_token)
|
||||
.setCallback(_.bind(self.driveCallback, self))
|
||||
.enableFeature(window.google.picker.Feature.NAV_HIDDEN)
|
||||
.build()
|
||||
;
|
||||
|
||||
drivePicker.setVisible(true);
|
||||
}
|
||||
}});
|
||||
}
|
||||
};
|
||||
|
||||
PopupsComposeViewModel.prototype.driveOpenPopup = function ()
|
||||
{
|
||||
if (window.gapi)
|
||||
{
|
||||
var self = this;
|
||||
|
||||
window.gapi.load('auth', {'callback': function () {
|
||||
|
||||
var oAuthToken = window.gapi.auth.getToken();
|
||||
if (!oAuthToken)
|
||||
{
|
||||
window.gapi.auth.authorize({
|
||||
'client_id': RL.settingsGet('GoogleClientID'),
|
||||
'scope': 'https://www.googleapis.com/auth/drive.readonly',
|
||||
'immediate': false
|
||||
}, function (oAuthResult) {
|
||||
if (oAuthResult && !oAuthResult.error)
|
||||
{
|
||||
var oAuthToken = window.gapi.auth.getToken();
|
||||
if (oAuthToken)
|
||||
{
|
||||
self.driveCreatePiker(oAuthToken);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
self.driveCreatePiker(oAuthToken);
|
||||
}
|
||||
}});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sId
|
||||
|
@ -10322,6 +10372,16 @@ PopupsComposeViewModel.prototype.addDropboxAttachment = function (oDropboxFile)
|
|||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Object} oDriveFile
|
||||
* @return {boolean}
|
||||
*/
|
||||
PopupsComposeViewModel.prototype.addDriveAttachment = function (oDriveFile)
|
||||
{
|
||||
window.console.log(oDriveFile);
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {MessageModel} oMessage
|
||||
* @param {string} sType
|
||||
|
@ -10487,7 +10547,7 @@ PopupsComposeViewModel.prototype.triggerForResize = function ()
|
|||
this.editorResizeThrottle();
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -11231,7 +11291,7 @@ PopupsContactsViewModel.prototype.onHide = function ()
|
|||
// oItem.checked(false);
|
||||
// });
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -11369,7 +11429,7 @@ PopupsAdvancedSearchViewModel.prototype.onFocus = function ()
|
|||
{
|
||||
this.fromFocus(true);
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -11465,7 +11525,7 @@ PopupsAddAccountViewModel.prototype.onFocus = function ()
|
|||
{
|
||||
this.emailFocus(true);
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -11556,7 +11616,7 @@ PopupsAddOpenPgpKeyViewModel.prototype.onFocus = function ()
|
|||
{
|
||||
this.key.focus(true);
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -11598,7 +11658,7 @@ PopupsViewOpenPgpKeyViewModel.prototype.onShow = function (oOpenPgpKey)
|
|||
this.key(oOpenPgpKey.armor);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -11695,7 +11755,7 @@ PopupsGenerateNewOpenPgpKeyViewModel.prototype.onFocus = function ()
|
|||
{
|
||||
this.email.focus(true);
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -11937,7 +11997,7 @@ PopupsComposeOpenPgpViewModel.prototype.onShow = function (fCallback, sText, sFr
|
|||
this.to(aRec);
|
||||
this.text(sText);
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -12087,7 +12147,7 @@ PopupsIdentityViewModel.prototype.onFocus = function ()
|
|||
this.email.focused(true);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -12149,7 +12209,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
|
|||
RL.data().mainLanguage(sLang);
|
||||
this.cancelCommand();
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -12205,7 +12265,7 @@ PopupsTwoFactorTestViewModel.prototype.onFocus = function ()
|
|||
{
|
||||
this.code.focused(true);
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -12318,7 +12378,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
|
|||
}, this));
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -12365,7 +12425,7 @@ PopupsKeyboardShortcutsHelpViewModel.prototype.onBuild = function (oDom)
|
|||
}
|
||||
}, this));
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -12700,7 +12760,7 @@ LoginViewModel.prototype.selectLanguage = function ()
|
|||
kn.showScreenPopup(PopupsLanguagesViewModel);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -12798,7 +12858,7 @@ AbstractSystemDropDownViewModel.prototype.onBuild = function ()
|
|||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -12812,7 +12872,7 @@ function MailBoxSystemDropDownViewModel()
|
|||
}
|
||||
|
||||
Utils.extendAsViewModel('MailBoxSystemDropDownViewModel', MailBoxSystemDropDownViewModel, AbstractSystemDropDownViewModel);
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -12826,7 +12886,7 @@ function SettingsSystemDropDownViewModel()
|
|||
}
|
||||
|
||||
Utils.extendAsViewModel('SettingsSystemDropDownViewModel', SettingsSystemDropDownViewModel, AbstractSystemDropDownViewModel);
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -13076,7 +13136,7 @@ MailBoxFolderListViewModel.prototype.contactsClick = function ()
|
|||
kn.showScreenPopup(PopupsContactsViewModel);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -13981,7 +14041,7 @@ MailBoxMessageListViewModel.prototype.initUploaderForAppend = function ()
|
|||
;
|
||||
|
||||
return !!oJua;
|
||||
};
|
||||
};
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -14675,7 +14735,7 @@ MailBoxMessageViewViewModel.prototype.readReceipt = function (oMessage)
|
|||
RL.reloadFlagsCurrentMessageListAndMessageFromCache();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -14706,7 +14766,7 @@ SettingsMenuViewModel.prototype.backToMailBoxClick = function ()
|
|||
{
|
||||
kn.setHash(RL.link().inbox());
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -14739,7 +14799,7 @@ SettingsPaneViewModel.prototype.backToMailBoxClick = function ()
|
|||
{
|
||||
kn.setHash(RL.link().inbox());
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -14901,7 +14961,7 @@ SettingsGeneral.prototype.selectLanguage = function ()
|
|||
{
|
||||
kn.showScreenPopup(PopupsLanguagesViewModel);
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -14953,7 +15013,7 @@ SettingsContacts.prototype.onBuild = function ()
|
|||
//{
|
||||
//
|
||||
//};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -15036,7 +15096,7 @@ SettingsAccounts.prototype.deleteAccount = function (oAccountToRemove)
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -15126,7 +15186,7 @@ SettingsIdentity.prototype.onBuild = function ()
|
|||
|
||||
}, 50);
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -15345,7 +15405,7 @@ SettingsIdentities.prototype.onBuild = function (oDom)
|
|||
});
|
||||
|
||||
}, 50);
|
||||
};
|
||||
};
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -15382,7 +15442,7 @@ SettingsFilters.prototype.addFilter = function ()
|
|||
|
||||
this.filters.push(oFilter);
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -15534,7 +15594,7 @@ SettingsSecurity.prototype.onBuild = function ()
|
|||
this.processing(true);
|
||||
RL.remote().getTwoFactor(this.onResult);
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -15603,7 +15663,7 @@ function SettingsSocialScreen()
|
|||
}
|
||||
|
||||
Utils.addSettingsViewModel(SettingsSocialScreen, 'SettingsSocial', 'SETTINGS_LABELS/LABEL_SOCIAL_NAME', 'social');
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -15710,7 +15770,7 @@ SettingsChangePasswordScreen.prototype.onChangePasswordResponse = function (sRes
|
|||
Utils.getNotification(Enums.Notification.CouldNotSaveNewPassword));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -15907,7 +15967,7 @@ SettingsFolders.prototype.unSubscribeFolder = function (oFolder)
|
|||
|
||||
oFolder.subScribed(false);
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -16023,7 +16083,7 @@ SettingsThemes.prototype.onBuild = function ()
|
|||
};
|
||||
}));
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -16093,7 +16153,7 @@ SettingsOpenPGP.prototype.deleteOpenPgpKey = function (oOpenPgpKeyToRemove)
|
|||
RL.reloadOpenPgpKeys();
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -16221,13 +16281,14 @@ AbstractData.prototype.populateDataOnStart = function()
|
|||
this.googleEnable(!!RL.settingsGet('AllowGoogleSocial'));
|
||||
this.googleClientID(RL.settingsGet('GoogleClientID'));
|
||||
this.googleClientSecret(RL.settingsGet('GoogleClientSecret'));
|
||||
this.googleApiKey(RL.settingsGet('GoogleApiKey'));
|
||||
|
||||
this.dropboxEnable(!!RL.settingsGet('AllowDropboxSocial'));
|
||||
this.dropboxApiKey(RL.settingsGet('DropboxApiKey'));
|
||||
|
||||
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -17484,7 +17545,7 @@ WebMailDataStorage.prototype.findSelfPrivateKey = function (sPassword)
|
|||
{
|
||||
return this.findPrivateKeyByEmail(this.accountEmail(), sPassword);
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -17768,7 +17829,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
|
|||
'Version': sVersion
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -18555,7 +18616,7 @@ WebMailAjaxRemoteStorage.prototype.socialUsers = function (fCallback)
|
|||
this.defaultRequest(fCallback, 'SocialUsers');
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -18616,7 +18677,7 @@ AbstractCacheStorage.prototype.setServicesData = function (oData)
|
|||
{
|
||||
this.oServices = oData;
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -18936,7 +18997,7 @@ WebMailCacheStorage.prototype.storeMessageFlagsToCacheByFolderAndUid = function
|
|||
this.setMessageFlagsToCache(sFolder, sUid, aFlags);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -19118,7 +19179,7 @@ AbstractSettings.prototype.routes = function ()
|
|||
['', oRules]
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -19135,7 +19196,7 @@ _.extend(LoginScreen.prototype, KnoinAbstractScreen.prototype);
|
|||
LoginScreen.prototype.onShow = function ()
|
||||
{
|
||||
RL.setTitle('');
|
||||
};
|
||||
};
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -19308,7 +19369,7 @@ MailBoxScreen.prototype.routes = function ()
|
|||
[/^([^\/]*)$/, {'normalize_': fNormS}]
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -19337,7 +19398,7 @@ SettingsScreen.prototype.onShow = function ()
|
|||
RL.setTitle(this.sSettingsTitle);
|
||||
RL.data().keyScope(Enums.KeyState.Settings);
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -19697,7 +19758,7 @@ AbstractApp.prototype.bootstart = function ()
|
|||
|
||||
ssm.ready();
|
||||
};
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
|
@ -20994,7 +21055,7 @@ RainLoopApp.prototype.bootstart = function ()
|
|||
* @type {RainLoopApp}
|
||||
*/
|
||||
RL = new RainLoopApp();
|
||||
|
||||
|
||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
|
||||
|
@ -21047,7 +21108,7 @@ window['__RLBOOT'] = function (fCall) {
|
|||
window['__RLBOOT'] = null;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
if (window.SimplePace) {
|
||||
window.SimplePace.add(10);
|
||||
}
|
||||
|
|
16
rainloop/v/0.0.0/static/js/app.min.js
vendored
16
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue