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() function AdminAbout()
{ {
var oData = RL.data();
this.version = ko.observable(RL.settingsGet('Version')); 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'); 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().packagesLoading(true);
RL.data().packagesReal(true); RL.data().packagesReal(true);
RL.remote().packagesList(function (sResult, oData) { RL.remote().packagesList(function (sResult, oData) {
RL.data().packagesLoading(false); RL.data().packagesLoading(false);
if (Enums.StorageResultType.Success === sResult && oData && oData.Result) if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{ {
RL.data().packagesReal(!!oData.Result.Real); RL.data().packagesReal(!!oData.Result.Real);
RL.data().packagesMainUpdatable(!!oData.Result.MainUpdatable); RL.data().packagesMainUpdatable(!!oData.Result.MainUpdatable);
var var
aList = [], aList = [],
aLoading = {} aLoading = {}
; ;
_.each(RL.data().packages(), function (oItem) { _.each(RL.data().packages(), function (oItem) {
if (oItem && oItem['loading']()) if (oItem && oItem['loading']())
{ {
aLoading[oItem['file']] = oItem; aLoading[oItem['file']] = oItem;
} }
}); });
if (Utils.isArray(oData.Result.List)) if (Utils.isArray(oData.Result.List))
{ {
aList = _.compact(_.map(oData.Result.List, function (oItem) { 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 * @param {boolean=} bForce = false
@ -163,7 +218,7 @@ AdminApp.prototype.reloadLicensing = function (bForce)
RL.data().licenseValid(true); RL.data().licenseValid(true);
RL.data().licenseExpired(Utils.pInt(oData.Result['Expired'])); RL.data().licenseExpired(Utils.pInt(oData.Result['Expired']));
RL.data().licenseError(''); RL.data().licenseError('');
RL.data().licensing(true); RL.data().licensing(true);
} }
else else
@ -212,8 +267,8 @@ AdminApp.prototype.bootstart = function ()
} }
else else
{ {
Utils.removeSettingsViewModel(AdminAbout); // Utils.removeSettingsViewModel(AdminAbout);
if (!RL.capa(Enums.Capa.Prem)) if (!RL.capa(Enums.Capa.Prem))
{ {
Utils.removeSettingsViewModel(AdminBranding); Utils.removeSettingsViewModel(AdminBranding);

View file

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

View file

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

View file

@ -7,7 +7,7 @@
function AdminAjaxRemoteStorage() function AdminAjaxRemoteStorage()
{ {
AbstractAjaxRemoteStorage.call(this); AbstractAjaxRemoteStorage.call(this);
this.oRequests = {}; this.oRequests = {};
} }
@ -67,6 +67,22 @@ AdminAjaxRemoteStorage.prototype.packagesList = function (fCallback)
this.defaultRequest(fCallback, 'AdminPackagesList'); 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 {?Function} fCallback
* @param {Object} oPackage * @param {Object} oPackage

View file

@ -7,24 +7,33 @@
function AdminDataStorage() function AdminDataStorage()
{ {
AbstractData.call(this); AbstractData.call(this);
this.domainsLoading = ko.observable(false).extend({'throttle': 100}); this.domainsLoading = ko.observable(false).extend({'throttle': 100});
this.domains = ko.observableArray([]); this.domains = ko.observableArray([]);
this.pluginsLoading = ko.observable(false).extend({'throttle': 100}); this.pluginsLoading = ko.observable(false).extend({'throttle': 100});
this.plugins = ko.observableArray([]); this.plugins = ko.observableArray([]);
this.packagesReal = ko.observable(true); this.packagesReal = ko.observable(true);
this.packagesMainUpdatable = ko.observable(true); this.packagesMainUpdatable = ko.observable(true);
this.packagesLoading = ko.observable(false).extend({'throttle': 100}); this.packagesLoading = ko.observable(false).extend({'throttle': 100});
this.packages = ko.observableArray([]); 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.licensing = ko.observable(false);
this.licensingProcess = ko.observable(false); this.licensingProcess = ko.observable(false);
this.licenseValid = ko.observable(false); this.licenseValid = ko.observable(false);
this.licenseExpired = ko.observable(0); this.licenseExpired = ko.observable(0);
this.licenseError = ko.observable(''); this.licenseError = ko.observable('');
this.licenseTrigger = ko.observable(false); this.licenseTrigger = ko.observable(false);
this.adminManLoading = ko.computed(function () { this.adminManLoading = ko.computed(function () {

View file

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

View file

@ -4,7 +4,13 @@
display: inline-block; display: inline-block;
width: 250px; width: 250px;
height: 250px; height: 250px;
margin-top: -10px;
margin-bottom: -10px;
background-image: url("images/rainloop-logo.png"); 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-settins-left {
.b-toolbar { .b-toolbar {
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
left: 0; left: 0;
height: 34px; height: 34px;
padding: 8px 0 0 @rlLowMargin; padding: 8px 0 0 @rlLowMargin;
} }
.b-content { .b-content {
position: absolute; position: absolute;
top: 50px + @rlLowMargin + 10px; top: 50px + @rlLowMargin + 10px;
bottom: @rlLowMargin; bottom: @rlLowMargin;
left: 0; left: 0;
right: 0; right: 0;
overflow: hidden; overflow: hidden;
.content { .content {
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
} }
} }
} }
.b-settings-menu { .b-settings-menu {
.e-item { .e-item {
overflow: hidden; overflow: hidden;
text-decoration: none; text-decoration: none;
outline: 0; outline: 0;
} }
.e-link { .e-link {
position: relative; position: relative;
display: block; display: block;
height: 30px; height: 30px;
line-height: 29px; line-height: 29px;
font-size: 18px; font-size: 18px;
z-index: 1; z-index: 1;
cursor: default; cursor: default;
background-color: transparent; background-color: transparent;
color: #888; color: #888;
padding: 4px 10px; padding: 4px 10px;
outline: 0; outline: 0;
text-decoration: none; text-decoration: none;
} }
.e-item.selectable .e-link { .e-item.selectable .e-link {
cursor: pointer; cursor: pointer;
} }
.e-item.selectable { .e-item.selectable {
&:hover .e-link, &.selected .e-link { &:hover .e-link, &.selected .e-link {
background-color: #555; background-color: #555;
color: #fff; color: #fff;
} }
} }
} }
.b-settins-right { .b-settins-right {
.b-toolbar { .b-toolbar {
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
left: 0; left: 0;
height: 34px; height: 34px;
padding: 8px 5px; padding: 8px 5px;
color: #fff; color: #fff;
} }
.b-content { .b-content {
position: absolute; position: absolute;
top: 50px; top: 50px;
bottom: @rlLowMargin; bottom: @rlLowMargin;
left: 0; left: 0;
right: @rlLowMargin; right: @rlLowMargin;
overflow-y: auto; overflow-y: auto;
z-index: 2; z-index: 2;
background-color: #fff; background-color: #fff;
border: @rlMainBorderSize solid @rlMainDarkColor; border: @rlMainBorderSize solid @rlMainDarkColor;
.box-shadow(@rlMainShadow); .box-shadow(@rlMainShadow);
.border-radius(@rlMainBorderRadius); .border-radius(@rlMainBorderRadius);
.content { .content {
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
} }
} }
.b-settings-content { .b-settings-content {
padding: 20px; padding: 20px;
} padding-left: 30px;
} }
}

View file

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

View file

@ -1171,6 +1171,7 @@ class Actions
$aResult['SubscriptionEnabled'] = \MailSo\Base\Utils::ValidateDomain($aResult['AdminDomain']); $aResult['SubscriptionEnabled'] = \MailSo\Base\Utils::ValidateDomain($aResult['AdminDomain']);
$aResult['WeakPassword'] = $oConfig->ValidatePassword('12345'); $aResult['WeakPassword'] = $oConfig->ValidatePassword('12345');
$aResult['CoreAccess'] = $this->rainLoopCoreAccess();
} }
$aResult['Capa'] = $this->Capa(true); $aResult['Capa'] = $this->Capa(true);
@ -2604,25 +2605,11 @@ class Actions
} }
/** /**
* @param bool $bAdditionalOnly = false
*
* @return string * @return string
*/ */
private function rainloopRepo($bAdditionalOnly = false) private function rainloopRepo()
{ {
if ($bAdditionalOnly) $sUrl = APP_REP_PATH;
{
$sUrl = $this->Config()->Get('labs', 'additional_repo', '');
}
else
{
$sUrl = $this->Config()->Get('labs', 'custom_repo', '');
if (0 === \strlen($sUrl))
{
$sUrl = APP_REP_PATH;
}
}
if ('' !== $sUrl) if ('' !== $sUrl)
{ {
$sUrl = rtrim($sUrl, '\\/').'/'; $sUrl = rtrim($sUrl, '\\/').'/';
@ -2635,15 +2622,17 @@ class Actions
{ {
return @file_exists(APP_INDEX_ROOT_PATH.'index.php') && return @file_exists(APP_INDEX_ROOT_PATH.'index.php') &&
@is_writable(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() private function rainLoopCoreAccess()
{ {
$sCoreAccess = \strtolower(\preg_replace('/[\s,;]+/', ' ', $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'; $sRepoFile = 'repository.json';
$iRepTime = 0; $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(); $oHttp = \MailSo\Base\Http::SingletonInstance();
$sCacheKey = 'UPDATER/('.$sRepo.')/'.$sRepoFile; $sCacheKey = 'UPDATER/('.$sRepo.')/'.$sRepoFile;
@ -2717,8 +2690,6 @@ class Actions
$bReal = \is_array($aRep) && 0 < \count($aRep); $bReal = \is_array($aRep) && 0 < \count($aRep);
} }
$bCoreAccess = $this->rainLoopCoreAccess();
$aResult = array(); $aResult = array();
if (\is_array($aRep)) if (\is_array($aRep))
{ {
@ -2737,24 +2708,7 @@ class Actions
continue; continue;
} }
if ('core' === $oItem->type) if ('plugin' === $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)
{ {
$aResult[] = array( $aResult[] = array(
'type' => $oItem->type, 'type' => $oItem->type,
@ -2775,47 +2729,72 @@ class Actions
return $aResult; 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) private function getRepositoryData(&$bReal, &$bRainLoopUpdatable)
{ {
$bRainLoopUpdatable = $this->rainLoopUpdatable(); $bRainLoopUpdatable = $this->rainLoopUpdatable();
$bCoreAccess = $this->rainLoopCoreAccess();
$aResult = $this->getRepositoryDataByUrl($this->rainloopRepo(), $bReal); $aResult = $this->getRepositoryDataByUrl($this->rainloopRepo(), $bReal);
$sAddRepo = $this->rainloopRepo(true); $aSub = array();
if (0 < \strlen($sAddRepo)) if (\is_array($aResult))
{ {
$bFakeReal = false; foreach ($aResult as $aItem)
$aAddData = $this->getRepositoryDataByUrl($sAddRepo, $bFakeReal, false);
if ($bFakeReal && \is_array($aAddData) && 0 < \count($aAddData))
{ {
$aResult = \array_merge($aResult, $aAddData); if ('plugin' === $aItem['type'])
{
$aSub[] = $aItem;
}
} }
}
$bAddCore = false; $aResult = $aSub;
foreach ($aResult as $aItem) unset($aSub);
{
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' => ''
));
} }
$aInstalled = $this->Plugins()->InstalledPlugins(); $aInstalled = $this->Plugins()->InstalledPlugins();
@ -2861,20 +2840,6 @@ class Actions
$aItem['canBeDeleted'] = '' !== $aItem['installed'] && 'plugin' === $aItem['type']; $aItem['canBeDeleted'] = '' !== $aItem['installed'] && 'plugin' === $aItem['type'];
$aItem['canBeUpdated'] = $aItem['compare']; $aItem['canBeUpdated'] = $aItem['compare'];
$aItem['canBeInstalled'] = true; $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; return $aResult;
@ -2901,111 +2866,61 @@ class Actions
/** /**
* @return array * @return array
*/ */
public function DoAdminPackageDelete() public function DoAdminCoreData()
{ {
$this->IsAdminLoggined(); $this->IsAdminLoggined();
$sId = $this->GetActionParam('Id', '');
$bReal = false; $bReal = false;
$bRainLoopUpdatable = false; $aData = array();
$aList = $this->getRepositoryData($bReal, $bRainLoopUpdatable);
$sResultId = ''; $bRainLoopUpdatable = $this->rainLoopUpdatable();
foreach ($aList as $oItem) $bRainLoopAccess = $this->rainLoopCoreAccess();
if ($bRainLoopAccess)
{ {
if ($oItem && 'plugin' === $oItem['type'] && $sId === $oItem['id']) $aData = $this->getCoreData($bReal);
{
$sResultId = $sId;
break;
}
} }
$bResult = false; $sVersion = empty($aData['version']) ? '' : $aData['version'];
if ('' !== $sResultId)
{
$bResult = \MailSo\Base\Utils::RecRmDir(APP_PLUGINS_PATH.$sResultId);
if ($bResult)
{
$this->pluginEnable($sResultId, false);
}
}
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 * @return array
*/ */
public function DoAdminPackageInstall() public function DoAdminUpdateCoreData()
{ {
$this->IsAdminLoggined(); $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; $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) $aData = $this->getCoreData($bReal);
{
if ($oItem && $sFile === $oItem['file'] && $sId === $oItem['id'])
{
$sRealFile = $sFile;
break;
}
}
} }
$sTmp = '';
$bResult = false; $bResult = false;
if ('' !== $sRealFile) if ($bReal && !empty($aData['file']))
{ {
$sUrl = $this->rainloopRepo().$sRealFile; $sTmp = $this->downloadRemotePackageByUrl($aData['file']);
$sTmp = APP_PRIVATE_DATA.md5(microtime(true).$sRealFile).'.zip'; if (!empty($sTmp))
$pDest = @fopen($sTmp, 'w+b');
if ($pDest)
{ {
$iCode = 0; include_once APP_VERSION_ROOT_PATH.'app/libraries/pclzip/pclzip.lib.php';
$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;
$oArchive = new \PclZip($sTmp);
$sTmpFolder = APP_PRIVATE_DATA.\md5($sTmp); $sTmpFolder = APP_PRIVATE_DATA.\md5($sTmp);
\mkdir($sTmpFolder); \mkdir($sTmpFolder);
@ -3059,8 +2974,132 @@ class Actions
{ {
$this->Logger()->Write('Cannot create tmp folder: '.$sTmpFolder, \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER'); $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; $bResult = true;
if (\is_dir(APP_PLUGINS_PATH.$sId)) 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_admin_panel' => array(true, 'Access settings'),
'allow_two_factor_auth' => array(false), 'allow_two_factor_auth' => array(false),
'admin_panel_host' => array(''), 'admin_panel_host' => array(''),
'core_install_access_domains' => array('') 'core_install_access_domain' => array('')
), ),
'login' => array( 'login' => array(
@ -236,9 +236,6 @@ Enables caching in the system'),
'imap_forwarded_flag' => array('$Forwarded'), 'imap_forwarded_flag' => array('$Forwarded'),
'imap_read_receipt_flag' => array('$ReadReceipt'), 'imap_read_receipt_flag' => array('$ReadReceipt'),
'smtp_show_server_errors' => array(false), 'smtp_show_server_errors' => array(false),
'repo_type' => array('stable'),
'custom_repo' => array(''),
'additional_repo' => array(''),
'curl_proxy' => array(''), 'curl_proxy' => array(''),
'curl_proxy_auth' => array(''), 'curl_proxy_auth' => array(''),
'in_iframe' => array(false), 'in_iframe' => array(false),

View file

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

View file

@ -3,20 +3,60 @@
<div class="legend"> <div class="legend">
About About
</div> </div>
<div class="control-group"> <div class="row" style="min-width: 800px;">
<div class="raw"> <div class="span4">
<div class="span4"> <div class="rl-logo"></div>
<div class="rl-logo"></div> <div style="margin-left: 45px;">
</div> 2014 &copy; All Rights Reserved.
<div class="span4">
RainLoop Webmail
<br /> <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>
</div> <div class="span6 rl-desc">
<div class="control-group"> <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> </div>
</div> </div>

View file

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

View file

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

View file

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

View file

@ -1,20 +1,14 @@
<div class="b-admin-packages"> <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. Cannot access the repository at the moment.
</div> </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> <button type="button" class="close" data-bind="click: function () { packagesError('') }">&times;</button>
<span data-bind="text: packagesError"></span> <span data-bind="text: packagesError"></span>
</div> </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 data-bind="visible: 0 < packagesAvailableForUpdate().length">
<div class="legend"> <div class="legend">
Available for Update (<span data-bind="text: packagesAvailableForUpdate().length"></span>) Available for Update (<span data-bind="text: packagesAvailableForUpdate().length"></span>)
@ -22,7 +16,7 @@
<div data-bind="template: { name: 'AdminSettingsPackagesTable', data: {f: packagesAvailableForUpdate} }"></div> <div data-bind="template: { name: 'AdminSettingsPackagesTable', data: {f: packagesAvailableForUpdate} }"></div>
<br /> <br />
</div> </div>
<div data-bind="visible: 0 < packagesCurrent().length"> <div data-bind="visible: 0 < packagesCurrent().length">
<div class="legend"> <div class="legend">
Installed Packages Installed Packages
@ -30,7 +24,7 @@
<div data-bind="template: { name: 'AdminSettingsPackagesTable', data: {f: packagesCurrent} }"></div> <div data-bind="template: { name: 'AdminSettingsPackagesTable', data: {f: packagesCurrent} }"></div>
<br /> <br />
</div> </div>
<div data-bind="visible: 0 < packagesAvailableForInstallation().length"> <div data-bind="visible: 0 < packagesAvailableForInstallation().length">
<div class="legend"> <div class="legend">
Available for Installation Available for Installation
@ -38,5 +32,5 @@
<div data-bind="template: { name: 'AdminSettingsPackagesTable', data: {f: packagesAvailableForInstallation} }"></div> <div data-bind="template: { name: 'AdminSettingsPackagesTable', data: {f: packagesAvailableForInstallation} }"></div>
<br /> <br />
</div> </div>
</div> </div>

View file

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

View file

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

View file

@ -1,6 +1,6 @@
<div class="adminSecurity"> <div class="adminSecurity">
<div class="row"> <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 Detailed information on social integration is found at
<a href="http://rainloop.net/docs/social/" target="_blank">http://rainloop.net/docs/social/</a> <a href="http://rainloop.net/docs/social/" target="_blank">http://rainloop.net/docs/social/</a>
</div> </div>

View file

@ -20,7 +20,7 @@
define('APP_SITE', $sSite); 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_SITE_CLEAR', 0 < strlen(APP_SITE) ? trim(preg_replace('/[^a-zA-Z0-9_.\-]+/', '_', trim(strtolower(APP_SITE))), ' _') : '');
define('APP_DEFAULT_PRIVATE_DATA_NAME', '_default_'); define('APP_DEFAULT_PRIVATE_DATA_NAME', '_default_');
$sPrivateDataFolderInternalName = @file_exists(APP_INDEX_ROOT_PATH.'MULTIPLY') ? APP_SITE : ''; $sPrivateDataFolderInternalName = @file_exists(APP_INDEX_ROOT_PATH.'MULTIPLY') ? APP_SITE : '';
@ -31,10 +31,11 @@
define('APP_DEV_VERSION', '0.0.0'); define('APP_DEV_VERSION', '0.0.0');
define('APP_API_PATH', 'http://api.rainloop.net/'); define('APP_API_PATH', 'http://api.rainloop.net/');
define('APP_REP_PATH', 'http://repository.rainloop.net/v1/'); 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_PATH', 'rainloop/v/'.APP_VERSION.'/');
define('APP_WEB_STATIC_PATH', APP_WEB_PATH.'static/'); define('APP_WEB_STATIC_PATH', APP_WEB_PATH.'static/');
define('APP_DATA_FOLDER_PATH_UNIX', str_replace('\\', '/', APP_DATA_FOLDER_PATH)); define('APP_DATA_FOLDER_PATH_UNIX', str_replace('\\', '/', APP_DATA_FOLDER_PATH));
$sSalt = @file_get_contents(APP_DATA_FOLDER_PATH.'SALT.php'); $sSalt = @file_get_contents(APP_DATA_FOLDER_PATH.'SALT.php');
$sData = @file_get_contents(APP_DATA_FOLDER_PATH.'DATA.php'); $sData = @file_get_contents(APP_DATA_FOLDER_PATH.'DATA.php');
$sInstalled = @file_get_contents(APP_DATA_FOLDER_PATH.'INSTALLED'); $sInstalled = @file_get_contents(APP_DATA_FOLDER_PATH.'INSTALLED');
@ -119,7 +120,7 @@ Options -Indexes
{ {
@mkdir(APP_PRIVATE_DATA, 0755, true); @mkdir(APP_PRIVATE_DATA, 0755, true);
} }
foreach (array('logs', 'cache', 'configs', 'plugins', 'storage') as $sName) foreach (array('logs', 'cache', 'configs', 'plugins', 'storage') as $sName)
{ {
if (!@is_dir(APP_PRIVATE_DATA.$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 { .b-admin-right .b-settings-content {
padding: 20px; padding: 20px;
padding-left: 30px;
} }
.b-admin-general .flag-selector { .b-admin-general .flag-selector {
padding-top: 5px; padding-top: 5px;
@ -9182,8 +9183,14 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
display: inline-block; display: inline-block;
width: 250px; width: 250px;
height: 250px; height: 250px;
margin-top: -10px;
margin-bottom: -10px;
background-image: url("images/rainloop-logo.png"); background-image: url("images/rainloop-logo.png");
} }
.b-admin-about .rl-desc {
margin-top: 20px;
margin-left: -20px;
}
.popups .b-activate-content { .popups .b-activate-content {
width: 700px; width: 700px;
} }
@ -9270,6 +9277,7 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
} }
.b-settins-right .b-settings-content { .b-settins-right .b-settings-content {
padding: 20px; padding: 20px;
padding-left: 30px;
} }
.b-settings-general .notification-desc-denied { .b-settings-general .notification-desc-denied {
color: #999; 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 */ /*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (window, $, ko, crossroads, hasher, _) { (function (window, $, ko, crossroads, hasher, _) {
'use strict'; 'use strict';
@ -77,14 +77,14 @@ var
$document = $(window.document), $document = $(window.document),
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
; ;
/*jshint onevar: false*/ /*jshint onevar: false*/
/** /**
* @type {?AdminApp} * @type {?AdminApp}
*/ */
var RL = null; var RL = null;
/*jshint onevar: true*/ /*jshint onevar: true*/
/** /**
* @type {?} * @type {?}
*/ */
@ -238,7 +238,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
return oType && 'application/pdf' === oType.type; return oType && 'application/pdf' === oType.type;
}); });
} }
Consts.Defaults = {}; Consts.Defaults = {};
Consts.Values = {}; Consts.Values = {};
Consts.DataImages = {}; Consts.DataImages = {};
@ -356,7 +356,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
* @type {string} * @type {string}
*/ */
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII='; Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
/** /**
* @enum {string} * @enum {string}
*/ */
@ -745,7 +745,7 @@ Enums.Notification = {
'UnknownNotification': 999, 'UnknownNotification': 999,
'UnknownError': 999 'UnknownError': 999
}; };
Utils.trim = $.trim; Utils.trim = $.trim;
Utils.inArray = $.inArray; Utils.inArray = $.inArray;
Utils.isArray = _.isArray; Utils.isArray = _.isArray;
@ -2495,7 +2495,7 @@ Utils.detectDropdownVisibility = _.debounce(function () {
return oItem.hasClass('open'); return oItem.hasClass('open');
})); }));
}, 50); }, 50);
// Base64 encode / decode // Base64 encode / decode
// http://www.webtoolkit.info/ // http://www.webtoolkit.info/
@ -2658,7 +2658,7 @@ Base64 = {
} }
}; };
/*jslint bitwise: false*/ /*jslint bitwise: false*/
ko.bindingHandlers.tooltip = { ko.bindingHandlers.tooltip = {
'init': function (oElement, fValueAccessor) { 'init': function (oElement, fValueAccessor) {
if (!Globals.bMobileDevice) if (!Globals.bMobileDevice)
@ -3475,7 +3475,7 @@ ko.observable.fn.validateFunc = function (fFunc)
return this; return this;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -3787,7 +3787,7 @@ LinkBuilder.prototype.socialFacebook = function ()
{ {
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : ''); return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
}; };
/** /**
* @type {Object} * @type {Object}
*/ */
@ -3881,7 +3881,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
}; };
/** /**
* @constructor * @constructor
*/ */
@ -3955,7 +3955,7 @@ CookieDriver.prototype.get = function (sKey)
return mResult; return mResult;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -4026,7 +4026,7 @@ LocalStorageDriver.prototype.get = function (sKey)
return mResult; return mResult;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -4069,7 +4069,7 @@ LocalStorage.prototype.get = function (iKey)
{ {
return this.oDriver ? this.oDriver.get('p' + iKey) : null; return this.oDriver ? this.oDriver.get('p' + iKey) : null;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -4082,7 +4082,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
{ {
}; };
/** /**
* @param {string=} sPosition = '' * @param {string=} sPosition = ''
* @param {string=} sTemplate = '' * @param {string=} sTemplate = ''
@ -4175,7 +4175,7 @@ KnoinAbstractViewModel.prototype.registerPopupKeyDown = function ()
return true; return true;
}); });
}; };
/** /**
* @param {string} sScreenName * @param {string} sScreenName
* @param {?=} aViewModels = [] * @param {?=} aViewModels = []
@ -4251,7 +4251,7 @@ KnoinAbstractScreen.prototype.__start = function ()
this.oCross = oRoute; this.oCross = oRoute;
} }
}; };
/** /**
* @constructor * @constructor
*/ */
@ -4653,7 +4653,7 @@ Knoin.prototype.bootstart = function ()
}; };
kn = new Knoin(); kn = new Knoin();
/** /**
* @param {string=} sEmail * @param {string=} sEmail
* @param {string=} sName * @param {string=} sName
@ -5017,7 +5017,7 @@ EmailModel.prototype.inputoTagLine = function ()
{ {
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email; return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -5061,7 +5061,7 @@ ContactTagModel.prototype.toLine = function (bEncodeHtml)
return (Utils.isUnd(bEncodeHtml) ? false : !!bEncodeHtml) ? return (Utils.isUnd(bEncodeHtml) ? false : !!bEncodeHtml) ?
Utils.encodeHtml(this.name()) : this.name(); Utils.encodeHtml(this.name()) : this.name();
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5356,7 +5356,7 @@ PopupsDomainViewModel.prototype.clearForm = function ()
this.smtpAuth(true); this.smtpAuth(true);
this.whiteList(''); this.whiteList('');
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5493,7 +5493,7 @@ PopupsPluginViewModel.prototype.onBuild = function ()
} }
}, this)); }, this));
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5609,7 +5609,7 @@ PopupsActivateViewModel.prototype.validateSubscriptionKey = function ()
{ {
var sValue = this.key(); var sValue = this.key();
return '' === sValue || !!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(Utils.trim(sValue)); return '' === sValue || !!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(Utils.trim(sValue));
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5669,7 +5669,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
RL.data().mainLanguage(sLang); RL.data().mainLanguage(sLang);
this.cancelCommand(); this.cancelCommand();
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5775,7 +5775,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
}, this)); }, this));
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5862,7 +5862,7 @@ AdminLoginViewModel.prototype.onHide = function ()
{ {
this.loginFocus(false); this.loginFocus(false);
}; };
/** /**
* @param {?} oScreen * @param {?} oScreen
* *
@ -5886,7 +5886,7 @@ AdminMenuViewModel.prototype.link = function (sRoute)
{ {
return '#/' + sRoute; return '#/' + sRoute;
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5910,7 +5910,7 @@ AdminPaneViewModel.prototype.logoutClick = function ()
RL.remote().adminLogout(function () { RL.remote().adminLogout(function () {
RL.loginAndLogoutReload(); RL.loginAndLogoutReload();
}); });
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6010,7 +6010,7 @@ AdminGeneral.prototype.selectLanguage = function ()
{ {
kn.showScreenPopup(PopupsLanguagesViewModel); kn.showScreenPopup(PopupsLanguagesViewModel);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6062,7 +6062,7 @@ AdminLogin.prototype.onBuild = function ()
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6131,7 +6131,7 @@ AdminBranding.prototype.onBuild = function ()
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6351,7 +6351,7 @@ AdminContacts.prototype.onBuild = function ()
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6440,7 +6440,7 @@ AdminDomains.prototype.onDomainListChangeRequest = function ()
{ {
RL.reloadDomainList(); RL.reloadDomainList();
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6552,7 +6552,7 @@ AdminSecurity.prototype.phpInfoLink = function ()
{ {
return RL.link().phpInfo(); return RL.link().phpInfo();
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6668,7 +6668,7 @@ AdminSocial.prototype.onBuild = function ()
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6765,7 +6765,7 @@ AdminPlugins.prototype.onPluginDisableRequest = function (sResult, oData)
RL.reloadPluginList(); RL.reloadPluginList();
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6863,7 +6863,7 @@ AdminPackages.prototype.installPackage = function (oPackage)
RL.remote().packageInstall(this.requestHelper(oPackage, true), oPackage); RL.remote().packageInstall(this.requestHelper(oPackage, true), oPackage);
} }
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6914,22 +6914,82 @@ AdminLicensing.prototype.licenseExpiredMomentValue = function ()
{ {
var oDate = moment.unix(this.licenseExpired()); var oDate = moment.unix(this.licenseExpired());
return oDate.format('LL') + ' (' + oDate.from(moment()) + ')'; return oDate.format('LL') + ' (' + oDate.from(moment()) + ')';
}; };
/** /**
* @constructor * @constructor
*/ */
function AdminAbout() function AdminAbout()
{ {
var oData = RL.data();
this.version = ko.observable(RL.settingsGet('Version')); 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'); 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 * @constructor
*/ */
@ -7060,7 +7120,7 @@ AbstractData.prototype.populateDataOnStart = function()
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed')); this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
}; };
/** /**
* @constructor * @constructor
* @extends AbstractData * @extends AbstractData
@ -7068,24 +7128,33 @@ AbstractData.prototype.populateDataOnStart = function()
function AdminDataStorage() function AdminDataStorage()
{ {
AbstractData.call(this); AbstractData.call(this);
this.domainsLoading = ko.observable(false).extend({'throttle': 100}); this.domainsLoading = ko.observable(false).extend({'throttle': 100});
this.domains = ko.observableArray([]); this.domains = ko.observableArray([]);
this.pluginsLoading = ko.observable(false).extend({'throttle': 100}); this.pluginsLoading = ko.observable(false).extend({'throttle': 100});
this.plugins = ko.observableArray([]); this.plugins = ko.observableArray([]);
this.packagesReal = ko.observable(true); this.packagesReal = ko.observable(true);
this.packagesMainUpdatable = ko.observable(true); this.packagesMainUpdatable = ko.observable(true);
this.packagesLoading = ko.observable(false).extend({'throttle': 100}); this.packagesLoading = ko.observable(false).extend({'throttle': 100});
this.packages = ko.observableArray([]); 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.licensing = ko.observable(false);
this.licensingProcess = ko.observable(false); this.licensingProcess = ko.observable(false);
this.licenseValid = ko.observable(false); this.licenseValid = ko.observable(false);
this.licenseExpired = ko.observable(0); this.licenseExpired = ko.observable(0);
this.licenseError = ko.observable(''); this.licenseError = ko.observable('');
this.licenseTrigger = ko.observable(false); this.licenseTrigger = ko.observable(false);
this.adminManLoading = ko.computed(function () { this.adminManLoading = ko.computed(function () {
@ -7102,7 +7171,7 @@ _.extend(AdminDataStorage.prototype, AbstractData.prototype);
AdminDataStorage.prototype.populateDataOnStart = function() AdminDataStorage.prototype.populateDataOnStart = function()
{ {
AbstractData.prototype.populateDataOnStart.call(this); AbstractData.prototype.populateDataOnStart.call(this);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -7376,7 +7445,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
'Version': sVersion 'Version': sVersion
}); });
}; };
/** /**
* @constructor * @constructor
* @extends AbstractAjaxRemoteStorage * @extends AbstractAjaxRemoteStorage
@ -7384,7 +7453,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
function AdminAjaxRemoteStorage() function AdminAjaxRemoteStorage()
{ {
AbstractAjaxRemoteStorage.call(this); AbstractAjaxRemoteStorage.call(this);
this.oRequests = {}; this.oRequests = {};
} }
@ -7444,6 +7513,22 @@ AdminAjaxRemoteStorage.prototype.packagesList = function (fCallback)
this.defaultRequest(fCallback, 'AdminPackagesList'); 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 {?Function} fCallback
* @param {Object} oPackage * @param {Object} oPackage
@ -7621,7 +7706,7 @@ AdminAjaxRemoteStorage.prototype.adminPing = function (fCallback)
{ {
this.defaultRequest(fCallback, 'AdminPing'); this.defaultRequest(fCallback, 'AdminPing');
}; };
/** /**
* @constructor * @constructor
*/ */
@ -7704,7 +7789,7 @@ AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
{ {
this.oEmailsPicsHashes = oData; this.oEmailsPicsHashes = oData;
}; };
/** /**
* @constructor * @constructor
* @extends AbstractCacheStorage * @extends AbstractCacheStorage
@ -7715,7 +7800,7 @@ function AdminCacheStorage()
} }
_.extend(AdminCacheStorage.prototype, AbstractCacheStorage.prototype); _.extend(AdminCacheStorage.prototype, AbstractCacheStorage.prototype);
/** /**
* @param {Array} aViewModels * @param {Array} aViewModels
* @constructor * @constructor
@ -7893,7 +7978,7 @@ AbstractSettings.prototype.routes = function ()
['', oRules] ['', oRules]
]; ];
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractScreen * @extends KnoinAbstractScreen
@ -7908,7 +7993,7 @@ _.extend(AdminLoginScreen.prototype, KnoinAbstractScreen.prototype);
AdminLoginScreen.prototype.onShow = function () AdminLoginScreen.prototype.onShow = function ()
{ {
RL.setTitle(''); RL.setTitle('');
}; };
/** /**
* @constructor * @constructor
* @extends AbstractSettings * @extends AbstractSettings
@ -7925,10 +8010,8 @@ _.extend(AdminSettingsScreen.prototype, AbstractSettings.prototype);
AdminSettingsScreen.prototype.onShow = function () AdminSettingsScreen.prototype.onShow = function ()
{ {
// AbstractSettings.prototype.onShow.call(this);
RL.setTitle(''); RL.setTitle('');
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractBoot * @extends KnoinAbstractBoot
@ -8286,7 +8369,7 @@ AbstractApp.prototype.bootstart = function ()
ssm.ready(); ssm.ready();
}; };
/** /**
* @constructor * @constructor
* @extends AbstractApp * @extends AbstractApp
@ -8389,28 +8472,28 @@ AdminApp.prototype.reloadPackagesList = function ()
{ {
RL.data().packagesLoading(true); RL.data().packagesLoading(true);
RL.data().packagesReal(true); RL.data().packagesReal(true);
RL.remote().packagesList(function (sResult, oData) { RL.remote().packagesList(function (sResult, oData) {
RL.data().packagesLoading(false); RL.data().packagesLoading(false);
if (Enums.StorageResultType.Success === sResult && oData && oData.Result) if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{ {
RL.data().packagesReal(!!oData.Result.Real); RL.data().packagesReal(!!oData.Result.Real);
RL.data().packagesMainUpdatable(!!oData.Result.MainUpdatable); RL.data().packagesMainUpdatable(!!oData.Result.MainUpdatable);
var var
aList = [], aList = [],
aLoading = {} aLoading = {}
; ;
_.each(RL.data().packages(), function (oItem) { _.each(RL.data().packages(), function (oItem) {
if (oItem && oItem['loading']()) if (oItem && oItem['loading']())
{ {
aLoading[oItem['file']] = oItem; aLoading[oItem['file']] = oItem;
} }
}); });
if (Utils.isArray(oData.Result.List)) if (Utils.isArray(oData.Result.List))
{ {
aList = _.compact(_.map(oData.Result.List, function (oItem) { 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 * @param {boolean=} bForce = false
@ -8450,7 +8588,7 @@ AdminApp.prototype.reloadLicensing = function (bForce)
RL.data().licenseValid(true); RL.data().licenseValid(true);
RL.data().licenseExpired(Utils.pInt(oData.Result['Expired'])); RL.data().licenseExpired(Utils.pInt(oData.Result['Expired']));
RL.data().licenseError(''); RL.data().licenseError('');
RL.data().licensing(true); RL.data().licensing(true);
} }
else else
@ -8499,8 +8637,8 @@ AdminApp.prototype.bootstart = function ()
} }
else else
{ {
Utils.removeSettingsViewModel(AdminAbout); // Utils.removeSettingsViewModel(AdminAbout);
if (!RL.capa(Enums.Capa.Prem)) if (!RL.capa(Enums.Capa.Prem))
{ {
Utils.removeSettingsViewModel(AdminBranding); Utils.removeSettingsViewModel(AdminBranding);
@ -8532,7 +8670,7 @@ AdminApp.prototype.bootstart = function ()
* @type {AdminApp} * @type {AdminApp}
*/ */
RL = new AdminApp(); RL = new AdminApp();
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile'); $html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
$window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS); $window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
@ -8583,9 +8721,9 @@ window['__RLBOOT'] = function (fCall) {
window['__RLBOOT'] = null; window['__RLBOOT'] = null;
}); });
}; };
if (window.SimplePace) { if (window.SimplePace) {
window.SimplePace.add(10); window.SimplePace.add(10);
} }
}(window, jQuery, ko, crossroads, hasher, _)); }(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 */ /*! RainLoop Webmail Main Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (window, $, ko, crossroads, hasher, moment, Jua, _, ifvisible, key) { (function (window, $, ko, crossroads, hasher, moment, Jua, _, ifvisible, key) {
'use strict'; 'use strict';
@ -77,7 +77,7 @@ var
$document = $(window.document), $document = $(window.document),
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
; ;
/*jshint onevar: false*/ /*jshint onevar: false*/
/** /**
* @type {?RainLoopApp} * @type {?RainLoopApp}
@ -88,7 +88,7 @@ var
$proxyDiv = $('<div></div>') $proxyDiv = $('<div></div>')
; ;
/*jshint onevar: true*/ /*jshint onevar: true*/
/** /**
* @type {?} * @type {?}
*/ */
@ -242,7 +242,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
return oType && 'application/pdf' === oType.type; return oType && 'application/pdf' === oType.type;
}); });
} }
Consts.Defaults = {}; Consts.Defaults = {};
Consts.Values = {}; Consts.Values = {};
Consts.DataImages = {}; Consts.DataImages = {};
@ -360,7 +360,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
* @type {string} * @type {string}
*/ */
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII='; Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
/** /**
* @enum {string} * @enum {string}
*/ */
@ -749,7 +749,7 @@ Enums.Notification = {
'UnknownNotification': 999, 'UnknownNotification': 999,
'UnknownError': 999 'UnknownError': 999
}; };
Utils.trim = $.trim; Utils.trim = $.trim;
Utils.inArray = $.inArray; Utils.inArray = $.inArray;
Utils.isArray = _.isArray; Utils.isArray = _.isArray;
@ -2499,7 +2499,7 @@ Utils.detectDropdownVisibility = _.debounce(function () {
return oItem.hasClass('open'); return oItem.hasClass('open');
})); }));
}, 50); }, 50);
// Base64 encode / decode // Base64 encode / decode
// http://www.webtoolkit.info/ // http://www.webtoolkit.info/
@ -2662,7 +2662,7 @@ Base64 = {
} }
}; };
/*jslint bitwise: false*/ /*jslint bitwise: false*/
ko.bindingHandlers.tooltip = { ko.bindingHandlers.tooltip = {
'init': function (oElement, fValueAccessor) { 'init': function (oElement, fValueAccessor) {
if (!Globals.bMobileDevice) if (!Globals.bMobileDevice)
@ -3479,7 +3479,7 @@ ko.observable.fn.validateFunc = function (fFunc)
return this; return this;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -3791,7 +3791,7 @@ LinkBuilder.prototype.socialFacebook = function ()
{ {
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : ''); return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
}; };
/** /**
* @type {Object} * @type {Object}
*/ */
@ -3885,7 +3885,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
}; };
function NewHtmlEditorWrapper(oElement, fOnBlur, fOnReady, fOnModeChange) function NewHtmlEditorWrapper(oElement, fOnBlur, fOnReady, fOnModeChange)
{ {
var self = this; var self = this;
@ -4105,7 +4105,7 @@ NewHtmlEditorWrapper.prototype.clear = function (bFocus)
this.setHtml('', bFocus); this.setHtml('', bFocus);
}; };
/** /**
* @constructor * @constructor
* @param {koProperty} oKoList * @param {koProperty} oKoList
@ -4814,7 +4814,7 @@ Selector.prototype.on = function (sEventName, fCallback)
{ {
this.oCallbacks[sEventName] = fCallback; this.oCallbacks[sEventName] = fCallback;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -4888,7 +4888,7 @@ CookieDriver.prototype.get = function (sKey)
return mResult; return mResult;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -4959,7 +4959,7 @@ LocalStorageDriver.prototype.get = function (sKey)
return mResult; return mResult;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -5002,7 +5002,7 @@ LocalStorage.prototype.get = function (iKey)
{ {
return this.oDriver ? this.oDriver.get('p' + iKey) : null; return this.oDriver ? this.oDriver.get('p' + iKey) : null;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -5015,7 +5015,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
{ {
}; };
/** /**
* @param {string=} sPosition = '' * @param {string=} sPosition = ''
* @param {string=} sTemplate = '' * @param {string=} sTemplate = ''
@ -5108,7 +5108,7 @@ KnoinAbstractViewModel.prototype.registerPopupKeyDown = function ()
return true; return true;
}); });
}; };
/** /**
* @param {string} sScreenName * @param {string} sScreenName
* @param {?=} aViewModels = [] * @param {?=} aViewModels = []
@ -5184,7 +5184,7 @@ KnoinAbstractScreen.prototype.__start = function ()
this.oCross = oRoute; this.oCross = oRoute;
} }
}; };
/** /**
* @constructor * @constructor
*/ */
@ -5586,7 +5586,7 @@ Knoin.prototype.bootstart = function ()
}; };
kn = new Knoin(); kn = new Knoin();
/** /**
* @param {string=} sEmail * @param {string=} sEmail
* @param {string=} sName * @param {string=} sName
@ -5950,7 +5950,7 @@ EmailModel.prototype.inputoTagLine = function ()
{ {
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email; return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6074,7 +6074,7 @@ ContactModel.prototype.lineAsCcc = function ()
return aResult.join(' '); return aResult.join(' ');
}; };
/** /**
* @param {number=} iType = Enums.ContactPropertyType.Unknown * @param {number=} iType = Enums.ContactPropertyType.Unknown
* @param {string=} sTypeStr = '' * @param {string=} sTypeStr = ''
@ -6103,7 +6103,7 @@ function ContactPropertyModel(iType, sTypeStr, sValue, bFocused, sPlaceholder)
}, this); }, this);
} }
/** /**
* @constructor * @constructor
*/ */
@ -6147,7 +6147,7 @@ ContactTagModel.prototype.toLine = function (bEncodeHtml)
return (Utils.isUnd(bEncodeHtml) ? false : !!bEncodeHtml) ? return (Utils.isUnd(bEncodeHtml) ? false : !!bEncodeHtml) ?
Utils.encodeHtml(this.name()) : this.name(); Utils.encodeHtml(this.name()) : this.name();
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6383,7 +6383,7 @@ AttachmentModel.prototype.iconClass = function ()
return sClass; return sClass;
}; };
/** /**
* @constructor * @constructor
* @param {string} sId * @param {string} sId
@ -6444,7 +6444,7 @@ ComposeAttachmentModel.prototype.initByUploadJson = function (oJsonAttachment)
} }
return bResult; return bResult;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -7638,7 +7638,7 @@ MessageModel.prototype.flagHash = function ()
return [this.deleted(), this.unseen(), this.flagged(), this.answered(), this.forwarded(), return [this.deleted(), this.unseen(), this.flagged(), this.answered(), this.forwarded(),
this.isReadReceipt()].join(''); this.isReadReceipt()].join('');
}; };
/** /**
* @constructor * @constructor
*/ */
@ -7970,7 +7970,7 @@ FolderModel.prototype.printableFullName = function ()
{ {
return this.fullName.split(this.delimiter).join(' / '); return this.fullName.split(this.delimiter).join(' / ');
}; };
/** /**
* @param {string} sEmail * @param {string} sEmail
* @param {boolean=} bCanBeDelete = true * @param {boolean=} bCanBeDelete = true
@ -7991,7 +7991,7 @@ AccountModel.prototype.email = '';
AccountModel.prototype.changeAccountLink = function () AccountModel.prototype.changeAccountLink = function ()
{ {
return RL.link().change(this.email); return RL.link().change(this.email);
}; };
/** /**
* @param {string} sId * @param {string} sId
* @param {string} sEmail * @param {string} sEmail
@ -8027,7 +8027,7 @@ IdentityModel.prototype.formattedNameForEmail = function ()
var sName = this.name(); var sName = this.name();
return '' === sName ? this.email() : '"' + Utils.quoteName(sName) + '" <' + this.email() + '>'; return '' === sName ? this.email() : '"' + Utils.quoteName(sName) + '" <' + this.email() + '>';
}; };
/** /**
* @param {string} iIndex * @param {string} iIndex
* @param {string} sGuID * @param {string} sGuID
@ -8058,7 +8058,7 @@ OpenPgpKeyModel.prototype.user = '';
OpenPgpKeyModel.prototype.email = ''; OpenPgpKeyModel.prototype.email = '';
OpenPgpKeyModel.prototype.armor = ''; OpenPgpKeyModel.prototype.armor = '';
OpenPgpKeyModel.prototype.isPrivate = false; OpenPgpKeyModel.prototype.isPrivate = false;
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -8154,7 +8154,7 @@ PopupsFolderClearViewModel.prototype.onShow = function (oFolder)
this.selectedFolder(oFolder); this.selectedFolder(oFolder);
} }
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -8264,7 +8264,7 @@ PopupsFolderCreateViewModel.prototype.onFocus = function ()
{ {
this.folderName.focused(true); this.folderName.focused(true);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -8377,7 +8377,7 @@ PopupsFolderSystemViewModel.prototype.onShow = function (iNotificationType)
this.notification(sNotification); this.notification(sNotification);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -9865,7 +9865,7 @@ PopupsComposeViewModel.prototype.triggerForResize = function ()
this.editorResizeThrottle(); this.editorResizeThrottle();
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -10607,7 +10607,7 @@ PopupsContactsViewModel.prototype.onHide = function ()
// oItem.checked(false); // oItem.checked(false);
// }); // });
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -10743,7 +10743,7 @@ PopupsAdvancedSearchViewModel.prototype.onFocus = function ()
{ {
this.fromFocus(true); this.fromFocus(true);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -10855,7 +10855,7 @@ PopupsAddAccountViewModel.prototype.onFocus = function ()
{ {
this.emailFocus(true); this.emailFocus(true);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -10941,7 +10941,7 @@ PopupsAddOpenPgpKeyViewModel.prototype.onFocus = function ()
{ {
this.key.focus(true); this.key.focus(true);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -10981,7 +10981,7 @@ PopupsViewOpenPgpKeyViewModel.prototype.onShow = function (oOpenPgpKey)
this.key(oOpenPgpKey.armor); this.key(oOpenPgpKey.armor);
} }
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11076,7 +11076,7 @@ PopupsGenerateNewOpenPgpKeyViewModel.prototype.onFocus = function ()
{ {
this.email.focus(true); this.email.focus(true);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11316,7 +11316,7 @@ PopupsComposeOpenPgpViewModel.prototype.onShow = function (fCallback, sText, sFr
this.to(aRec); this.to(aRec);
this.text(sText); this.text(sText);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11464,7 +11464,7 @@ PopupsIdentityViewModel.prototype.onFocus = function ()
this.email.focused(true); this.email.focused(true);
} }
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11524,7 +11524,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
RL.data().mainLanguage(sLang); RL.data().mainLanguage(sLang);
this.cancelCommand(); this.cancelCommand();
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11578,7 +11578,7 @@ PopupsTwoFactorTestViewModel.prototype.onFocus = function ()
{ {
this.code.focused(true); this.code.focused(true);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11684,7 +11684,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
}, this)); }, this));
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11729,7 +11729,7 @@ PopupsKeyboardShortcutsHelpViewModel.prototype.onBuild = function (oDom)
} }
}, this)); }, this));
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -12041,7 +12041,7 @@ LoginViewModel.prototype.selectLanguage = function ()
kn.showScreenPopup(PopupsLanguagesViewModel); kn.showScreenPopup(PopupsLanguagesViewModel);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -12137,7 +12137,7 @@ AbstractSystemDropDownViewModel.prototype.onBuild = function ()
} }
}); });
}; };
/** /**
* @constructor * @constructor
* @extends AbstractSystemDropDownViewModel * @extends AbstractSystemDropDownViewModel
@ -12149,7 +12149,7 @@ function MailBoxSystemDropDownViewModel()
} }
Utils.extendAsViewModel('MailBoxSystemDropDownViewModel', MailBoxSystemDropDownViewModel, AbstractSystemDropDownViewModel); Utils.extendAsViewModel('MailBoxSystemDropDownViewModel', MailBoxSystemDropDownViewModel, AbstractSystemDropDownViewModel);
/** /**
* @constructor * @constructor
* @extends AbstractSystemDropDownViewModel * @extends AbstractSystemDropDownViewModel
@ -12161,7 +12161,7 @@ function SettingsSystemDropDownViewModel()
} }
Utils.extendAsViewModel('SettingsSystemDropDownViewModel', SettingsSystemDropDownViewModel, AbstractSystemDropDownViewModel); Utils.extendAsViewModel('SettingsSystemDropDownViewModel', SettingsSystemDropDownViewModel, AbstractSystemDropDownViewModel);
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -12370,7 +12370,7 @@ MailBoxFolderListViewModel.prototype.contactsClick = function ()
kn.showScreenPopup(PopupsContactsViewModel); kn.showScreenPopup(PopupsContactsViewModel);
} }
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -13273,7 +13273,7 @@ MailBoxMessageListViewModel.prototype.initUploaderForAppend = function ()
; ;
return !!oJua; return !!oJua;
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -13965,7 +13965,7 @@ MailBoxMessageViewViewModel.prototype.readReceipt = function (oMessage)
RL.reloadFlagsCurrentMessageListAndMessageFromCache(); RL.reloadFlagsCurrentMessageListAndMessageFromCache();
} }
}; };
/** /**
* @param {?} oScreen * @param {?} oScreen
* *
@ -13994,7 +13994,7 @@ SettingsMenuViewModel.prototype.backToMailBoxClick = function ()
{ {
kn.setHash(RL.link().inbox()); kn.setHash(RL.link().inbox());
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -14025,7 +14025,7 @@ SettingsPaneViewModel.prototype.backToMailBoxClick = function ()
{ {
kn.setHash(RL.link().inbox()); kn.setHash(RL.link().inbox());
}; };
/** /**
* @constructor * @constructor
*/ */
@ -14185,7 +14185,7 @@ SettingsGeneral.prototype.selectLanguage = function ()
{ {
kn.showScreenPopup(PopupsLanguagesViewModel); kn.showScreenPopup(PopupsLanguagesViewModel);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -14235,7 +14235,7 @@ SettingsContacts.prototype.onBuild = function ()
//{ //{
// //
//}; //};
/** /**
* @constructor * @constructor
*/ */
@ -14316,7 +14316,7 @@ SettingsAccounts.prototype.deleteAccount = function (oAccountToRemove)
} }
} }
}; };
/** /**
* @constructor * @constructor
*/ */
@ -14404,7 +14404,7 @@ SettingsIdentity.prototype.onBuild = function ()
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -14562,7 +14562,7 @@ SettingsIdentities.prototype.onBuild = function (oDom)
}); });
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -14712,7 +14712,7 @@ SettingsSecurity.prototype.onBuild = function ()
this.processing(true); this.processing(true);
RL.remote().getTwoFactor(this.onResult); RL.remote().getTwoFactor(this.onResult);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -14779,7 +14779,7 @@ function SettingsSocialScreen()
} }
Utils.addSettingsViewModel(SettingsSocialScreen, 'SettingsSocial', 'SETTINGS_LABELS/LABEL_SOCIAL_NAME', 'social'); Utils.addSettingsViewModel(SettingsSocialScreen, 'SettingsSocial', 'SETTINGS_LABELS/LABEL_SOCIAL_NAME', 'social');
/** /**
* @constructor * @constructor
*/ */
@ -14884,7 +14884,7 @@ SettingsChangePasswordScreen.prototype.onChangePasswordResponse = function (sRes
Utils.getNotification(Enums.Notification.CouldNotSaveNewPassword)); Utils.getNotification(Enums.Notification.CouldNotSaveNewPassword));
} }
}; };
/** /**
* @constructor * @constructor
*/ */
@ -15079,7 +15079,7 @@ SettingsFolders.prototype.unSubscribeFolder = function (oFolder)
oFolder.subScribed(false); oFolder.subScribed(false);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -15193,7 +15193,7 @@ SettingsThemes.prototype.onBuild = function ()
}; };
})); }));
}; };
/** /**
* @constructor * @constructor
*/ */
@ -15261,7 +15261,7 @@ SettingsOpenPGP.prototype.deleteOpenPgpKey = function (oOpenPgpKeyToRemove)
RL.reloadOpenPgpKeys(); RL.reloadOpenPgpKeys();
} }
} }
}; };
/** /**
* @constructor * @constructor
*/ */
@ -15392,7 +15392,7 @@ AbstractData.prototype.populateDataOnStart = function()
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed')); this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
}; };
/** /**
* @constructor * @constructor
* @extends AbstractData * @extends AbstractData
@ -16645,7 +16645,7 @@ WebMailDataStorage.prototype.findSelfPrivateKey = function (sPassword)
{ {
return this.findPrivateKeyByEmail(this.accountEmail(), sPassword); return this.findPrivateKeyByEmail(this.accountEmail(), sPassword);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -16919,7 +16919,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
'Version': sVersion 'Version': sVersion
}); });
}; };
/** /**
* @constructor * @constructor
* @extends AbstractAjaxRemoteStorage * @extends AbstractAjaxRemoteStorage
@ -17712,7 +17712,7 @@ WebMailAjaxRemoteStorage.prototype.socialUsers = function (fCallback)
this.defaultRequest(fCallback, 'SocialUsers'); this.defaultRequest(fCallback, 'SocialUsers');
}; };
/** /**
* @constructor * @constructor
*/ */
@ -17795,7 +17795,7 @@ AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
{ {
this.oEmailsPicsHashes = oData; this.oEmailsPicsHashes = oData;
}; };
/** /**
* @constructor * @constructor
* @extends AbstractCacheStorage * @extends AbstractCacheStorage
@ -18113,7 +18113,7 @@ WebMailCacheStorage.prototype.storeMessageFlagsToCacheByFolderAndUid = function
this.setMessageFlagsToCache(sFolder, sUid, aFlags); this.setMessageFlagsToCache(sFolder, sUid, aFlags);
} }
}; };
/** /**
* @param {Array} aViewModels * @param {Array} aViewModels
* @constructor * @constructor
@ -18291,7 +18291,7 @@ AbstractSettings.prototype.routes = function ()
['', oRules] ['', oRules]
]; ];
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractScreen * @extends KnoinAbstractScreen
@ -18306,7 +18306,7 @@ _.extend(LoginScreen.prototype, KnoinAbstractScreen.prototype);
LoginScreen.prototype.onShow = function () LoginScreen.prototype.onShow = function ()
{ {
RL.setTitle(''); RL.setTitle('');
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractScreen * @extends KnoinAbstractScreen
@ -18477,7 +18477,7 @@ MailBoxScreen.prototype.routes = function ()
[/^([^\/]*)$/, {'normalize_': fNormS}] [/^([^\/]*)$/, {'normalize_': fNormS}]
]; ];
}; };
/** /**
* @constructor * @constructor
* @extends AbstractSettings * @extends AbstractSettings
@ -18501,12 +18501,10 @@ _.extend(SettingsScreen.prototype, AbstractSettings.prototype);
SettingsScreen.prototype.onShow = function () SettingsScreen.prototype.onShow = function ()
{ {
// AbstractSettings.prototype.onShow.call(this);
RL.setTitle(this.sSettingsTitle); RL.setTitle(this.sSettingsTitle);
RL.data().keyScope(Enums.KeyState.Settings); RL.data().keyScope(Enums.KeyState.Settings);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractBoot * @extends KnoinAbstractBoot
@ -18864,7 +18862,7 @@ AbstractApp.prototype.bootstart = function ()
ssm.ready(); ssm.ready();
}; };
/** /**
* @constructor * @constructor
* @extends AbstractApp * @extends AbstractApp
@ -20166,7 +20164,7 @@ RainLoopApp.prototype.bootstart = function ()
* @type {RainLoopApp} * @type {RainLoopApp}
*/ */
RL = new RainLoopApp(); RL = new RainLoopApp();
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile'); $html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
$window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS); $window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
@ -20217,9 +20215,9 @@ window['__RLBOOT'] = function (fCall) {
window['__RLBOOT'] = null; window['__RLBOOT'] = null;
}); });
}; };
if (window.SimplePace) { if (window.SimplePace) {
window.SimplePace.add(10); window.SimplePace.add(10);
} }
}(window, jQuery, ko, crossroads, hasher, moment, Jua, _, ifvisible, key)); }(window, jQuery, ko, crossroads, hasher, moment, Jua, _, ifvisible, key));