Small fixes

This commit is contained in:
RainLoop Team 2015-02-20 02:13:27 +04:00
parent cc6626c374
commit 276e8c48e8
10 changed files with 67 additions and 39 deletions

View file

@ -1589,6 +1589,11 @@ class Actions
$aResult['UseThreads'] = (bool) $oSettingsLocal->GetConf('UseThreads', $aResult['UseThreads']);
$aResult['ReplySameFolder'] = (bool) $oSettingsLocal->GetConf('ReplySameFolder', $aResult['ReplySameFolder']);
if (!$this->GetCapa(false, \RainLoop\Enumerations\Capa::AUTOLOGOUT, $oAccount))
{
$aResult['AutoLogout'] = 0;
}
if ($this->GetCapa(false, \RainLoop\Enumerations\Capa::USER_BACKGROUND, $oAccount))
{
$aResult['UserBackgroundName'] = (string) $oSettings->GetConf('UserBackgroundName', $aResult['UserBackgroundName']);
@ -1644,7 +1649,7 @@ class Actions
}
$sPluginsLink = '';
if (0 < $this->Plugins()->Count())
if (0 < $this->Plugins()->Count() && $this->Plugins()->HaveJs($bAdmin))
{
$sPluginsLink = './?/Plugins/0/'.($bAdmin ? 'Admin' : 'User').'/'.$sStaticCache.'/';
}
@ -7672,6 +7677,11 @@ class Actions
$aResult[] = \RainLoop\Enumerations\Capa::OPEN_PGP;
}
if (!\RainLoop\Utils::IsOwnCloud())
{
$aResult[] = \RainLoop\Enumerations\Capa::AUTOLOGOUT;
}
return $aResult;
}

View file

@ -16,4 +16,5 @@ class Capa
const ATTACHMENT_THUMBNAILS = 'ATTACHMENT_THUMBNAILS';
const ADDITIONAL_ACCOUNTS = 'ADDITIONAL_ACCOUNTS';
const TEMPLATES = 'TEMPLATES';
const AUTOLOGOUT = 'AUTOLOGOUT';
}

View file

@ -222,6 +222,23 @@ class Manager
return $sResult;
}
/**
* @param bool $bAdminScope = false
*
* @return bool
*/
public function HaveJs($bAdminScope = false)
{
$bResult = false;
if ($this->bIsEnabled)
{
$bResult = $bAdminScope ? 0 < \count($this->aAdminJs) : 0 < \count($this->aJs);
}
return $bResult;
}
/**
* @param bool $bAdminScope = false
*

View file

@ -66,26 +66,18 @@
</div>
<div class="controls">
<div class="pull-right social-buttons">
<span data-bind="visible: facebookLoginEnabled">
<a href="#" tabindex="-1" class="social-button" data-bind="command: facebookCommand, tooltip: 'LOGIN/TITLE_SIGN_IN_FACEBOOK'">
<i class="icon-facebook-alt"></i>
</a>
</span>
<span data-bind="visible: googleLoginEnabled">
<a href="#" tabindex="-1" class="social-button" data-bind="command: googleCommand, tooltip: 'LOGIN/TITLE_SIGN_IN_GOOGLE'">
<i class="icon-google"></i>
</a>
</span>
<span data-bind="visible: twitterLoginEnabled">
<a href="#" tabindex="-1" class="social-button" data-bind="command: twitterCommand, tooltip: 'LOGIN/TITLE_SIGN_IN_TWITTER'">
<i class="icon-twitter"></i>
</a>
</span>
<span data-bind="visible: allowLanguagesOnLogin() && !socialLoginEnabled()">
<a href="#" tabindex="-1" class="language-button" data-bind="click: selectLanguage, tooltip: 'POPUPS_LANGUAGES/TITLE_LANGUAGES'">
<i data-bind="css: langRequest() ? 'icon-spinner animated' : 'icon-world'"></i>
</a>
</span>
<a href="#" tabindex="-1" class="social-button" data-bind="visible: facebookLoginEnabled, command: facebookCommand, tooltip: 'LOGIN/TITLE_SIGN_IN_FACEBOOK'">
<i class="icon-facebook-alt"></i>
</a>
<a href="#" tabindex="-1" class="social-button" data-bind="visible: googleLoginEnabled, command: googleCommand, tooltip: 'LOGIN/TITLE_SIGN_IN_GOOGLE'">
<i class="icon-google"></i>
</a>
<a href="#" tabindex="-1" class="social-button" data-bind="visible: twitterLoginEnabled, command: twitterCommand, tooltip: 'LOGIN/TITLE_SIGN_IN_TWITTER'">
<i class="icon-twitter"></i>
</a>
<a href="#" tabindex="-1" class="language-button" data-bind="visible: allowLanguagesOnLogin() && !socialLoginEnabled(), click: selectLanguage, tooltip: 'POPUPS_LANGUAGES/TITLE_LANGUAGES'">
<i data-bind="css: langRequest() ? 'icon-spinner animated' : 'icon-world'"></i>
</a>
</div>
<label class="signMeLabel inline" data-bind="click: function () { signMe(!signMe()); }, visible: signMeVisibility">
<i data-bind="css: signMe() ? 'checkboxSignMe icon-checkbox-checked' : 'checkboxSignMe icon-checkbox-unchecked'"></i>

View file

@ -1,5 +1,5 @@
<div class="b-settings-security">
<div class="form-horizontal">
<div class="form-horizontal" data-bind="visible: capaAutoLogout">
<div class="legend">
<span class="i18n" data-i18n-text="SETTINGS_SECURITY/LEGEND_SECURITY"></span>
</div>
@ -21,8 +21,8 @@
}"></div>
</div>
</div>
<br />
</div>
<br />
<div class="form-horizontal" data-bind="visible: capaTwoFactor">
<div class="legend">
<span class="i18n" data-i18n-text="SETTINGS_SECURITY/LEGEND_TWO_FACTOR_AUTH"></span>