mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-05 15:37:03 +03:00
Many small fixes.
This commit is contained in:
parent
9188228f5d
commit
ab374bbb71
13 changed files with 339 additions and 396 deletions
|
|
@ -340,11 +340,6 @@ class AbstractApp extends AbstractBoot
|
||||||
leftPanelDisabled(false);
|
leftPanelDisabled(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (Settings.appSettingsGet('loginGlassStyle'))
|
|
||||||
{
|
|
||||||
$html.addClass('glass');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!mobile)
|
if (!mobile)
|
||||||
{
|
{
|
||||||
ssm.addState({
|
ssm.addState({
|
||||||
|
|
|
||||||
|
|
@ -92,12 +92,11 @@ class HtmlEditor
|
||||||
* @param {bool} insertBefore
|
* @param {bool} insertBefore
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
setSignature(signature, html, insertBefore = false, first = false) {
|
setSignature(signature, html, insertBefore = false) {
|
||||||
if (this.editor)
|
if (this.editor)
|
||||||
{
|
{
|
||||||
this.editor.execCommand('insertSignature', {
|
this.editor.execCommand('insertSignature', {
|
||||||
isHtml: html,
|
isHtml: html,
|
||||||
isFirst: first,
|
|
||||||
insertBefore: insertBefore,
|
insertBefore: insertBefore,
|
||||||
signature: signature
|
signature: signature
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -826,7 +826,7 @@ export function htmlToPlain(html)
|
||||||
.replace(/</gi, '<')
|
.replace(/</gi, '<')
|
||||||
.replace(/&/gi, '&');
|
.replace(/&/gi, '&');
|
||||||
|
|
||||||
text = splitPlainText(trim(text));
|
text = splitPlainText(text);
|
||||||
|
|
||||||
pos = 0;
|
pos = 0;
|
||||||
limit = 800;
|
limit = 800;
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,6 @@
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
|
||||||
&.animated {
|
|
||||||
right: -25px;
|
|
||||||
bottom: -25px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#rl-content {
|
#rl-content {
|
||||||
|
|
|
||||||
|
|
@ -866,7 +866,7 @@ class ComposePopupView extends AbstractViewNext
|
||||||
return signature;
|
return signature;
|
||||||
}
|
}
|
||||||
|
|
||||||
setSignatureFromIdentity(identity, first = false) {
|
setSignatureFromIdentity(identity) {
|
||||||
if (identity)
|
if (identity)
|
||||||
{
|
{
|
||||||
this.editor((editor) => {
|
this.editor((editor) => {
|
||||||
|
|
@ -883,7 +883,7 @@ class ComposePopupView extends AbstractViewNext
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
editor.setSignature(this.converSignature(signature), isHtml, !!identity.signatureInsertBefore(), first);
|
editor.setSignature(this.converSignature(signature), isHtml, !!identity.signatureInsertBefore());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1168,7 +1168,7 @@ class ComposePopupView extends AbstractViewNext
|
||||||
|
|
||||||
if (identity && ComposeType.Draft !== lineComposeType && ComposeType.EditAsNew !== lineComposeType)
|
if (identity && ComposeType.Draft !== lineComposeType && ComposeType.EditAsNew !== lineComposeType)
|
||||||
{
|
{
|
||||||
this.setSignatureFromIdentity(identity, true);
|
this.setSignatureFromIdentity(identity);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setFocusInPopup();
|
this.setFocusInPopup();
|
||||||
|
|
@ -1192,7 +1192,7 @@ class ComposePopupView extends AbstractViewNext
|
||||||
|
|
||||||
if (identity)
|
if (identity)
|
||||||
{
|
{
|
||||||
this.setSignatureFromIdentity(identity, true);
|
this.setSignatureFromIdentity(identity);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setFocusInPopup();
|
this.setFocusInPopup();
|
||||||
|
|
@ -1216,7 +1216,7 @@ class ComposePopupView extends AbstractViewNext
|
||||||
|
|
||||||
if (identity && ComposeType.Draft !== lineComposeType && ComposeType.EditAsNew !== lineComposeType)
|
if (identity && ComposeType.Draft !== lineComposeType && ComposeType.EditAsNew !== lineComposeType)
|
||||||
{
|
{
|
||||||
this.setSignatureFromIdentity(identity, true);
|
this.setSignatureFromIdentity(identity);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setFocusInPopup();
|
this.setFocusInPopup();
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
|
|
||||||
import window from 'window';
|
import window from 'window';
|
||||||
import $ from '$';
|
|
||||||
import _ from '_';
|
import _ from '_';
|
||||||
import ko from 'ko';
|
import ko from 'ko';
|
||||||
|
|
||||||
|
|
@ -457,11 +456,6 @@ class LoginUserView extends AbstractViewNext
|
||||||
}, Magics.Time50ms);
|
}, Magics.Time50ms);
|
||||||
|
|
||||||
triggerAutocompleteInputChange(true);
|
triggerAutocompleteInputChange(true);
|
||||||
|
|
||||||
if (Settings.appSettingsGet('activeBackgroud'))
|
|
||||||
{
|
|
||||||
this.initActiveBackgroud();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
submitForm() {
|
submitForm() {
|
||||||
|
|
@ -486,28 +480,6 @@ class LoginUserView extends AbstractViewNext
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
initActiveBackgroud() {
|
|
||||||
|
|
||||||
const
|
|
||||||
$bg = $('#rl-bg'),
|
|
||||||
movementStrength = 25,
|
|
||||||
winHeight = $win.height(),
|
|
||||||
winWidth = $win.width(),
|
|
||||||
height = movementStrength / winHeight,
|
|
||||||
width = movementStrength / winWidth,
|
|
||||||
winHeightHalf = winHeight / 2,
|
|
||||||
winWidthHalf = winWidth / 2;
|
|
||||||
|
|
||||||
$bg.addClass('animated');
|
|
||||||
|
|
||||||
$('#rl-app').on('mousemove', _.throttle((e) => {
|
|
||||||
$bg.css({
|
|
||||||
top: height * (e.pageY - winHeightHalf) * -1 - movementStrength,
|
|
||||||
left: width * (e.pageX - winWidthHalf) * -1 - movementStrength
|
|
||||||
});
|
|
||||||
}, 1));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export {LoginUserView, LoginUserView as default};
|
export {LoginUserView, LoginUserView as default};
|
||||||
|
|
|
||||||
|
|
@ -1455,9 +1455,7 @@ class Actions
|
||||||
'customLogoutLink' => $oConfig->Get('labs', 'custom_logout_link', ''),
|
'customLogoutLink' => $oConfig->Get('labs', 'custom_logout_link', ''),
|
||||||
'forgotPasswordLinkUrl' => \trim($oConfig->Get('login', 'forgot_password_link_url', '')),
|
'forgotPasswordLinkUrl' => \trim($oConfig->Get('login', 'forgot_password_link_url', '')),
|
||||||
'registrationLinkUrl' => \trim($oConfig->Get('login', 'registration_link_url', '')),
|
'registrationLinkUrl' => \trim($oConfig->Get('login', 'registration_link_url', '')),
|
||||||
'loginGlassStyle' => (bool) $oConfig->Get('login', 'glass_style', true),
|
|
||||||
'hideSubmitButton' => (bool) $oConfig->Get('login', 'hide_submit_button', true),
|
'hideSubmitButton' => (bool) $oConfig->Get('login', 'hide_submit_button', true),
|
||||||
'activeBackgroud' => (bool) $oConfig->Get('login', 'active_backgroud', false),
|
|
||||||
'jsHash' => \md5(\RainLoop\Utils::GetConnectionToken()),
|
'jsHash' => \md5(\RainLoop\Utils::GetConnectionToken()),
|
||||||
'useImapThread' => (bool) $oConfig->Get('labs', 'use_imap_thread', false),
|
'useImapThread' => (bool) $oConfig->Get('labs', 'use_imap_thread', false),
|
||||||
'useImapSubscribe' => (bool) $oConfig->Get('labs', 'use_imap_list_subscribe', true),
|
'useImapSubscribe' => (bool) $oConfig->Get('labs', 'use_imap_list_subscribe', true),
|
||||||
|
|
|
||||||
|
|
@ -251,9 +251,7 @@ class Application extends \RainLoop\Config\AbstractConfig
|
||||||
|
|
||||||
'welcome_page' => array(false, ''),
|
'welcome_page' => array(false, ''),
|
||||||
|
|
||||||
'glass_style' => array(true),
|
|
||||||
'hide_submit_button' => array(true),
|
'hide_submit_button' => array(true),
|
||||||
'active_backgroud' => array(false),
|
|
||||||
|
|
||||||
'forgot_password_link_url' => array('', ''),
|
'forgot_password_link_url' => array('', ''),
|
||||||
'registration_link_url' => array('', ''),
|
'registration_link_url' => array('', ''),
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html class="no-js rl-booted-trigger rl-started-trigger" dir="{{BaseDir}}">
|
<html class="no-js rl-booted-trigger rl-started-trigger glass" dir="{{BaseDir}}">
|
||||||
<head>
|
<head>
|
||||||
<noscript>
|
<noscript>
|
||||||
<meta http-equiv="refresh" content="0; URL=./?/NoScript" />
|
<meta http-equiv="refresh" content="0; URL=./?/NoScript" />
|
||||||
|
|
|
||||||
22
vendors/ckeditor-plugins/signature/plugin.js
vendored
22
vendors/ckeditor-plugins/signature/plugin.js
vendored
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var rl_signature_replacer = function(editor, text, signature, isHtml, insertBefore, isFirst) {
|
var rl_signature_replacer = function(editor, text, signature, isHtml, insertBefore) {
|
||||||
|
|
||||||
var
|
var
|
||||||
skipInsert = false,
|
skipInsert = false,
|
||||||
|
|
@ -60,19 +60,7 @@
|
||||||
|
|
||||||
if (!skipInsert)
|
if (!skipInsert)
|
||||||
{
|
{
|
||||||
if (isEmptyText)
|
signature = newLine + newLine + (isHtml ? '<signature>' : '') + signature + (isHtml ? '</signature>' : '');
|
||||||
{
|
|
||||||
signature = newLine + newLine + signature;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
signature = insertBefore ? signature + newLine + newLine : newLine + newLine + signature;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isHtml)
|
|
||||||
{
|
|
||||||
signature = '<signature>' + signature + '</signature>';
|
|
||||||
}
|
|
||||||
|
|
||||||
text = insertBefore ? signature + text : text + signature;
|
text = insertBefore ? signature + text : text + signature;
|
||||||
|
|
||||||
|
|
@ -101,7 +89,6 @@
|
||||||
|
|
||||||
var
|
var
|
||||||
bIsHtml = false,
|
bIsHtml = false,
|
||||||
bIsFirst = false,
|
|
||||||
bInsertBefore = false,
|
bInsertBefore = false,
|
||||||
sSignature = '',
|
sSignature = '',
|
||||||
sResultSignature = '';
|
sResultSignature = '';
|
||||||
|
|
@ -109,7 +96,6 @@
|
||||||
if (cfg)
|
if (cfg)
|
||||||
{
|
{
|
||||||
bIsHtml = undefined === cfg.isHtml ? false : !!cfg.isHtml;
|
bIsHtml = undefined === cfg.isHtml ? false : !!cfg.isHtml;
|
||||||
bIsFirst = undefined === cfg.isFirst ? false : !!cfg.isFirst;
|
|
||||||
bInsertBefore = undefined === cfg.insertBefore ? false : !!cfg.insertBefore;
|
bInsertBefore = undefined === cfg.insertBefore ? false : !!cfg.insertBefore;
|
||||||
sSignature = undefined === cfg.signature ? '' : cfg.signature;
|
sSignature = undefined === cfg.signature ? '' : cfg.signature;
|
||||||
}
|
}
|
||||||
|
|
@ -129,7 +115,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
editor.__plain.setRawData(
|
editor.__plain.setRawData(
|
||||||
rl_signature_replacer(editor, editor.__plain.getRawData(), sResultSignature, false, bInsertBefore, bIsFirst));
|
rl_signature_replacer(editor, editor.__plain.getRawData(), sResultSignature, false, bInsertBefore));
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -143,7 +129,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
editor.setData(
|
editor.setData(
|
||||||
rl_signature_replacer(editor, editor.getData(), sResultSignature, true, bInsertBefore, bIsFirst));
|
rl_signature_replacer(editor, editor.getData(), sResultSignature, true, bInsertBefore));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (e) {}
|
catch (e) {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue