Added Admin Panel About Tab

New update system for main code (About tab)
This commit is contained in:
RainLoop Team 2014-05-22 05:08:47 +04:00
parent b6a06d74a9
commit e63037d7e2
27 changed files with 978 additions and 625 deletions

View file

@ -5,12 +5,72 @@
*/
function AdminAbout()
{
var oData = RL.data();
this.version = ko.observable(RL.settingsGet('Version'));
this.access = ko.observable(!!RL.settingsGet('CoreAccess'));
this.errorDesc = ko.observable('');
this.coreReal = oData.coreReal;
this.coreUpdatable = oData.coreUpdatable;
this.coreAccess = oData.coreAccess;
this.coreChecking = oData.coreChecking;
this.coreUpdating = oData.coreUpdating;
this.coreRemoteVersion = oData.coreRemoteVersion;
this.coreRemoteRelease = oData.coreRemoteRelease;
this.coreVersionCompare = oData.coreVersionCompare;
this.statusType = ko.computed(function () {
var
sType = '',
iVersionCompare = this.coreVersionCompare(),
bChecking = this.coreChecking(),
bUpdating = this.coreUpdating(),
bReal = this.coreReal()
;
if (bChecking)
{
sType = 'checking';
}
else if (bUpdating)
{
sType = 'updating';
}
else if (bReal && 0 === iVersionCompare)
{
sType = 'up-to-date';
}
else if (bReal && -1 === iVersionCompare)
{
sType = 'available';
}
else if (!bReal)
{
sType = 'error';
this.errorDesc('Cannot access the repository at the moment.');
}
return sType;
}, this);
}
Utils.addSettingsViewModel(AdminAbout, 'AdminSettingsAbout', 'About', 'about');
//AdminAbout.prototype.onBuild = function ()
//{
//
//};
AdminAbout.prototype.onBuild = function ()
{
if (this.access())
{
RL.reloadCoreData();
}
};
AdminAbout.prototype.updateCoreData = function ()
{
if (!this.coreUpdating())
{
RL.updateCoreData();
}
};

View file

@ -102,28 +102,28 @@ AdminApp.prototype.reloadPackagesList = function ()
{
RL.data().packagesLoading(true);
RL.data().packagesReal(true);
RL.remote().packagesList(function (sResult, oData) {
RL.data().packagesLoading(false);
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{
RL.data().packagesReal(!!oData.Result.Real);
RL.data().packagesMainUpdatable(!!oData.Result.MainUpdatable);
var
var
aList = [],
aLoading = {}
;
_.each(RL.data().packages(), function (oItem) {
if (oItem && oItem['loading']())
{
aLoading[oItem['file']] = oItem;
}
});
if (Utils.isArray(oData.Result.List))
{
aList = _.compact(_.map(oData.Result.List, function (oItem) {
@ -145,6 +145,61 @@ AdminApp.prototype.reloadPackagesList = function ()
});
};
AdminApp.prototype.updateCoreData = function ()
{
var oRainData = RL.data();
oRainData.coreUpdating(true);
RL.remote().updateCoreData(function (sResult, oData) {
oRainData.coreUpdating(false);
oRainData.coreRemoteVersion('');
oRainData.coreRemoteRelease('');
oRainData.coreVersionCompare(-2);
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{
oRainData.coreReal(true);
window.location.reload();
}
else
{
oRainData.coreReal(false);
}
});
};
AdminApp.prototype.reloadCoreData = function ()
{
var oRainData = RL.data();
oRainData.coreChecking(true);
oRainData.coreReal(true);
RL.remote().coreData(function (sResult, oData) {
oRainData.coreChecking(false);
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{
oRainData.coreReal(!!oData.Result.Real);
oRainData.coreUpdatable(!!oData.Result.Updatable);
oRainData.coreAccess(!!oData.Result.Access);
oRainData.coreRemoteVersion(oData.Result.RemoteVersion || '');
oRainData.coreRemoteRelease(oData.Result.RemoteRelease || '');
oRainData.coreVersionCompare(Utils.pInt(oData.Result.VersionCompare));
}
else
{
oRainData.coreReal(false);
oRainData.coreRemoteVersion('');
oRainData.coreRemoteRelease('');
oRainData.coreVersionCompare(-2);
}
});
};
/**
*
* @param {boolean=} bForce = false
@ -163,7 +218,7 @@ AdminApp.prototype.reloadLicensing = function (bForce)
RL.data().licenseValid(true);
RL.data().licenseExpired(Utils.pInt(oData.Result['Expired']));
RL.data().licenseError('');
RL.data().licensing(true);
}
else
@ -212,8 +267,8 @@ AdminApp.prototype.bootstart = function ()
}
else
{
Utils.removeSettingsViewModel(AdminAbout);
// Utils.removeSettingsViewModel(AdminAbout);
if (!RL.capa(Enums.Capa.Prem))
{
Utils.removeSettingsViewModel(AdminBranding);

View file

@ -16,7 +16,5 @@ _.extend(AdminSettingsScreen.prototype, AbstractSettings.prototype);
AdminSettingsScreen.prototype.onShow = function ()
{
// AbstractSettings.prototype.onShow.call(this);
RL.setTitle('');
};

View file

@ -23,8 +23,6 @@ _.extend(SettingsScreen.prototype, AbstractSettings.prototype);
SettingsScreen.prototype.onShow = function ()
{
// AbstractSettings.prototype.onShow.call(this);
RL.setTitle(this.sSettingsTitle);
RL.data().keyScope(Enums.KeyState.Settings);
};

View file

@ -7,7 +7,7 @@
function AdminAjaxRemoteStorage()
{
AbstractAjaxRemoteStorage.call(this);
this.oRequests = {};
}
@ -67,6 +67,22 @@ AdminAjaxRemoteStorage.prototype.packagesList = function (fCallback)
this.defaultRequest(fCallback, 'AdminPackagesList');
};
/**
* @param {?Function} fCallback
*/
AdminAjaxRemoteStorage.prototype.coreData = function (fCallback)
{
this.defaultRequest(fCallback, 'AdminCoreData');
};
/**
* @param {?Function} fCallback
*/
AdminAjaxRemoteStorage.prototype.updateCoreData = function (fCallback)
{
this.defaultRequest(fCallback, 'AdminUpdateCoreData', {}, 90000);
};
/**
* @param {?Function} fCallback
* @param {Object} oPackage

View file

@ -7,24 +7,33 @@
function AdminDataStorage()
{
AbstractData.call(this);
this.domainsLoading = ko.observable(false).extend({'throttle': 100});
this.domains = ko.observableArray([]);
this.pluginsLoading = ko.observable(false).extend({'throttle': 100});
this.plugins = ko.observableArray([]);
this.packagesReal = ko.observable(true);
this.packagesMainUpdatable = ko.observable(true);
this.packagesLoading = ko.observable(false).extend({'throttle': 100});
this.packages = ko.observableArray([]);
this.coreReal = ko.observable(true);
this.coreUpdatable = ko.observable(true);
this.coreAccess = ko.observable(true);
this.coreChecking = ko.observable(false).extend({'throttle': 100});
this.coreUpdating = ko.observable(false).extend({'throttle': 100});
this.coreRemoteVersion = ko.observable('');
this.coreRemoteRelease = ko.observable('');
this.coreVersionCompare = ko.observable(-2);
this.licensing = ko.observable(false);
this.licensingProcess = ko.observable(false);
this.licenseValid = ko.observable(false);
this.licenseExpired = ko.observable(0);
this.licenseError = ko.observable('');
this.licenseTrigger = ko.observable(false);
this.adminManLoading = ko.computed(function () {

View file

@ -1,101 +1,102 @@
.b-admin-left {
.b-toolbar {
position: absolute;
top: 0;
right: 0;
left: 0;
height: 34px;
padding: 8px 0 0 @rlLowMargin;
}
.b-content {
position: absolute;
top: 50px + @rlLowMargin + 10px;
bottom: @rlLowMargin;
left: 0;
right: 0;
overflow: hidden;
.content {
-webkit-overflow-scrolling: touch;
}
}
}
.b-admin-menu {
.e-item {
overflow: hidden;
text-decoration: none;
outline: 0;
}
.e-link {
position: relative;
display: block;
height: 30px;
line-height: 29px;
cursor: pointer;
font-size: 18px;
z-index: 1;
cursor: default;
background-color: transparent;
color: #888;
padding: 4px 10px;
outline: 0;
text-decoration: none;
}
.e-item.selectable .e-link {
cursor: pointer;
}
.e-item.selectable {
&:hover .e-link, &.selected .e-link {
background-color: #555;
color: #fff;
}
}
}
.b-admin-right {
.b-toolbar {
position: absolute;
top: 0;
right: 0;
left: 0;
height: 34px;
padding: 8px @rlLowMargin;
color: #fff;
}
.b-content {
position: absolute;
top: 50px + @rlLowMargin;
bottom: @rlLowMargin;
left: 0;
right: @rlLowMargin;
overflow-y: auto;
z-index: 2;
background-color: #fff;
border: @rlMainBorderSize solid @rlMainDarkColor;
.box-shadow(@rlMainShadow);
.border-radius(@rlMainBorderRadius);
.content {
-webkit-overflow-scrolling: touch;
}
}
.b-settings-content {
padding: 20px;
}
}
.b-admin-left {
.b-toolbar {
position: absolute;
top: 0;
right: 0;
left: 0;
height: 34px;
padding: 8px 0 0 @rlLowMargin;
}
.b-content {
position: absolute;
top: 50px + @rlLowMargin + 10px;
bottom: @rlLowMargin;
left: 0;
right: 0;
overflow: hidden;
.content {
-webkit-overflow-scrolling: touch;
}
}
}
.b-admin-menu {
.e-item {
overflow: hidden;
text-decoration: none;
outline: 0;
}
.e-link {
position: relative;
display: block;
height: 30px;
line-height: 29px;
cursor: pointer;
font-size: 18px;
z-index: 1;
cursor: default;
background-color: transparent;
color: #888;
padding: 4px 10px;
outline: 0;
text-decoration: none;
}
.e-item.selectable .e-link {
cursor: pointer;
}
.e-item.selectable {
&:hover .e-link, &.selected .e-link {
background-color: #555;
color: #fff;
}
}
}
.b-admin-right {
.b-toolbar {
position: absolute;
top: 0;
right: 0;
left: 0;
height: 34px;
padding: 8px @rlLowMargin;
color: #fff;
}
.b-content {
position: absolute;
top: 50px + @rlLowMargin;
bottom: @rlLowMargin;
left: 0;
right: @rlLowMargin;
overflow-y: auto;
z-index: 2;
background-color: #fff;
border: @rlMainBorderSize solid @rlMainDarkColor;
.box-shadow(@rlMainShadow);
.border-radius(@rlMainBorderRadius);
.content {
-webkit-overflow-scrolling: touch;
}
}
.b-settings-content {
padding: 20px;
padding-left: 30px;
}
}

View file

@ -4,7 +4,13 @@
display: inline-block;
width: 250px;
height: 250px;
margin-top: -10px;
margin-bottom: -10px;
background-image: url("images/rainloop-logo.png");
}
.rl-desc {
margin-top: 20px;
margin-left: -20px;
}
}

View file

@ -1,99 +1,100 @@
.b-settins-left {
.b-toolbar {
position: absolute;
top: 0;
right: 0;
left: 0;
height: 34px;
padding: 8px 0 0 @rlLowMargin;
}
.b-content {
position: absolute;
top: 50px + @rlLowMargin + 10px;
bottom: @rlLowMargin;
left: 0;
right: 0;
overflow: hidden;
.content {
-webkit-overflow-scrolling: touch;
}
}
}
.b-settings-menu {
.e-item {
overflow: hidden;
text-decoration: none;
outline: 0;
}
.e-link {
position: relative;
display: block;
height: 30px;
line-height: 29px;
font-size: 18px;
z-index: 1;
cursor: default;
background-color: transparent;
color: #888;
padding: 4px 10px;
outline: 0;
text-decoration: none;
}
.e-item.selectable .e-link {
cursor: pointer;
}
.e-item.selectable {
&:hover .e-link, &.selected .e-link {
background-color: #555;
color: #fff;
}
}
}
.b-settins-right {
.b-toolbar {
position: absolute;
top: 0;
right: 0;
left: 0;
height: 34px;
padding: 8px 5px;
color: #fff;
}
.b-content {
position: absolute;
top: 50px;
bottom: @rlLowMargin;
left: 0;
right: @rlLowMargin;
overflow-y: auto;
z-index: 2;
background-color: #fff;
border: @rlMainBorderSize solid @rlMainDarkColor;
.box-shadow(@rlMainShadow);
.border-radius(@rlMainBorderRadius);
.content {
-webkit-overflow-scrolling: touch;
}
}
.b-settings-content {
padding: 20px;
}
}
.b-settins-left {
.b-toolbar {
position: absolute;
top: 0;
right: 0;
left: 0;
height: 34px;
padding: 8px 0 0 @rlLowMargin;
}
.b-content {
position: absolute;
top: 50px + @rlLowMargin + 10px;
bottom: @rlLowMargin;
left: 0;
right: 0;
overflow: hidden;
.content {
-webkit-overflow-scrolling: touch;
}
}
}
.b-settings-menu {
.e-item {
overflow: hidden;
text-decoration: none;
outline: 0;
}
.e-link {
position: relative;
display: block;
height: 30px;
line-height: 29px;
font-size: 18px;
z-index: 1;
cursor: default;
background-color: transparent;
color: #888;
padding: 4px 10px;
outline: 0;
text-decoration: none;
}
.e-item.selectable .e-link {
cursor: pointer;
}
.e-item.selectable {
&:hover .e-link, &.selected .e-link {
background-color: #555;
color: #fff;
}
}
}
.b-settins-right {
.b-toolbar {
position: absolute;
top: 0;
right: 0;
left: 0;
height: 34px;
padding: 8px 5px;
color: #fff;
}
.b-content {
position: absolute;
top: 50px;
bottom: @rlLowMargin;
left: 0;
right: @rlLowMargin;
overflow-y: auto;
z-index: 2;
background-color: #fff;
border: @rlMainBorderSize solid @rlMainDarkColor;
.box-shadow(@rlMainShadow);
.border-radius(@rlMainBorderRadius);
.content {
-webkit-overflow-scrolling: touch;
}
}
.b-settings-content {
padding: 20px;
padding-left: 30px;
}
}

View file

@ -1,8 +1,8 @@
{
"name": "RainLoop",
"title": "RainLoop Webmail",
"version": "1.6.6",
"release": "930",
"version": "1.6.7",
"release": "102",
"description": "Simple, modern & fast web-based email client",
"homepage": "http://rainloop.net",
"main": "Gruntfile.js",

View file

@ -1171,6 +1171,7 @@ class Actions
$aResult['SubscriptionEnabled'] = \MailSo\Base\Utils::ValidateDomain($aResult['AdminDomain']);
$aResult['WeakPassword'] = $oConfig->ValidatePassword('12345');
$aResult['CoreAccess'] = $this->rainLoopCoreAccess();
}
$aResult['Capa'] = $this->Capa(true);
@ -2604,25 +2605,11 @@ class Actions
}
/**
* @param bool $bAdditionalOnly = false
*
* @return string
*/
private function rainloopRepo($bAdditionalOnly = false)
private function rainloopRepo()
{
if ($bAdditionalOnly)
{
$sUrl = $this->Config()->Get('labs', 'additional_repo', '');
}
else
{
$sUrl = $this->Config()->Get('labs', 'custom_repo', '');
if (0 === \strlen($sUrl))
{
$sUrl = APP_REP_PATH;
}
}
$sUrl = APP_REP_PATH;
if ('' !== $sUrl)
{
$sUrl = rtrim($sUrl, '\\/').'/';
@ -2635,15 +2622,17 @@ class Actions
{
return @file_exists(APP_INDEX_ROOT_PATH.'index.php') &&
@is_writable(APP_INDEX_ROOT_PATH.'index.php') &&
@is_writable(APP_INDEX_ROOT_PATH.'rainloop/');
@is_writable(APP_INDEX_ROOT_PATH.'rainloop/') &&
APP_VERSION !== APP_DEV_VERSION
;
}
private function rainLoopCoreAccess()
{
$sCoreAccess = \strtolower(\preg_replace('/[\s,;]+/', ' ',
$this->Config()->Get('security', 'core_install_access_domains', '')));
$this->Config()->Get('security', 'core_install_access_domain', '')));
return '' === $sCoreAccess || APP_SITE === $sCoreAccess;
return '' === $sCoreAccess || '*' === $sCoreAccess || APP_SITE === $sCoreAccess;
}
/**
@ -2661,22 +2650,6 @@ class Actions
$sRepoFile = 'repository.json';
$iRepTime = 0;
if ($bMain)
{
switch (\strtolower(\trim($this->Config()->Get('labs', 'repo_type', 'stable'))))
{
case 'dev':
case 'nightly':
case 'beta':
$sRepoFile = 'beta.repository.json';
break;
case 'stable':
default:
$sRepoFile = 'repository.json';
break;
}
}
$oHttp = \MailSo\Base\Http::SingletonInstance();
$sCacheKey = 'UPDATER/('.$sRepo.')/'.$sRepoFile;
@ -2717,8 +2690,6 @@ class Actions
$bReal = \is_array($aRep) && 0 < \count($aRep);
}
$bCoreAccess = $this->rainLoopCoreAccess();
$aResult = array();
if (\is_array($aRep))
{
@ -2737,24 +2708,7 @@ class Actions
continue;
}
if ('core' === $oItem->type)
{
if ($bCoreAccess)
{
$aResult[] = array(
'type' => $oItem->type,
'id' => $oItem->id,
'name' => $oItem->name,
'installed' => APP_VERSION,
'version' => $oItem->version,
'file' => $oItem->file,
'release' => $oItem->release,
'release_notes' => isset($oItem->{'release_notes'}) ? $oItem->{'release_notes'} : '',
'desc' => $oItem->description
);
}
}
else if ('plugin' === $oItem->type)
if ('plugin' === $oItem->type)
{
$aResult[] = array(
'type' => $oItem->type,
@ -2775,47 +2729,72 @@ class Actions
return $aResult;
}
private function getCoreData(&$bReal)
{
$bReal = false;
$sRepo = APP_REPO_CORE_FILE;
$oHttp = \MailSo\Base\Http::SingletonInstance();
$sCacheKey = 'CORE-UPDATER/'.$sRepo;
$sRep = $this->Cacher()->Get($sCacheKey);
if ('' !== $sRep)
{
$iRepTime = $this->Cacher()->GetTimer($sCacheKey);
}
if ('' === $sRep || 0 === $iRepTime || time() - 3600 > $iRepTime)
{
$iCode = 0;
$sContentType = '';
$sRep = '' !== $sRepo ? $oHttp->GetUrlAsString($sRepo, 'RainLoop', $sContentType, $iCode, $this->Logger(), 10,
$this->Config()->Get('labs', 'curl_proxy', ''), $this->Config()->Get('labs', 'curl_proxy_auth', '')) : false;
if (false !== $sRep)
{
$aRep = @\json_decode($sRep, true, 10);
$bReal = \is_array($aRep) && 0 < \count($aRep) && isset($aRep['id']) && 'rainloop' === $aRep['id'];
if ($bReal)
{
$this->Cacher()->Set($sCacheKey, $sRep);
$this->Cacher()->SetTimer($sCacheKey);
}
}
else
{
$this->Logger()->Write('Cannot read remote repository file: '.$sRepo, \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
}
}
else if ('' !== $sRep)
{
$aRep = @\json_decode($sRep, true, 10);
$bReal = \is_array($aRep) && 0 < \count($aRep) && isset($aRep['id']) && 'rainloop' === $aRep['id'];
}
return $bReal ? $aRep : false;
}
private function getRepositoryData(&$bReal, &$bRainLoopUpdatable)
{
$bRainLoopUpdatable = $this->rainLoopUpdatable();
$bCoreAccess = $this->rainLoopCoreAccess();
$aResult = $this->getRepositoryDataByUrl($this->rainloopRepo(), $bReal);
$sAddRepo = $this->rainloopRepo(true);
if (0 < \strlen($sAddRepo))
$aSub = array();
if (\is_array($aResult))
{
$bFakeReal = false;
$aAddData = $this->getRepositoryDataByUrl($sAddRepo, $bFakeReal, false);
if ($bFakeReal && \is_array($aAddData) && 0 < \count($aAddData))
foreach ($aResult as $aItem)
{
$aResult = \array_merge($aResult, $aAddData);
if ('plugin' === $aItem['type'])
{
$aSub[] = $aItem;
}
}
}
$bAddCore = false;
foreach ($aResult as $aItem)
{
if ($aItem && 'core' === $aItem['type'])
{
$bAddCore = true;
break;
}
}
if ($bCoreAccess && !$bAddCore)
{
\array_unshift($aResult, array(
'type' => 'core',
'id' => 'rainloop',
'name' => 'RainLoop Webmail (core)',
'installed' => APP_VERSION,
'version' => '',
'file' => '',
'release' => '',
'release_notes' => '',
'desc' => ''
));
$aResult = $aSub;
unset($aSub);
}
$aInstalled = $this->Plugins()->InstalledPlugins();
@ -2861,20 +2840,6 @@ class Actions
$aItem['canBeDeleted'] = '' !== $aItem['installed'] && 'plugin' === $aItem['type'];
$aItem['canBeUpdated'] = $aItem['compare'];
$aItem['canBeInstalled'] = true;
if ('plugin' !== $aItem['type'])
{
if (!$bRainLoopUpdatable)
{
$aItem['canBeInstalled'] = false;
$aItem['canBeUpdated'] = false;
$aItem['compare'] = false;
}
else if (APP_VERSION === APP_DEV_VERSION)
{
$aItem['canBeUpdated'] = false;
}
}
}
return $aResult;
@ -2901,111 +2866,61 @@ class Actions
/**
* @return array
*/
public function DoAdminPackageDelete()
public function DoAdminCoreData()
{
$this->IsAdminLoggined();
$sId = $this->GetActionParam('Id', '');
$bReal = false;
$bRainLoopUpdatable = false;
$aList = $this->getRepositoryData($bReal, $bRainLoopUpdatable);
$aData = array();
$sResultId = '';
foreach ($aList as $oItem)
$bRainLoopUpdatable = $this->rainLoopUpdatable();
$bRainLoopAccess = $this->rainLoopCoreAccess();
if ($bRainLoopAccess)
{
if ($oItem && 'plugin' === $oItem['type'] && $sId === $oItem['id'])
{
$sResultId = $sId;
break;
}
$aData = $this->getCoreData($bReal);
}
$bResult = false;
if ('' !== $sResultId)
{
$bResult = \MailSo\Base\Utils::RecRmDir(APP_PLUGINS_PATH.$sResultId);
if ($bResult)
{
$this->pluginEnable($sResultId, false);
}
}
$sVersion = empty($aData['version']) ? '' : $aData['version'];
return $this->DefaultResponse(__FUNCTION__, $bResult);
return $this->DefaultResponse(__FUNCTION__, array(
'Real' => $bReal,
'Access' => $bRainLoopAccess,
'Updatable' => $bRainLoopUpdatable,
'Version' => APP_VERSION,
'RemoteVersion' => $sVersion,
'RemoteRelease' => empty($aData['release']) ? '' : $aData['release'],
'VersionCompare' => \version_compare(APP_VERSION, $sVersion)
));
}
/**
* @return array
*/
public function DoAdminPackageInstall()
public function DoAdminUpdateCoreData()
{
$this->IsAdminLoggined();
$sType = $this->GetActionParam('Type', '');
$sId = $this->GetActionParam('Id', '');
$sFile = $this->GetActionParam('File', '');
$this->Logger()->Write('Start package install: '.$sFile.' ('.$sType.')', \MailSo\Log\Enumerations\Type::INFO, 'INSTALLER');
$sRealFile = '';
$bReal = false;
$bRainLoopUpdatable = false;
$aList = $this->getRepositoryData($bReal, $bRainLoopUpdatable);
if (('plugin' !== $sType && $bRainLoopUpdatable) || 'plugin' === $sType)
$bRainLoopUpdatable = $this->rainLoopUpdatable();
$bRainLoopAccess = $this->rainLoopCoreAccess();
$aData = array();
if ($bRainLoopUpdatable && $bRainLoopAccess)
{
foreach ($aList as $oItem)
{
if ($oItem && $sFile === $oItem['file'] && $sId === $oItem['id'])
{
$sRealFile = $sFile;
break;
}
}
$aData = $this->getCoreData($bReal);
}
$sTmp = '';
$bResult = false;
if ('' !== $sRealFile)
if ($bReal && !empty($aData['file']))
{
$sUrl = $this->rainloopRepo().$sRealFile;
$sTmp = APP_PRIVATE_DATA.md5(microtime(true).$sRealFile).'.zip';
$pDest = @fopen($sTmp, 'w+b');
if ($pDest)
$sTmp = $this->downloadRemotePackageByUrl($aData['file']);
if (!empty($sTmp))
{
$iCode = 0;
$sContentType = '';
@\set_time_limit(60);
$oHttp = \MailSo\Base\Http::SingletonInstance();
$bResult = $oHttp->SaveUrlToFile($sUrl, $pDest, $sTmp, $sContentType, $iCode, $this->Logger(), 60,
$this->Config()->Get('labs', 'curl_proxy', ''), $this->Config()->Get('labs', 'curl_proxy_auth', ''));
if (!$bResult)
{
$this->Logger()->Write('Cannot save url to temp file: ', \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
$this->Logger()->Write($sUrl.' -> '.$sTmp, \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
}
@\fclose($pDest);
}
else
{
$this->Logger()->Write('Cannot create temp file: '.$sTmp, \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
}
}
if ($bResult && '' !== $sTmp)
{
include_once APP_VERSION_ROOT_PATH.'app/libraries/pclzip/pclzip.lib.php';
$oArchive = new \PclZip($sTmp);
if ('plugin' !== $sType)
{
$bResult = false;
include_once APP_VERSION_ROOT_PATH.'app/libraries/pclzip/pclzip.lib.php';
$oArchive = new \PclZip($sTmp);
$sTmpFolder = APP_PRIVATE_DATA.\md5($sTmp);
\mkdir($sTmpFolder);
@ -3059,8 +2974,132 @@ class Actions
{
$this->Logger()->Write('Cannot create tmp folder: '.$sTmpFolder, \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
}
@\unlink($sTmp);
}
else
}
return $this->DefaultResponse(__FUNCTION__, $bResult);
}
/**
* @return array
*/
public function DoAdminPackageDelete()
{
$this->IsAdminLoggined();
$sId = $this->GetActionParam('Id', '');
$bReal = false;
$bRainLoopUpdatable = false;
$aList = $this->getRepositoryData($bReal, $bRainLoopUpdatable);
$sResultId = '';
foreach ($aList as $oItem)
{
if ($oItem && 'plugin' === $oItem['type'] && $sId === $oItem['id'])
{
$sResultId = $sId;
break;
}
}
$bResult = false;
if ('' !== $sResultId)
{
$bResult = \MailSo\Base\Utils::RecRmDir(APP_PLUGINS_PATH.$sResultId);
if ($bResult)
{
$this->pluginEnable($sResultId, false);
}
}
return $this->DefaultResponse(__FUNCTION__, $bResult);
}
/**
* @param string $sUrl
*
* @return string
*/
private function downloadRemotePackageByUrl($sUrl)
{
$bResult = false;
$sTmp = APP_PRIVATE_DATA.\md5(\microtime(true).$sUrl).'.zip';
$pDest = @\fopen($sTmp, 'w+b');
if ($pDest)
{
$iCode = 0;
$sContentType = '';
@\set_time_limit(90);
$oHttp = \MailSo\Base\Http::SingletonInstance();
$bResult = $oHttp->SaveUrlToFile($sUrl, $pDest, $sTmp, $sContentType, $iCode, $this->Logger(), 60,
$this->Config()->Get('labs', 'curl_proxy', ''), $this->Config()->Get('labs', 'curl_proxy_auth', ''));
if (!$bResult)
{
$this->Logger()->Write('Cannot save url to temp file: ', \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
$this->Logger()->Write($sUrl.' -> '.$sTmp, \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
}
@\fclose($pDest);
}
else
{
$this->Logger()->Write('Cannot create temp file: '.$sTmp, \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
}
return $bResult ? $sTmp : '';
}
/**
* @return array
*/
public function DoAdminPackageInstall()
{
$this->IsAdminLoggined();
$sType = $this->GetActionParam('Type', '');
$sId = $this->GetActionParam('Id', '');
$sFile = $this->GetActionParam('File', '');
$this->Logger()->Write('Start package install: '.$sFile.' ('.$sType.')', \MailSo\Log\Enumerations\Type::INFO, 'INSTALLER');
$sRealFile = '';
$bReal = false;
$bRainLoopUpdatable = false;
$aList = $this->getRepositoryData($bReal, $bRainLoopUpdatable);
if ('plugin' === $sType)
{
foreach ($aList as $oItem)
{
if ($oItem && $sFile === $oItem['file'] && $sId === $oItem['id'])
{
$sRealFile = $sFile;
break;
}
}
}
$sTmp = '';
$bResult = false;
if ('' !== $sRealFile)
{
$sUrl = $this->rainloopRepo().$sRealFile;
$sTmp = $this->downloadRemotePackageByUrl($sUrl);
}
if ('' !== $sTmp)
{
include_once APP_VERSION_ROOT_PATH.'app/libraries/pclzip/pclzip.lib.php';
$oArchive = new \PclZip($sTmp);
if ('plugin' === $sType)
{
$bResult = true;
if (\is_dir(APP_PLUGINS_PATH.$sId))

View file

@ -107,7 +107,7 @@ class Application extends \RainLoop\Config\AbstractConfig
'allow_admin_panel' => array(true, 'Access settings'),
'allow_two_factor_auth' => array(false),
'admin_panel_host' => array(''),
'core_install_access_domains' => array('')
'core_install_access_domain' => array('')
),
'login' => array(
@ -236,9 +236,6 @@ Enables caching in the system'),
'imap_forwarded_flag' => array('$Forwarded'),
'imap_read_receipt_flag' => array('$ReadReceipt'),
'smtp_show_server_errors' => array(false),
'repo_type' => array('stable'),
'custom_repo' => array(''),
'additional_repo' => array(''),
'curl_proxy' => array(''),
'curl_proxy_auth' => array(''),
'in_iframe' => array(false),

View file

@ -6,7 +6,7 @@
&nbsp;&nbsp;
Admin Panel
&nbsp;&nbsp;
(<span data-bind="text: adminDomain"></span>&nbsp;&ndash;&nbsp;<span data-bind="text: version"></span>)
(<span data-bind="text: adminDomain"></span>)
</h4>
<div class="btn-group pull-right">
<a class="btn btn-narrow" data-bind="click: logoutClick">

View file

@ -3,20 +3,60 @@
<div class="legend">
About
</div>
<div class="control-group">
<div class="raw">
<div class="span4">
<div class="rl-logo"></div>
</div>
<div class="span4">
RainLoop Webmail
<div class="row" style="min-width: 800px;">
<div class="span4">
<div class="rl-logo"></div>
<div style="margin-left: 45px;">
2014 &copy; All Rights Reserved.
<br />
v<span data-bind="text: version"></span>
<a class="g-ui-link" href="http://rainloop.net/" target="_blank">http://rainloop.net/</a>
</div>
</div>
</div>
<div class="control-group">
<div class="span6 rl-desc">
<h1 style="margin-bottom: 0;">RainLoop</h1>
<h4 style="margin-top: 0;"><span data-bind="text: version"></span></h4>
<h4 style="color: #aaa; font-weight: normal;">Simple, modern & fast web-based email client</h4>
<h5 style="color: #aaa; font-weight: normal; margin-top: 40px;">
<div data-bind="visible: 'error' === statusType()">
<i class="icon-warning" style="color: red"></i>
&nbsp;&nbsp;
<span data-bind="text: errorDesc">Error</span>
</div>
<div data-bind="visible: 'available' === statusType()">
<i class="icon-warning" style="color: blue"></i>
&nbsp;&nbsp;
New <b data-bind="text: coreRemoteVersion"></b> version is available.
<span data-bind="visible: '' !== coreRemoteRelease()">
(<span data-bind="text: coreRemoteRelease"></span>)
</span>
<br />
<span data-bind="visible: coreUpdatable() && coreAccess()">
<span class="g-ui-link" data-bind="click: updateCoreData">Update</span>
&nbsp;&nbsp;&nbsp;
</span>
<span data-bind="visible: coreAccess()">
<a class="g-ui-link" href="http://rainloop.net/downloads/" target="_blank">Download</a>
&nbsp;&nbsp;&nbsp;
<a class="g-ui-link" href="http://rainloop.net/changelog/" target="_blank">Changelog</a>
</span>
</div>
<div data-bind="visible: 'up-to-date' === statusType()">
<i class="icon-ok" style="color: green"></i>
&nbsp;&nbsp;
RainLoop is up to date.
</div>
<div data-bind="visible: 'updating' === statusType()">
<i class="icon-spinner animated"></i>
&nbsp;&nbsp;
Updating&hellip;
</div>
<div data-bind="visible: 'checking' === statusType()">
<i class="icon-spinner animated"></i>
&nbsp;&nbsp;
Checking for updates&hellip;
</div>
</h5>
</div>
</div>
</div>
</div>

View file

@ -1,6 +1,6 @@
<div class="b-admin-general">
<div class="row" data-bind="visible: !contactsSupported">
<div class="alert span8">
<div class="alert span8" style="margin-top: 10px;">
<h4>Notice!</h4>
<br />
Your system doesn't support contacts.

View file

@ -1,12 +1,12 @@
<div class="b-admin-general">
<div class="row" data-bind="visible: weakPassword">
<div class="alert alert-error span8">
<h4>Warning!</h4>
<br />
You are using the default admin password.
<br />
For security reasons please <strong><a href="#/security">change</a></strong>
password to something else now.
<div class="alert alert-error span8" style="margin-top: 10px;">
<h4>Warning!</h4>
<br />
You are using the default admin password.
<br />
For security reasons please <strong><a href="#/security">change</a></strong>
password to something else now.
</div>
</div>
<div class="form-horizontal">

View file

@ -1,6 +1,6 @@
<div class="b-admin-licensing" >
<div class="row">
<div class="alert alert-info span10">
<div class="alert alert-info span10" style="margin-top: 10px;">
RainLoop Webmail is licensed under <strong>Creative Commons
<br />
Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)</strong> license.
@ -48,13 +48,13 @@
This domain is licensed for commercial use
</p>
<p data-bind="visible: 0 < licenseExpired()">
<b>Subscription expires:</b>
<b>Subscription expires:</b>
&nbsp;
<span data-bind="text: licenseExpiredMomentValue()"></span>
</p>
</div>
<div class="alert alert-error span8" style="margin-left: 0" data-bind="visible: !licenseValid() && '' !== licenseError(), text: licenseError"></div>
</div>
</div>
</div>
</div>
</div>

View file

@ -1,20 +1,14 @@
<div class="b-admin-packages">
<div class="alert" data-bind="visible: !packagesReal() && !packagesLoading()">
<div class="alert" style="margin-top: 10px;" data-bind="visible: !packagesReal() && !packagesLoading()">
Cannot access the repository at the moment.
</div>
<div class="alert" data-bind="visible: '' !== packagesError()">
<div class="alert" style="margin-top: 10px;" data-bind="visible: '' !== packagesError()">
<button type="button" class="close" data-bind="click: function () { packagesError('') }">&times;</button>
<span data-bind="text: packagesError"></span>
</div>
<!-- <div class="process-place" data-bind="style: {'visibility': visibility }">
<i class="icon-spinner animated"></i>
&nbsp;&nbsp;
loading...
</div>
-->
<div data-bind="visible: 0 < packagesAvailableForUpdate().length">
<div class="legend">
Available for Update (<span data-bind="text: packagesAvailableForUpdate().length"></span>)
@ -22,7 +16,7 @@
<div data-bind="template: { name: 'AdminSettingsPackagesTable', data: {f: packagesAvailableForUpdate} }"></div>
<br />
</div>
<div data-bind="visible: 0 < packagesCurrent().length">
<div class="legend">
Installed Packages
@ -30,7 +24,7 @@
<div data-bind="template: { name: 'AdminSettingsPackagesTable', data: {f: packagesCurrent} }"></div>
<br />
</div>
<div data-bind="visible: 0 < packagesAvailableForInstallation().length">
<div class="legend">
Available for Installation
@ -38,5 +32,5 @@
<div data-bind="template: { name: 'AdminSettingsPackagesTable', data: {f: packagesAvailableForInstallation} }"></div>
<br />
</div>
</div>

View file

@ -1,7 +1,7 @@
<tr class="e-item">
<td class="package-name-parent">
<i class="package-img" data-bind="css: 'core' === type ? 'icon-fire' : 'icon-bolt'"></i>
<span class="package-name" data-bind="text: name, css: {'core': 'core' === type}"></span>
<i class="package-img icon-bolt"></i>
<span class="package-name" data-bind="text: name"></span>
<span class="package-installed pull-right" data-bind="text: installed"></span>
<div class="package-desc" data-bind="text: desc"></div>
</td>

View file

@ -1,18 +1,12 @@
<div class="b-admin-plugins g-ui-user-select-none">
<div class="row">
<div class="alert span8" data-bind="visible: '' !== pluginsError()">
<div class="alert span8" style="margin-top: 10px;" data-bind="visible: '' !== pluginsError()">
<button type="button" class="close" data-bind="click: function () { pluginsError('') }">&times;</button>
<span data-bind="text: pluginsError"></span>
</div>
</div>
<!-- <div class="process-place" data-bind="style: {'visibility': visibility }">
<i class="icon-spinner animated"></i>
&nbsp;&nbsp;
loading...
</div>-->
<div class="legend">
Plugins
</div>

View file

@ -1,6 +1,6 @@
<div class="adminSecurity">
<div class="row">
<div class="alert alert-info span10">
<div class="alert alert-info span10" style="margin-top: 10px;">
Detailed information on social integration is found at
<a href="http://rainloop.net/docs/social/" target="_blank">http://rainloop.net/docs/social/</a>
</div>

View file

@ -20,7 +20,7 @@
define('APP_SITE', $sSite);
define('APP_SITE_CLEAR', 0 < strlen(APP_SITE) ? trim(preg_replace('/[^a-zA-Z0-9_.\-]+/', '_', trim(strtolower(APP_SITE))), ' _') : '');
define('APP_DEFAULT_PRIVATE_DATA_NAME', '_default_');
$sPrivateDataFolderInternalName = @file_exists(APP_INDEX_ROOT_PATH.'MULTIPLY') ? APP_SITE : '';
@ -31,10 +31,11 @@
define('APP_DEV_VERSION', '0.0.0');
define('APP_API_PATH', 'http://api.rainloop.net/');
define('APP_REP_PATH', 'http://repository.rainloop.net/v1/');
define('APP_REPO_CORE_FILE', 'http://repository.rainloop.net/v2/core.json');
define('APP_WEB_PATH', 'rainloop/v/'.APP_VERSION.'/');
define('APP_WEB_STATIC_PATH', APP_WEB_PATH.'static/');
define('APP_DATA_FOLDER_PATH_UNIX', str_replace('\\', '/', APP_DATA_FOLDER_PATH));
$sSalt = @file_get_contents(APP_DATA_FOLDER_PATH.'SALT.php');
$sData = @file_get_contents(APP_DATA_FOLDER_PATH.'DATA.php');
$sInstalled = @file_get_contents(APP_DATA_FOLDER_PATH.'INSTALLED');
@ -119,7 +120,7 @@ Options -Indexes
{
@mkdir(APP_PRIVATE_DATA, 0755, true);
}
foreach (array('logs', 'cache', 'configs', 'plugins', 'storage') as $sName)
{
if (!@is_dir(APP_PRIVATE_DATA.$sName))

View file

@ -9011,6 +9011,7 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
}
.b-admin-right .b-settings-content {
padding: 20px;
padding-left: 30px;
}
.b-admin-general .flag-selector {
padding-top: 5px;
@ -9182,8 +9183,14 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
display: inline-block;
width: 250px;
height: 250px;
margin-top: -10px;
margin-bottom: -10px;
background-image: url("images/rainloop-logo.png");
}
.b-admin-about .rl-desc {
margin-top: 20px;
margin-left: -20px;
}
.popups .b-activate-content {
width: 700px;
}
@ -9270,6 +9277,7 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
}
.b-settins-right .b-settings-content {
padding: 20px;
padding-left: 30px;
}
.b-settings-general .notification-desc-denied {
color: #999;

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (window, $, ko, crossroads, hasher, _) {
/*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (window, $, ko, crossroads, hasher, _) {
'use strict';
@ -77,14 +77,14 @@ var
$document = $(window.document),
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
;
;
/*jshint onevar: false*/
/**
* @type {?AdminApp}
*/
var RL = null;
/*jshint onevar: true*/
/**
* @type {?}
*/
@ -238,7 +238,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
return oType && 'application/pdf' === oType.type;
});
}
Consts.Defaults = {};
Consts.Values = {};
Consts.DataImages = {};
@ -356,7 +356,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
* @type {string}
*/
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
/**
* @enum {string}
*/
@ -745,7 +745,7 @@ Enums.Notification = {
'UnknownNotification': 999,
'UnknownError': 999
};
Utils.trim = $.trim;
Utils.inArray = $.inArray;
Utils.isArray = _.isArray;
@ -2495,7 +2495,7 @@ Utils.detectDropdownVisibility = _.debounce(function () {
return oItem.hasClass('open');
}));
}, 50);
// Base64 encode / decode
// http://www.webtoolkit.info/
@ -2658,7 +2658,7 @@ Base64 = {
}
};
/*jslint bitwise: false*/
/*jslint bitwise: false*/
ko.bindingHandlers.tooltip = {
'init': function (oElement, fValueAccessor) {
if (!Globals.bMobileDevice)
@ -3475,7 +3475,7 @@ ko.observable.fn.validateFunc = function (fFunc)
return this;
};
/**
* @constructor
*/
@ -3787,7 +3787,7 @@ LinkBuilder.prototype.socialFacebook = function ()
{
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
};
/**
* @type {Object}
*/
@ -3881,7 +3881,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
};
/**
* @constructor
*/
@ -3955,7 +3955,7 @@ CookieDriver.prototype.get = function (sKey)
return mResult;
};
/**
* @constructor
*/
@ -4026,7 +4026,7 @@ LocalStorageDriver.prototype.get = function (sKey)
return mResult;
};
/**
* @constructor
*/
@ -4069,7 +4069,7 @@ LocalStorage.prototype.get = function (iKey)
{
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
};
/**
* @constructor
*/
@ -4082,7 +4082,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
{
};
/**
* @param {string=} sPosition = ''
* @param {string=} sTemplate = ''
@ -4175,7 +4175,7 @@ KnoinAbstractViewModel.prototype.registerPopupKeyDown = function ()
return true;
});
};
/**
* @param {string} sScreenName
* @param {?=} aViewModels = []
@ -4251,7 +4251,7 @@ KnoinAbstractScreen.prototype.__start = function ()
this.oCross = oRoute;
}
};
/**
* @constructor
*/
@ -4653,7 +4653,7 @@ Knoin.prototype.bootstart = function ()
};
kn = new Knoin();
/**
* @param {string=} sEmail
* @param {string=} sName
@ -5017,7 +5017,7 @@ EmailModel.prototype.inputoTagLine = function ()
{
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
};
/**
* @constructor
*/
@ -5061,7 +5061,7 @@ ContactTagModel.prototype.toLine = function (bEncodeHtml)
return (Utils.isUnd(bEncodeHtml) ? false : !!bEncodeHtml) ?
Utils.encodeHtml(this.name()) : this.name();
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -5356,7 +5356,7 @@ PopupsDomainViewModel.prototype.clearForm = function ()
this.smtpAuth(true);
this.whiteList('');
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -5493,7 +5493,7 @@ PopupsPluginViewModel.prototype.onBuild = function ()
}
}, this));
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -5609,7 +5609,7 @@ PopupsActivateViewModel.prototype.validateSubscriptionKey = function ()
{
var sValue = this.key();
return '' === sValue || !!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(Utils.trim(sValue));
};
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -5669,7 +5669,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
RL.data().mainLanguage(sLang);
this.cancelCommand();
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -5775,7 +5775,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
}, this));
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -5862,7 +5862,7 @@ AdminLoginViewModel.prototype.onHide = function ()
{
this.loginFocus(false);
};
/**
* @param {?} oScreen
*
@ -5886,7 +5886,7 @@ AdminMenuViewModel.prototype.link = function (sRoute)
{
return '#/' + sRoute;
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -5910,7 +5910,7 @@ AdminPaneViewModel.prototype.logoutClick = function ()
RL.remote().adminLogout(function () {
RL.loginAndLogoutReload();
});
};
};
/**
* @constructor
*/
@ -6010,7 +6010,7 @@ AdminGeneral.prototype.selectLanguage = function ()
{
kn.showScreenPopup(PopupsLanguagesViewModel);
};
/**
* @constructor
*/
@ -6062,7 +6062,7 @@ AdminLogin.prototype.onBuild = function ()
}, 50);
};
/**
* @constructor
*/
@ -6131,7 +6131,7 @@ AdminBranding.prototype.onBuild = function ()
}, 50);
};
/**
* @constructor
*/
@ -6351,7 +6351,7 @@ AdminContacts.prototype.onBuild = function ()
}, 50);
};
/**
* @constructor
*/
@ -6440,7 +6440,7 @@ AdminDomains.prototype.onDomainListChangeRequest = function ()
{
RL.reloadDomainList();
};
/**
* @constructor
*/
@ -6552,7 +6552,7 @@ AdminSecurity.prototype.phpInfoLink = function ()
{
return RL.link().phpInfo();
};
/**
* @constructor
*/
@ -6668,7 +6668,7 @@ AdminSocial.prototype.onBuild = function ()
}, 50);
};
/**
* @constructor
*/
@ -6765,7 +6765,7 @@ AdminPlugins.prototype.onPluginDisableRequest = function (sResult, oData)
RL.reloadPluginList();
};
/**
* @constructor
*/
@ -6863,7 +6863,7 @@ AdminPackages.prototype.installPackage = function (oPackage)
RL.remote().packageInstall(this.requestHelper(oPackage, true), oPackage);
}
};
/**
* @constructor
*/
@ -6914,22 +6914,82 @@ AdminLicensing.prototype.licenseExpiredMomentValue = function ()
{
var oDate = moment.unix(this.licenseExpired());
return oDate.format('LL') + ' (' + oDate.from(moment()) + ')';
};
};
/**
* @constructor
*/
function AdminAbout()
{
var oData = RL.data();
this.version = ko.observable(RL.settingsGet('Version'));
this.access = ko.observable(!!RL.settingsGet('CoreAccess'));
this.errorDesc = ko.observable('');
this.coreReal = oData.coreReal;
this.coreUpdatable = oData.coreUpdatable;
this.coreAccess = oData.coreAccess;
this.coreChecking = oData.coreChecking;
this.coreUpdating = oData.coreUpdating;
this.coreRemoteVersion = oData.coreRemoteVersion;
this.coreRemoteRelease = oData.coreRemoteRelease;
this.coreVersionCompare = oData.coreVersionCompare;
this.statusType = ko.computed(function () {
var
sType = '',
iVersionCompare = this.coreVersionCompare(),
bChecking = this.coreChecking(),
bUpdating = this.coreUpdating(),
bReal = this.coreReal()
;
if (bChecking)
{
sType = 'checking';
}
else if (bUpdating)
{
sType = 'updating';
}
else if (bReal && 0 === iVersionCompare)
{
sType = 'up-to-date';
}
else if (bReal && -1 === iVersionCompare)
{
sType = 'available';
}
else if (!bReal)
{
sType = 'error';
this.errorDesc('Cannot access the repository at the moment.');
}
return sType;
}, this);
}
Utils.addSettingsViewModel(AdminAbout, 'AdminSettingsAbout', 'About', 'about');
//AdminAbout.prototype.onBuild = function ()
//{
//
//};
AdminAbout.prototype.onBuild = function ()
{
if (this.access())
{
RL.reloadCoreData();
}
};
AdminAbout.prototype.updateCoreData = function ()
{
if (!this.coreUpdating())
{
RL.updateCoreData();
}
};
/**
* @constructor
*/
@ -7060,7 +7120,7 @@ AbstractData.prototype.populateDataOnStart = function()
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
};
/**
* @constructor
* @extends AbstractData
@ -7068,24 +7128,33 @@ AbstractData.prototype.populateDataOnStart = function()
function AdminDataStorage()
{
AbstractData.call(this);
this.domainsLoading = ko.observable(false).extend({'throttle': 100});
this.domains = ko.observableArray([]);
this.pluginsLoading = ko.observable(false).extend({'throttle': 100});
this.plugins = ko.observableArray([]);
this.packagesReal = ko.observable(true);
this.packagesMainUpdatable = ko.observable(true);
this.packagesLoading = ko.observable(false).extend({'throttle': 100});
this.packages = ko.observableArray([]);
this.coreReal = ko.observable(true);
this.coreUpdatable = ko.observable(true);
this.coreAccess = ko.observable(true);
this.coreChecking = ko.observable(false).extend({'throttle': 100});
this.coreUpdating = ko.observable(false).extend({'throttle': 100});
this.coreRemoteVersion = ko.observable('');
this.coreRemoteRelease = ko.observable('');
this.coreVersionCompare = ko.observable(-2);
this.licensing = ko.observable(false);
this.licensingProcess = ko.observable(false);
this.licenseValid = ko.observable(false);
this.licenseExpired = ko.observable(0);
this.licenseError = ko.observable('');
this.licenseTrigger = ko.observable(false);
this.adminManLoading = ko.computed(function () {
@ -7102,7 +7171,7 @@ _.extend(AdminDataStorage.prototype, AbstractData.prototype);
AdminDataStorage.prototype.populateDataOnStart = function()
{
AbstractData.prototype.populateDataOnStart.call(this);
};
};
/**
* @constructor
*/
@ -7376,7 +7445,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
'Version': sVersion
});
};
/**
* @constructor
* @extends AbstractAjaxRemoteStorage
@ -7384,7 +7453,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
function AdminAjaxRemoteStorage()
{
AbstractAjaxRemoteStorage.call(this);
this.oRequests = {};
}
@ -7444,6 +7513,22 @@ AdminAjaxRemoteStorage.prototype.packagesList = function (fCallback)
this.defaultRequest(fCallback, 'AdminPackagesList');
};
/**
* @param {?Function} fCallback
*/
AdminAjaxRemoteStorage.prototype.coreData = function (fCallback)
{
this.defaultRequest(fCallback, 'AdminCoreData');
};
/**
* @param {?Function} fCallback
*/
AdminAjaxRemoteStorage.prototype.updateCoreData = function (fCallback)
{
this.defaultRequest(fCallback, 'AdminUpdateCoreData', {}, 90000);
};
/**
* @param {?Function} fCallback
* @param {Object} oPackage
@ -7621,7 +7706,7 @@ AdminAjaxRemoteStorage.prototype.adminPing = function (fCallback)
{
this.defaultRequest(fCallback, 'AdminPing');
};
/**
* @constructor
*/
@ -7704,7 +7789,7 @@ AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
{
this.oEmailsPicsHashes = oData;
};
/**
* @constructor
* @extends AbstractCacheStorage
@ -7715,7 +7800,7 @@ function AdminCacheStorage()
}
_.extend(AdminCacheStorage.prototype, AbstractCacheStorage.prototype);
/**
* @param {Array} aViewModels
* @constructor
@ -7893,7 +7978,7 @@ AbstractSettings.prototype.routes = function ()
['', oRules]
];
};
/**
* @constructor
* @extends KnoinAbstractScreen
@ -7908,7 +7993,7 @@ _.extend(AdminLoginScreen.prototype, KnoinAbstractScreen.prototype);
AdminLoginScreen.prototype.onShow = function ()
{
RL.setTitle('');
};
};
/**
* @constructor
* @extends AbstractSettings
@ -7925,10 +8010,8 @@ _.extend(AdminSettingsScreen.prototype, AbstractSettings.prototype);
AdminSettingsScreen.prototype.onShow = function ()
{
// AbstractSettings.prototype.onShow.call(this);
RL.setTitle('');
};
};
/**
* @constructor
* @extends KnoinAbstractBoot
@ -8286,7 +8369,7 @@ AbstractApp.prototype.bootstart = function ()
ssm.ready();
};
/**
* @constructor
* @extends AbstractApp
@ -8389,28 +8472,28 @@ AdminApp.prototype.reloadPackagesList = function ()
{
RL.data().packagesLoading(true);
RL.data().packagesReal(true);
RL.remote().packagesList(function (sResult, oData) {
RL.data().packagesLoading(false);
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{
RL.data().packagesReal(!!oData.Result.Real);
RL.data().packagesMainUpdatable(!!oData.Result.MainUpdatable);
var
var
aList = [],
aLoading = {}
;
_.each(RL.data().packages(), function (oItem) {
if (oItem && oItem['loading']())
{
aLoading[oItem['file']] = oItem;
}
});
if (Utils.isArray(oData.Result.List))
{
aList = _.compact(_.map(oData.Result.List, function (oItem) {
@ -8432,6 +8515,61 @@ AdminApp.prototype.reloadPackagesList = function ()
});
};
AdminApp.prototype.updateCoreData = function ()
{
var oRainData = RL.data();
oRainData.coreUpdating(true);
RL.remote().updateCoreData(function (sResult, oData) {
oRainData.coreUpdating(false);
oRainData.coreRemoteVersion('');
oRainData.coreRemoteRelease('');
oRainData.coreVersionCompare(-2);
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{
oRainData.coreReal(true);
window.location.reload();
}
else
{
oRainData.coreReal(false);
}
});
};
AdminApp.prototype.reloadCoreData = function ()
{
var oRainData = RL.data();
oRainData.coreChecking(true);
oRainData.coreReal(true);
RL.remote().coreData(function (sResult, oData) {
oRainData.coreChecking(false);
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{
oRainData.coreReal(!!oData.Result.Real);
oRainData.coreUpdatable(!!oData.Result.Updatable);
oRainData.coreAccess(!!oData.Result.Access);
oRainData.coreRemoteVersion(oData.Result.RemoteVersion || '');
oRainData.coreRemoteRelease(oData.Result.RemoteRelease || '');
oRainData.coreVersionCompare(Utils.pInt(oData.Result.VersionCompare));
}
else
{
oRainData.coreReal(false);
oRainData.coreRemoteVersion('');
oRainData.coreRemoteRelease('');
oRainData.coreVersionCompare(-2);
}
});
};
/**
*
* @param {boolean=} bForce = false
@ -8450,7 +8588,7 @@ AdminApp.prototype.reloadLicensing = function (bForce)
RL.data().licenseValid(true);
RL.data().licenseExpired(Utils.pInt(oData.Result['Expired']));
RL.data().licenseError('');
RL.data().licensing(true);
}
else
@ -8499,8 +8637,8 @@ AdminApp.prototype.bootstart = function ()
}
else
{
Utils.removeSettingsViewModel(AdminAbout);
// Utils.removeSettingsViewModel(AdminAbout);
if (!RL.capa(Enums.Capa.Prem))
{
Utils.removeSettingsViewModel(AdminBranding);
@ -8532,7 +8670,7 @@ AdminApp.prototype.bootstart = function ()
* @type {AdminApp}
*/
RL = new AdminApp();
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
$window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
@ -8583,9 +8721,9 @@ window['__RLBOOT'] = function (fCall) {
window['__RLBOOT'] = null;
});
};
if (window.SimplePace) {
window.SimplePace.add(10);
}
}
}(window, jQuery, ko, crossroads, hasher, _));

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/*! RainLoop Webmail Main Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (window, $, ko, crossroads, hasher, moment, Jua, _, ifvisible, key) {
/*! RainLoop Webmail Main Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (window, $, ko, crossroads, hasher, moment, Jua, _, ifvisible, key) {
'use strict';
@ -77,7 +77,7 @@ var
$document = $(window.document),
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
;
;
/*jshint onevar: false*/
/**
* @type {?RainLoopApp}
@ -88,7 +88,7 @@ var
$proxyDiv = $('<div></div>')
;
/*jshint onevar: true*/
/**
* @type {?}
*/
@ -242,7 +242,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
return oType && 'application/pdf' === oType.type;
});
}
Consts.Defaults = {};
Consts.Values = {};
Consts.DataImages = {};
@ -360,7 +360,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
* @type {string}
*/
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
/**
* @enum {string}
*/
@ -749,7 +749,7 @@ Enums.Notification = {
'UnknownNotification': 999,
'UnknownError': 999
};
Utils.trim = $.trim;
Utils.inArray = $.inArray;
Utils.isArray = _.isArray;
@ -2499,7 +2499,7 @@ Utils.detectDropdownVisibility = _.debounce(function () {
return oItem.hasClass('open');
}));
}, 50);
// Base64 encode / decode
// http://www.webtoolkit.info/
@ -2662,7 +2662,7 @@ Base64 = {
}
};
/*jslint bitwise: false*/
/*jslint bitwise: false*/
ko.bindingHandlers.tooltip = {
'init': function (oElement, fValueAccessor) {
if (!Globals.bMobileDevice)
@ -3479,7 +3479,7 @@ ko.observable.fn.validateFunc = function (fFunc)
return this;
};
/**
* @constructor
*/
@ -3791,7 +3791,7 @@ LinkBuilder.prototype.socialFacebook = function ()
{
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
};
/**
* @type {Object}
*/
@ -3885,7 +3885,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
};
function NewHtmlEditorWrapper(oElement, fOnBlur, fOnReady, fOnModeChange)
{
var self = this;
@ -4105,7 +4105,7 @@ NewHtmlEditorWrapper.prototype.clear = function (bFocus)
this.setHtml('', bFocus);
};
/**
* @constructor
* @param {koProperty} oKoList
@ -4814,7 +4814,7 @@ Selector.prototype.on = function (sEventName, fCallback)
{
this.oCallbacks[sEventName] = fCallback;
};
/**
* @constructor
*/
@ -4888,7 +4888,7 @@ CookieDriver.prototype.get = function (sKey)
return mResult;
};
/**
* @constructor
*/
@ -4959,7 +4959,7 @@ LocalStorageDriver.prototype.get = function (sKey)
return mResult;
};
/**
* @constructor
*/
@ -5002,7 +5002,7 @@ LocalStorage.prototype.get = function (iKey)
{
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
};
/**
* @constructor
*/
@ -5015,7 +5015,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
{
};
/**
* @param {string=} sPosition = ''
* @param {string=} sTemplate = ''
@ -5108,7 +5108,7 @@ KnoinAbstractViewModel.prototype.registerPopupKeyDown = function ()
return true;
});
};
/**
* @param {string} sScreenName
* @param {?=} aViewModels = []
@ -5184,7 +5184,7 @@ KnoinAbstractScreen.prototype.__start = function ()
this.oCross = oRoute;
}
};
/**
* @constructor
*/
@ -5586,7 +5586,7 @@ Knoin.prototype.bootstart = function ()
};
kn = new Knoin();
/**
* @param {string=} sEmail
* @param {string=} sName
@ -5950,7 +5950,7 @@ EmailModel.prototype.inputoTagLine = function ()
{
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
};
/**
* @constructor
*/
@ -6074,7 +6074,7 @@ ContactModel.prototype.lineAsCcc = function ()
return aResult.join(' ');
};
/**
* @param {number=} iType = Enums.ContactPropertyType.Unknown
* @param {string=} sTypeStr = ''
@ -6103,7 +6103,7 @@ function ContactPropertyModel(iType, sTypeStr, sValue, bFocused, sPlaceholder)
}, this);
}
/**
* @constructor
*/
@ -6147,7 +6147,7 @@ ContactTagModel.prototype.toLine = function (bEncodeHtml)
return (Utils.isUnd(bEncodeHtml) ? false : !!bEncodeHtml) ?
Utils.encodeHtml(this.name()) : this.name();
};
/**
* @constructor
*/
@ -6383,7 +6383,7 @@ AttachmentModel.prototype.iconClass = function ()
return sClass;
};
/**
* @constructor
* @param {string} sId
@ -6444,7 +6444,7 @@ ComposeAttachmentModel.prototype.initByUploadJson = function (oJsonAttachment)
}
return bResult;
};
};
/**
* @constructor
*/
@ -7638,7 +7638,7 @@ MessageModel.prototype.flagHash = function ()
return [this.deleted(), this.unseen(), this.flagged(), this.answered(), this.forwarded(),
this.isReadReceipt()].join('');
};
/**
* @constructor
*/
@ -7970,7 +7970,7 @@ FolderModel.prototype.printableFullName = function ()
{
return this.fullName.split(this.delimiter).join(' / ');
};
/**
* @param {string} sEmail
* @param {boolean=} bCanBeDelete = true
@ -7991,7 +7991,7 @@ AccountModel.prototype.email = '';
AccountModel.prototype.changeAccountLink = function ()
{
return RL.link().change(this.email);
};
};
/**
* @param {string} sId
* @param {string} sEmail
@ -8027,7 +8027,7 @@ IdentityModel.prototype.formattedNameForEmail = function ()
var sName = this.name();
return '' === sName ? this.email() : '"' + Utils.quoteName(sName) + '" <' + this.email() + '>';
};
/**
* @param {string} iIndex
* @param {string} sGuID
@ -8058,7 +8058,7 @@ OpenPgpKeyModel.prototype.user = '';
OpenPgpKeyModel.prototype.email = '';
OpenPgpKeyModel.prototype.armor = '';
OpenPgpKeyModel.prototype.isPrivate = false;
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -8154,7 +8154,7 @@ PopupsFolderClearViewModel.prototype.onShow = function (oFolder)
this.selectedFolder(oFolder);
}
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -8264,7 +8264,7 @@ PopupsFolderCreateViewModel.prototype.onFocus = function ()
{
this.folderName.focused(true);
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -8377,7 +8377,7 @@ PopupsFolderSystemViewModel.prototype.onShow = function (iNotificationType)
this.notification(sNotification);
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -9865,7 +9865,7 @@ PopupsComposeViewModel.prototype.triggerForResize = function ()
this.editorResizeThrottle();
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10607,7 +10607,7 @@ PopupsContactsViewModel.prototype.onHide = function ()
// oItem.checked(false);
// });
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10743,7 +10743,7 @@ PopupsAdvancedSearchViewModel.prototype.onFocus = function ()
{
this.fromFocus(true);
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10855,7 +10855,7 @@ PopupsAddAccountViewModel.prototype.onFocus = function ()
{
this.emailFocus(true);
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10941,7 +10941,7 @@ PopupsAddOpenPgpKeyViewModel.prototype.onFocus = function ()
{
this.key.focus(true);
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10981,7 +10981,7 @@ PopupsViewOpenPgpKeyViewModel.prototype.onShow = function (oOpenPgpKey)
this.key(oOpenPgpKey.armor);
}
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -11076,7 +11076,7 @@ PopupsGenerateNewOpenPgpKeyViewModel.prototype.onFocus = function ()
{
this.email.focus(true);
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -11316,7 +11316,7 @@ PopupsComposeOpenPgpViewModel.prototype.onShow = function (fCallback, sText, sFr
this.to(aRec);
this.text(sText);
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -11464,7 +11464,7 @@ PopupsIdentityViewModel.prototype.onFocus = function ()
this.email.focused(true);
}
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -11524,7 +11524,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
RL.data().mainLanguage(sLang);
this.cancelCommand();
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -11578,7 +11578,7 @@ PopupsTwoFactorTestViewModel.prototype.onFocus = function ()
{
this.code.focused(true);
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -11684,7 +11684,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
}, this));
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -11729,7 +11729,7 @@ PopupsKeyboardShortcutsHelpViewModel.prototype.onBuild = function (oDom)
}
}, this));
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -12041,7 +12041,7 @@ LoginViewModel.prototype.selectLanguage = function ()
kn.showScreenPopup(PopupsLanguagesViewModel);
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -12137,7 +12137,7 @@ AbstractSystemDropDownViewModel.prototype.onBuild = function ()
}
});
};
/**
* @constructor
* @extends AbstractSystemDropDownViewModel
@ -12149,7 +12149,7 @@ function MailBoxSystemDropDownViewModel()
}
Utils.extendAsViewModel('MailBoxSystemDropDownViewModel', MailBoxSystemDropDownViewModel, AbstractSystemDropDownViewModel);
/**
* @constructor
* @extends AbstractSystemDropDownViewModel
@ -12161,7 +12161,7 @@ function SettingsSystemDropDownViewModel()
}
Utils.extendAsViewModel('SettingsSystemDropDownViewModel', SettingsSystemDropDownViewModel, AbstractSystemDropDownViewModel);
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -12370,7 +12370,7 @@ MailBoxFolderListViewModel.prototype.contactsClick = function ()
kn.showScreenPopup(PopupsContactsViewModel);
}
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -13273,7 +13273,7 @@ MailBoxMessageListViewModel.prototype.initUploaderForAppend = function ()
;
return !!oJua;
};
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -13965,7 +13965,7 @@ MailBoxMessageViewViewModel.prototype.readReceipt = function (oMessage)
RL.reloadFlagsCurrentMessageListAndMessageFromCache();
}
};
/**
* @param {?} oScreen
*
@ -13994,7 +13994,7 @@ SettingsMenuViewModel.prototype.backToMailBoxClick = function ()
{
kn.setHash(RL.link().inbox());
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -14025,7 +14025,7 @@ SettingsPaneViewModel.prototype.backToMailBoxClick = function ()
{
kn.setHash(RL.link().inbox());
};
/**
* @constructor
*/
@ -14185,7 +14185,7 @@ SettingsGeneral.prototype.selectLanguage = function ()
{
kn.showScreenPopup(PopupsLanguagesViewModel);
};
/**
* @constructor
*/
@ -14235,7 +14235,7 @@ SettingsContacts.prototype.onBuild = function ()
//{
//
//};
/**
* @constructor
*/
@ -14316,7 +14316,7 @@ SettingsAccounts.prototype.deleteAccount = function (oAccountToRemove)
}
}
};
/**
* @constructor
*/
@ -14404,7 +14404,7 @@ SettingsIdentity.prototype.onBuild = function ()
}, 50);
};
/**
* @constructor
*/
@ -14562,7 +14562,7 @@ SettingsIdentities.prototype.onBuild = function (oDom)
});
}, 50);
};
};
/**
* @constructor
*/
@ -14712,7 +14712,7 @@ SettingsSecurity.prototype.onBuild = function ()
this.processing(true);
RL.remote().getTwoFactor(this.onResult);
};
/**
* @constructor
*/
@ -14779,7 +14779,7 @@ function SettingsSocialScreen()
}
Utils.addSettingsViewModel(SettingsSocialScreen, 'SettingsSocial', 'SETTINGS_LABELS/LABEL_SOCIAL_NAME', 'social');
/**
* @constructor
*/
@ -14884,7 +14884,7 @@ SettingsChangePasswordScreen.prototype.onChangePasswordResponse = function (sRes
Utils.getNotification(Enums.Notification.CouldNotSaveNewPassword));
}
};
/**
* @constructor
*/
@ -15079,7 +15079,7 @@ SettingsFolders.prototype.unSubscribeFolder = function (oFolder)
oFolder.subScribed(false);
};
/**
* @constructor
*/
@ -15193,7 +15193,7 @@ SettingsThemes.prototype.onBuild = function ()
};
}));
};
/**
* @constructor
*/
@ -15261,7 +15261,7 @@ SettingsOpenPGP.prototype.deleteOpenPgpKey = function (oOpenPgpKeyToRemove)
RL.reloadOpenPgpKeys();
}
}
};
};
/**
* @constructor
*/
@ -15392,7 +15392,7 @@ AbstractData.prototype.populateDataOnStart = function()
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
};
/**
* @constructor
* @extends AbstractData
@ -16645,7 +16645,7 @@ WebMailDataStorage.prototype.findSelfPrivateKey = function (sPassword)
{
return this.findPrivateKeyByEmail(this.accountEmail(), sPassword);
};
/**
* @constructor
*/
@ -16919,7 +16919,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
'Version': sVersion
});
};
/**
* @constructor
* @extends AbstractAjaxRemoteStorage
@ -17712,7 +17712,7 @@ WebMailAjaxRemoteStorage.prototype.socialUsers = function (fCallback)
this.defaultRequest(fCallback, 'SocialUsers');
};
/**
* @constructor
*/
@ -17795,7 +17795,7 @@ AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
{
this.oEmailsPicsHashes = oData;
};
/**
* @constructor
* @extends AbstractCacheStorage
@ -18113,7 +18113,7 @@ WebMailCacheStorage.prototype.storeMessageFlagsToCacheByFolderAndUid = function
this.setMessageFlagsToCache(sFolder, sUid, aFlags);
}
};
/**
* @param {Array} aViewModels
* @constructor
@ -18291,7 +18291,7 @@ AbstractSettings.prototype.routes = function ()
['', oRules]
];
};
/**
* @constructor
* @extends KnoinAbstractScreen
@ -18306,7 +18306,7 @@ _.extend(LoginScreen.prototype, KnoinAbstractScreen.prototype);
LoginScreen.prototype.onShow = function ()
{
RL.setTitle('');
};
};
/**
* @constructor
* @extends KnoinAbstractScreen
@ -18477,7 +18477,7 @@ MailBoxScreen.prototype.routes = function ()
[/^([^\/]*)$/, {'normalize_': fNormS}]
];
};
/**
* @constructor
* @extends AbstractSettings
@ -18501,12 +18501,10 @@ _.extend(SettingsScreen.prototype, AbstractSettings.prototype);
SettingsScreen.prototype.onShow = function ()
{
// AbstractSettings.prototype.onShow.call(this);
RL.setTitle(this.sSettingsTitle);
RL.data().keyScope(Enums.KeyState.Settings);
};
/**
* @constructor
* @extends KnoinAbstractBoot
@ -18864,7 +18862,7 @@ AbstractApp.prototype.bootstart = function ()
ssm.ready();
};
/**
* @constructor
* @extends AbstractApp
@ -20166,7 +20164,7 @@ RainLoopApp.prototype.bootstart = function ()
* @type {RainLoopApp}
*/
RL = new RainLoopApp();
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
$window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
@ -20217,9 +20215,9 @@ window['__RLBOOT'] = function (fCall) {
window['__RLBOOT'] = null;
});
};
if (window.SimplePace) {
window.SimplePace.add(10);
}
}
}(window, jQuery, ko, crossroads, hasher, moment, Jua, _, ifvisible, key));