Release fixes

This commit is contained in:
RainLoop Team 2015-05-15 00:10:58 +04:00
parent 5e31c01344
commit 9a98bff931
30 changed files with 143 additions and 76 deletions

View file

@ -675,8 +675,8 @@
bCheck = false, bCheck = false,
sUid = '', sUid = '',
aList = [], aList = [],
bUnreadCountChange = false, oFlags = null,
oFlags = null bUnreadCountChange = false
; ;
if (oFolder) if (oFolder)

View file

@ -254,7 +254,7 @@
sTagName = sTagName.toUpperCase(); sTagName = sTagName.toUpperCase();
return !(sTagName === 'INPUT' || sTagName === 'SELECT' || sTagName === 'TEXTAREA' || return !(sTagName === 'INPUT' || sTagName === 'SELECT' || sTagName === 'TEXTAREA' ||
(oElement && sTagName === 'DIV' && 'editorHtmlArea' === oElement.className && oElement.contentEditable) (oElement && sTagName === 'DIV' && ('editorHtmlArea' === oElement.className || 'true' === '' + oElement.contentEditable))
); );
} }

View file

@ -269,8 +269,6 @@
window.CKEDITOR.env.isCompatible = true; window.CKEDITOR.env.isCompatible = true;
} }
window.CKEDITOR.dtd.$removeEmpty['p'] = 1;
self.editor = window.CKEDITOR.appendTo(self.$element[0], oConfig); self.editor = window.CKEDITOR.appendTo(self.$element[0], oConfig);
self.editor.on('key', function(oEvent) { self.editor.on('key', function(oEvent) {
@ -307,9 +305,6 @@
self.editor.removeMenuItem('paste'); self.editor.removeMenuItem('paste');
} }
self.editor.setKeystroke(window.CKEDITOR.CTRL + 65 /* A */, 'selectAll');
self.__resizable = true; self.__resizable = true;
self.__inited = true; self.__inited = true;

View file

@ -534,14 +534,14 @@
oEvent.preventDefault(); oEvent.preventDefault();
return; return;
} }
else if (iKey === Enums.EventKeyCode.A)
if (oSender && oSender.tagName && oSender.tagName.match(/INPUT|TEXTAREA/i)) {
if (oSender && ('true' === '' + oSender.contentEditable ||
(oSender.tagName && oSender.tagName.match(/INPUT|TEXTAREA/i))))
{ {
return; return;
} }
if (iKey === Enums.EventKeyCode.A)
{
if (window.getSelection) if (window.getSelection)
{ {
window.getSelection().removeAllRanges(); window.getSelection().removeAllRanges();

View file

@ -53,14 +53,8 @@
_.extend(AbstracCheckbox.prototype, AbstractComponent.prototype); _.extend(AbstracCheckbox.prototype, AbstractComponent.prototype);
AbstracCheckbox.prototype.click = function() { AbstracCheckbox.prototype.click = function()
if (!this.readOnly && this.enable() && !this.disable())
{ {
this.value(!this.value());
}
};
AbstracCheckbox.prototype.keypress = function() {
if (!this.readOnly && this.enable() && !this.disable()) if (!this.readOnly && this.enable() && !this.disable())
{ {
this.value(!this.value()); this.value(!this.value());

27
dev/External/ko.js vendored
View file

@ -315,18 +315,6 @@
} }
}; };
ko.bindingHandlers.keypress = {
'init': function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) {
$(oElement).on('keypress.koKeyPress', function (oEvent) {
fValueAccessor().call(oViewModel, oEvent);
});
ko.utils.domNodeDisposal.addDisposeCallback(oElement, function () {
$(oElement).off('keypress.koKeyPress');
});
}
};
ko.bindingHandlers.onEnter = { ko.bindingHandlers.onEnter = {
'init': function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) { 'init': function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) {
$(oElement).on('keypress.koOnEnter', function (oEvent) { $(oElement).on('keypress.koOnEnter', function (oEvent) {
@ -343,6 +331,21 @@
} }
}; };
ko.bindingHandlers.onSpace = {
'init': function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) {
$(oElement).on('keyup.koOnSpace', function (oEvent) {
if (oEvent && 32 === window.parseInt(oEvent.keyCode, 10))
{
fValueAccessor().call(oViewModel, oEvent);
}
});
ko.utils.domNodeDisposal.addDisposeCallback(oElement, function () {
$(oElement).off('keyup.koOnSpace');
});
}
};
ko.bindingHandlers.onTab = { ko.bindingHandlers.onTab = {
'init': function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) { 'init': function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) {
$(oElement).on('keydown.koOnTab', function (oEvent) { $(oElement).on('keydown.koOnTab', function (oEvent) {

View file

@ -90,6 +90,15 @@
if (oCacheFolder) if (oCacheFolder)
{ {
if (!FolderStore.displaySpecSetting())
{
oCacheFolder.checkable(true);
}
else
{
oCacheFolder.checkable(!!oFolder.Checkable);
}
oCacheFolder.collapsed(!self.isFolderExpanded(oCacheFolder.fullNameHash)); oCacheFolder.collapsed(!self.isFolderExpanded(oCacheFolder.fullNameHash));
if (oFolder.Extended) if (oFolder.Extended)
@ -131,6 +140,14 @@
if (oData && 'Collection/FolderCollection' === oData['@Object'] && if (oData && 'Collection/FolderCollection' === oData['@Object'] &&
oData['@Collection'] && Utils.isArray(oData['@Collection'])) oData['@Collection'] && Utils.isArray(oData['@Collection']))
{ {
var
iLimit = Utils.pInt(Settings.settingsGet('FolderSpecLimit')),
iC = Utils.pInt(oData['CountRec'])
;
iLimit = 100 < iLimit ? 100 : (10 > iLimit ? 10 : iLimit);
FolderStore.displaySpecSetting(0 >= iC || iLimit < iC);
FolderStore.folderList(this.folderResponseParseRec( FolderStore.folderList(this.folderResponseParseRec(
Utils.isUnd(oData.Namespace) ? '' : oData.Namespace, oData['@Collection'])); Utils.isUnd(oData.Namespace) ? '' : oData.Namespace, oData['@Collection']));
} }

View file

@ -72,10 +72,10 @@
'SettingsSecurity', 'SETTINGS_LABELS/LABEL_SECURITY_NAME', 'security'); 'SettingsSecurity', 'SETTINGS_LABELS/LABEL_SECURITY_NAME', 'security');
} }
if (AccountStore.isRootAccount() && if (AccountStore.isRootAccount() && (
(Settings.settingsGet('AllowGoogleSocial') && Settings.settingsGet('AllowGoogleSocialAuth')) || (Settings.settingsGet('AllowGoogleSocial') && Settings.settingsGet('AllowGoogleSocialAuth')) ||
Settings.settingsGet('AllowFacebookSocial') || Settings.settingsGet('AllowFacebookSocial') ||
Settings.settingsGet('AllowTwitterSocial')) Settings.settingsGet('AllowTwitterSocial')))
{ {
kn.addSettingsViewModel(require('Settings/User/Social'), kn.addSettingsViewModel(require('Settings/User/Social'),
'SettingsSocial', 'SETTINGS_LABELS/LABEL_SOCIAL_NAME', 'social'); 'SettingsSocial', 'SETTINGS_LABELS/LABEL_SOCIAL_NAME', 'social');

View file

@ -26,6 +26,7 @@
*/ */
function FoldersUserSettings() function FoldersUserSettings()
{ {
this.displaySpecSetting = FolderStore.displaySpecSetting;
this.folderList = FolderStore.folderList; this.folderList = FolderStore.folderList;
this.folderListHelp = ko.observable('').extend({'throttle': 100}); this.folderListHelp = ko.observable('').extend({'throttle': 100});

View file

@ -19,6 +19,8 @@
*/ */
function FolderUserStore() function FolderUserStore()
{ {
this.displaySpecSetting = ko.observable(true);
this.sentFolder = ko.observable(''); this.sentFolder = ko.observable('');
this.draftFolder = ko.observable(''); this.draftFolder = ko.observable('');
this.spamFolder = ko.observable(''); this.spamFolder = ko.observable('');

View file

@ -1207,7 +1207,8 @@
}); });
sText = '<br /><br />' + sReplyTitle + ':' + sText = '<br /><br />' + sReplyTitle + ':' +
'<blockquote><p>' + Utils.trim(sText) + '</p></blockquote>'; '<blockquote>' + Utils.trim(sText) + '</blockquote>';
// '<blockquote><p>' + Utils.trim(sText) + '</p></blockquote>';
break; break;
@ -1223,6 +1224,7 @@
'<br />' + Translator.i18n('COMPOSE/FORWARD_MESSAGE_TOP_SUBJECT') + ': ' + Utils.encodeHtml(sSubject) + '<br />' + Translator.i18n('COMPOSE/FORWARD_MESSAGE_TOP_SUBJECT') + ': ' + Utils.encodeHtml(sSubject) +
'<br /><br />' + Utils.trim(sText) + '<br /><br />'; '<br /><br />' + Utils.trim(sText) + '<br /><br />';
break; break;
case Enums.ComposeType.ForwardAsAttachment: case Enums.ComposeType.ForwardAsAttachment:
sText = ''; sText = '';
break; break;

1
dev/bootstrap.js vendored
View file

@ -23,7 +23,6 @@
Globals.$win Globals.$win
.keydown(Utils.kill_CtrlA_CtrlS) .keydown(Utils.kill_CtrlA_CtrlS)
.keyup(Utils.kill_CtrlA_CtrlS)
.unload(function () { .unload(function () {
Globals.bUnload = true; Globals.bUnload = true;
}) })

View file

@ -4,8 +4,8 @@
var var
pkg = require('./package.json'), pkg = require('./package.json'),
head = { head = {
cc: '/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */', rainloop: '/* RainLoop Webmail (c) RainLoop Team | Licensed under RainLoop Software License */',
agpl: '/* RainLoop Webmail (c) RainLoop Team | Licensed under AGPL 3 */' agpl: '/* RainLoop Webmail (c) RainLoop Team | Licensed under AGPL v3 */'
}, },
cfg = { cfg = {
devVersion: '0.0.0', devVersion: '0.0.0',
@ -46,7 +46,7 @@ var
function getHead() function getHead()
{ {
return !cfg.community ? head.cc : head.agpl; return !cfg.community ? head.rainloop : head.agpl;
} }
function regOtherMinTask(sName, sPath, sInc, sOut, sHeader) function regOtherMinTask(sName, sPath, sInc, sOut, sHeader)
@ -454,7 +454,6 @@ gulp.task('ckeditor:copy-plugins', ['ckeditor:copy'], function() {
gulp.task('ckeditor', ['ckeditor:copy-plugins'], function () { gulp.task('ckeditor', ['ckeditor:copy-plugins'], function () {
return gulp.src('rainloop/v/' + cfg.devVersion + '/static/ckeditor/*.js') return gulp.src('rainloop/v/' + cfg.devVersion + '/static/ckeditor/*.js')
.pipe(stripbom()) .pipe(stripbom())
// .pipe(replace("\u200B", "\\u200B"))
.pipe(replace('console.log("Detecting changes using MutationObservers")', 'true')) .pipe(replace('console.log("Detecting changes using MutationObservers")', 'true'))
.pipe(header("\uFEFF")) // BOM .pipe(header("\uFEFF")) // BOM
.pipe(gulp.dest('rainloop/v/' + cfg.devVersion + '/static/ckeditor')); .pipe(gulp.dest('rainloop/v/' + cfg.devVersion + '/static/ckeditor'));
@ -565,7 +564,7 @@ gulp.task('rainloop:owncloud:setup', ['rainloop:owncloud:copy',
fs.writeFileSync(dist + 'rainloop/appinfo/info.xml', fs.writeFileSync(dist + 'rainloop/appinfo/info.xml',
fs.readFileSync(dist + 'rainloop/appinfo/info.xml', 'utf8') fs.readFileSync(dist + 'rainloop/appinfo/info.xml', 'utf8')
.replace('<version>0.0</version>', '<version>' + versionFull + '</version>') .replace('<version>0.0</version>', '<version>' + versionFull + '</version>')
.replace('<licence></licence>', '<licence>' + (cfg.community ? 'AGPLv3' : 'CC BY-NC-SA 3.0') + '</licence>') .replace('<licence></licence>', '<licence>' + (cfg.community ? 'AGPLv3' : 'RainLoop Software License') + '</licence>')
); );
fs.writeFileSync(dist + 'rainloop/appinfo/version', versionFull); fs.writeFileSync(dist + 'rainloop/appinfo/version', versionFull);
@ -574,7 +573,7 @@ gulp.task('rainloop:owncloud:setup', ['rainloop:owncloud:copy',
cfg.destPath = cfg.releasesPath + '/owncloud/' + versionFull + '/'; cfg.destPath = cfg.releasesPath + '/owncloud/' + versionFull + '/';
cfg.cleanPath = dist; cfg.cleanPath = dist;
cfg.zipSrcPath = dist; cfg.zipSrcPath = dist;
cfg.zipFile = 'rainloop-owncloud-app-' + (cfg.community ? '' : 'cc-') + versionFull + '.zip'; cfg.zipFile = 'rainloop-owncloud-app-' + (cfg.community ? '' : 'standard-') + versionFull + '.zip';
cfg.md5File = cfg.zipFile; cfg.md5File = cfg.zipFile;
}); });

View file

@ -1,8 +1,8 @@
{ {
"name": "RainLoop", "name": "RainLoop",
"title": "RainLoop Webmail", "title": "RainLoop Webmail",
"version": "1.9.0", "version": "1.9.1",
"release": "327", "release": "329",
"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": "gulpfile.js", "main": "gulpfile.js",
@ -19,6 +19,10 @@
{ {
"type": "AGPL 3.0", "type": "AGPL 3.0",
"ulr": "http://www.gnu.org/licenses/agpl-3.0.html" "ulr": "http://www.gnu.org/licenses/agpl-3.0.html"
},
{
"type": "RainLoop Software License",
"ulr": "http://www.rainloop.net/licensing/"
} }
], ],
"bugs": { "bugs": {
@ -36,7 +40,7 @@
"plugins" "plugins"
], ],
"readmeFilename": "README.md", "readmeFilename": "README.md",
"ownCloudPackageVersion": "4.0", "ownCloudPackageVersion": "4.1",
"engines": { "engines": {
"node": ">= 0.10.0" "node": ">= 0.10.0"
}, },

View file

@ -20,7 +20,7 @@ class FolderCollection extends \MailSo\Base\Collection
/** /**
* @var string * @var string
*/ */
private $sNamespace; public $Namespace;
/** /**
* @var string * @var string
@ -49,7 +49,7 @@ class FolderCollection extends \MailSo\Base\Collection
{ {
parent::__construct(); parent::__construct();
$this->sNamespace = ''; $this->Namespace = '';
$this->FoldersHash = ''; $this->FoldersHash = '';
$this->SystemFolders = array(); $this->SystemFolders = array();
$this->IsThreadsSupported = false; $this->IsThreadsSupported = false;
@ -96,12 +96,30 @@ class FolderCollection extends \MailSo\Base\Collection
return $mResult; return $mResult;
} }
/**
* @return int
*/
public function CountRec()
{
$iResult = $this->Count();
foreach ($this->aItems as /* @var $oFolder \MailSo\Mail\Folder */ $oFolder)
{
if ($oFolder)
{
$oSub = $oFolder->SubFolders();
$iResult += $oSub ? $oSub->CountRec() : 0;
}
}
return $iResult;
}
/** /**
* @return string * @return string
*/ */
public function GetNamespace() public function GetNamespace()
{ {
return $this->sNamespace; return $this->Namespace;
} }
/** /**
@ -132,7 +150,7 @@ class FolderCollection extends \MailSo\Base\Collection
*/ */
public function SetNamespace($sNamespace) public function SetNamespace($sNamespace)
{ {
$this->sNamespace = $sNamespace; $this->Namespace = $sNamespace;
return $this; return $this;
} }

View file

@ -1373,7 +1373,11 @@ class MailClient
$sCriteriasResult = \trim($sCriteriasResult); $sCriteriasResult = \trim($sCriteriasResult);
if ('' === $sCriteriasResult) if ('' === $sCriteriasResult)
{ {
$sCriteriasResult = 'ALL'; $sCriteriasResult = 'NOT DELETED'; // ALL
}
else
{
$sCriteriasResult .= ' NOT DELETED';
} }
return $sCriteriasResult; return $sCriteriasResult;

View file

@ -201,6 +201,8 @@ class Email
} }
$sEmail = \trim(\trim($sEmail), '<>'); $sEmail = \trim(\trim($sEmail), '<>');
$sEmail = \rtrim(\trim($sEmail), '.');
$sEmail = \trim($sEmail);
$sName = \trim(\trim($sName), '"'); $sName = \trim(\trim($sName), '"');
$sName = \trim($sName, '\''); $sName = \trim($sName, '\'');

View file

@ -1353,6 +1353,7 @@ class Actions
'UseImapSubscribe' => (bool) $oConfig->Get('labs', 'use_imap_list_subscribe', true), 'UseImapSubscribe' => (bool) $oConfig->Get('labs', 'use_imap_list_subscribe', true),
'AllowAppendMessage' => (bool) $oConfig->Get('labs', 'allow_message_append', false), 'AllowAppendMessage' => (bool) $oConfig->Get('labs', 'allow_message_append', false),
'MaterialDesign' => (bool) $oConfig->Get('labs', 'use_material_design', true), 'MaterialDesign' => (bool) $oConfig->Get('labs', 'use_material_design', true),
'FolderSpecLimit' => (int) $oConfig->Get('labs', 'folders_spec_limit', 50),
'Community' => true, 'Community' => true,
'PremType' => false, 'PremType' => false,
'Admin' => array(), 'Admin' => array(),
@ -9496,6 +9497,7 @@ class Actions
'FoldersHash' => isset($mResponse->FoldersHash) ? $mResponse->FoldersHash : '', 'FoldersHash' => isset($mResponse->FoldersHash) ? $mResponse->FoldersHash : '',
'IsThreadsSupported' => $mResponse->IsThreadsSupported, 'IsThreadsSupported' => $mResponse->IsThreadsSupported,
'Optimized' => $mResponse->Optimized, 'Optimized' => $mResponse->Optimized,
'CountRec' => $mResponse->CountRec(),
'SystemFolders' => isset($mResponse->SystemFolders) && \is_array($mResponse->SystemFolders) ? 'SystemFolders' => isset($mResponse->SystemFolders) && \is_array($mResponse->SystemFolders) ?
$mResponse->SystemFolders : array() $mResponse->SystemFolders : array()
)); ));

View file

@ -304,6 +304,7 @@ Enables caching in the system'),
'smtp_show_server_errors' => array(false), 'smtp_show_server_errors' => array(false),
'sieve_allow_raw_script' => array(false), 'sieve_allow_raw_script' => array(false),
'sieve_utf8_folder_name' => array(true), 'sieve_utf8_folder_name' => array(true),
'folders_spec_limit' => array(50),
'owncloud_save_folder' => array('Attachments'), 'owncloud_save_folder' => array('Attachments'),
'curl_proxy' => array(''), 'curl_proxy' => array(''),
'curl_proxy_auth' => array(''), 'curl_proxy_auth' => array(''),

View file

@ -15,7 +15,7 @@
<span class="flag-wrapper"> <span class="flag-wrapper">
<span data-bind="css: 'flag flag-' + language()" style=""></span> <span data-bind="css: 'flag flag-' + language()" style=""></span>
</span> </span>
<span class="flag-name" tabindex="0" data-bind="text: languageFullName, click: selectLanguage, keypress: selectLanguage"></span> <span class="flag-name" tabindex="0" data-bind="text: languageFullName, click: selectLanguage, onSpace: selectLanguage, onEnter: selectLanguage"></span>
&nbsp;&nbsp; &nbsp;&nbsp;
<div data-bind="component: { <div data-bind="component: {
name: 'SaveTrigger', name: 'SaveTrigger',
@ -31,7 +31,7 @@
<span class="flag-wrapper"> <span class="flag-wrapper">
<span data-bind="css: 'flag flag-' + languageAdmin()" style=""></span> <span data-bind="css: 'flag flag-' + languageAdmin()" style=""></span>
</span> </span>
<span class="flag-name" tabindex="0" data-bind="text: languageAdminFullName, click: selectLanguageAdmin, keypress: selectLanguageAdmin"></span> <span class="flag-name" tabindex="0" data-bind="text: languageAdminFullName, click: selectLanguageAdmin, onSpace: selectLanguageAdmin, onEnter: selectLanguageAdmin"></span>
&nbsp;&nbsp; &nbsp;&nbsp;
<div data-bind="component: { <div data-bind="component: {
name: 'SaveTrigger', name: 'SaveTrigger',

View file

@ -2,14 +2,8 @@
<div class="row"> <div class="row">
<div class="alert alert-info span8" style="margin-top: 10px;"> <div class="alert alert-info span8" style="margin-top: 10px;">
<span data-i18n="[html]TAB_LICENSING/HTML_ALERT_TOP_1"></span> <span data-i18n="[html]TAB_LICENSING/HTML_ALERT_TOP_1"></span>
<br /> &nbsp;
<b>Creative Commons Attribution-NonCommercial-ShareAlike 3.0 (CC BY-NC-SA)</b>. <a href=http://www.rainloop.net/licensing/ target=_blank>RainLoop Software License</a>.
<br />
<br />
<span data-i18n="[html]TAB_LICENSING/HTML_ALERT_TOP_2"></span>
<br />
<br />
<span data-i18n="[html]TAB_LICENSING/HTML_ALERT_TOP_3"></span>
</div> </div>
</div> </div>
<br /> <br />

View file

@ -1,4 +1,4 @@
<span class="e-component e-checkbox inline" tabindex="0" data-bind="click: click, keypress: keypress, css: { 'disabled': disable() || !enable() }"> <span class="e-component e-checkbox inline" tabindex="0" data-bind="click: click, onSpace: click, css: { 'disabled': disable() || !enable() }">
<i role="checkbox" class="e-checkbox-icon" data-bind="css: value() ? <i role="checkbox" class="e-checkbox-icon" data-bind="css: value() ?
(inverted ? 'icon-checkbox-unchecked' : 'icon-checkbox-checked') : (inverted ? 'icon-checkbox-unchecked' : 'icon-checkbox-checked') :
(inverted ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked') (inverted ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked')

View file

@ -1,4 +1,4 @@
<span class="e-component e-checkbox material-design inline" tabindex="0" data-bind="click: click, keypress: keypress, css: { 'disabled': disable() || !enable() }"> <span class="e-component e-checkbox material-design inline" tabindex="0" data-bind="click: click, onSpace: click, css: { 'disabled': disable() || !enable() }">
<div class="sub-checkbox-container" role="checkbox"> <div class="sub-checkbox-container" role="checkbox">
<div class="sub-checkbox" data-bind="css: {'checked': (value() && !inverted) || (!value() && inverted), <div class="sub-checkbox" data-bind="css: {'checked': (value() && !inverted) || (!value() && inverted),
'unchecked': (!value() && !inverted) || (value() && inverted), 'unchecked': (!value() && !inverted) || (value() && inverted),

View file

@ -117,7 +117,7 @@
<label class="flag-selector"> <label class="flag-selector">
<i data-bind="css: langRequest() ? 'icon-spinner animated' : 'icon-world'"></i> <i data-bind="css: langRequest() ? 'icon-spinner animated' : 'icon-world'"></i>
&nbsp;&nbsp; &nbsp;&nbsp;
<span class="flag-name" tabindex="0" data-bind="text: languageFullName, click: selectLanguage, keypress: selectLanguage, onTab: selectLanguageOnTab"></span> <span class="flag-name" tabindex="0" data-bind="text: languageFullName, click: selectLanguage, onSpace: selectLanguage, onEnter: selectLanguage, onTab: selectLanguageOnTab"></span>
</label> </label>
</div> </div>
{{INCLUDE/BottomFooter/PLACE}} {{INCLUDE/BottomFooter/PLACE}}

View file

@ -25,7 +25,7 @@
<i class="icon-eye"></i> <i class="icon-eye"></i>
</span> </span>
</td> </td>
<td class="check-folder-parent"> <td class="check-folder-parent" data-bind="visible: $root.displaySpecSetting">
<span class="uncheck-folder" data-bind="visible: canBeChecked() && subScribed() && !checkable(), click: function(oFolder) { $root.checkableTrueFolder(oFolder); }"> <span class="uncheck-folder" data-bind="visible: canBeChecked() && subScribed() && !checkable(), click: function(oFolder) { $root.checkableTrueFolder(oFolder); }">
<i class="icon-check-mark-circle-two"></i> <i class="icon-check-mark-circle-two"></i>
</span> </span>

View file

@ -32,7 +32,7 @@
<col /> <col />
<col style="width: 1%" /> <col style="width: 1%" />
<col style="width: 1%" /> <col style="width: 1%" />
<col style="width: 1%" /> <col style="width: 1%" data-bind="visible: displaySpecSetting" />
</colgroup> </colgroup>
<tbody data-bind="template: { name: 'SettingsFolderItem', foreach: folderList }"></tbody> <tbody data-bind="template: { name: 'SettingsFolderItem', foreach: folderList }"></tbody>
</table> </table>

View file

@ -12,7 +12,7 @@
<span class="flag-wrapper"> <span class="flag-wrapper">
<span data-bind="css: 'flag flag-' + language()" style=""></span> <span data-bind="css: 'flag flag-' + language()" style=""></span>
</span> </span>
<span class="flag-name" tabindex="0" data-bind="text: languageFullName, click: selectLanguage, keypress: selectLanguage"></span> <span class="flag-name" tabindex="0" data-bind="text: languageFullName, click: selectLanguage, onSpace: selectLanguage, onEnter: selectLanguage"></span>
&nbsp;&nbsp; &nbsp;&nbsp;
<div data-bind="component: { <div data-bind="component: {
name: 'SaveTrigger', name: 'SaveTrigger',

View file

@ -27,7 +27,7 @@
<div class="controls"> <div class="controls">
<i class="icon-lock" /> <i class="icon-lock" />
&nbsp; &nbsp;
<span class="i18n g-ui-link" tabindex="0" data-i18n="SETTINGS_SECURITY/LABEL_CONFIGURATE_TWO_FACTOR" data-bind="click: configureTwoFactor, keypress: configureTwoFactor"></span> <span class="i18n g-ui-link" tabindex="0" data-i18n="SETTINGS_SECURITY/LABEL_CONFIGURATE_TWO_FACTOR" data-bind="click: configureTwoFactor, onSpace: configureTwoFactor, onEnter: configureTwoFactor"></span>
</div> </div>
</div> </div>
</div> </div>

View file

@ -9,13 +9,26 @@ rl_signature_replacer = function (editor, sText, sSignature, bHtml, bInsertBefor
; ;
} }
sText = sText.replace(/\u0002([\s\S]*)\u0002/gm, '');
var var
bEmptyText = '' === $.trim(sText), sP = '~~~~@~~~~',
bEmptyText = false,
sNewLine = (bHtml ? '<br />' : "\n") sNewLine = (bHtml ? '<br />' : "\n")
; ;
sText = sText.replace(/\u0002([\s\S]*)\u0002/gm, sP + '$1' + sP);
if (editor.__previos_signature)
{
sText = sText
.replace(sP + editor.__previos_signature + sP, '')
.replace(sP + editor.__previos_signature + sP, '')
.replace(sP + editor.__previos_signature + sP, '')
;
}
sText = sText.replace(sP, '').replace(sP, '').replace(sP, '').replace(sP, '');
bEmptyText = '' === $.trim(sText);
if (!bEmptyText && bHtml) if (!bEmptyText && bHtml)
{ {
bEmptyText = '' !== $.trim(editor.__plainUtils.htmlToPlain(sText)); bEmptyText = '' !== $.trim(editor.__plainUtils.htmlToPlain(sText));
@ -24,10 +37,12 @@ rl_signature_replacer = function (editor, sText, sSignature, bHtml, bInsertBefor
if (bInsertBefore) if (bInsertBefore)
{ {
sText = "\u0002" + sSignature + (bEmptyText ? '' : sNewLine) + "\u0002" + sText; sText = "\u0002" + sSignature + (bEmptyText ? '' : sNewLine) + "\u0002" + sText;
editor.__previos_signature = sSignature + (bEmptyText ? '' : sNewLine);
} }
else else
{ {
sText = sText + "\u0002" + (bEmptyText ? '' : sNewLine) + sSignature + "\u0002"; sText = sText + "\u0002" + (bEmptyText ? '' : sNewLine) + sSignature + "\u0002";
editor.__previos_signature = (bEmptyText ? '' : sNewLine) + sSignature;
} }
if (!bHtml) if (!bHtml)

View file

@ -9,13 +9,26 @@ rl_signature_replacer = function (editor, sText, sSignature, bHtml, bInsertBefor
; ;
} }
sText = sText.replace(/\u0002([\s\S]*)\u0002/gm, '');
var var
bEmptyText = '' === $.trim(sText), sP = '~~~~@~~~~',
bEmptyText = false,
sNewLine = (bHtml ? '<br />' : "\n") sNewLine = (bHtml ? '<br />' : "\n")
; ;
sText = sText.replace(/\u0002([\s\S]*)\u0002/gm, sP + '$1' + sP);
if (editor.__previos_signature)
{
sText = sText
.replace(sP + editor.__previos_signature + sP, '')
.replace(sP + editor.__previos_signature + sP, '')
.replace(sP + editor.__previos_signature + sP, '')
;
}
sText = sText.replace(sP, '').replace(sP, '').replace(sP, '').replace(sP, '');
bEmptyText = '' === $.trim(sText);
if (!bEmptyText && bHtml) if (!bEmptyText && bHtml)
{ {
bEmptyText = '' !== $.trim(editor.__plainUtils.htmlToPlain(sText)); bEmptyText = '' !== $.trim(editor.__plainUtils.htmlToPlain(sText));
@ -24,10 +37,12 @@ rl_signature_replacer = function (editor, sText, sSignature, bHtml, bInsertBefor
if (bInsertBefore) if (bInsertBefore)
{ {
sText = "\u0002" + sSignature + (bEmptyText ? '' : sNewLine) + "\u0002" + sText; sText = "\u0002" + sSignature + (bEmptyText ? '' : sNewLine) + "\u0002" + sText;
editor.__previos_signature = sSignature + (bEmptyText ? '' : sNewLine);
} }
else else
{ {
sText = sText + "\u0002" + (bEmptyText ? '' : sNewLine) + sSignature + "\u0002"; sText = sText + "\u0002" + (bEmptyText ? '' : sNewLine) + sSignature + "\u0002";
editor.__previos_signature = (bEmptyText ? '' : sNewLine) + sSignature;
} }
if (!bHtml) if (!bHtml)