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,
sUid = '',
aList = [],
bUnreadCountChange = false,
oFlags = null
oFlags = null,
bUnreadCountChange = false
;
if (oFolder)

View file

@ -254,7 +254,7 @@
sTagName = sTagName.toUpperCase();
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.dtd.$removeEmpty['p'] = 1;
self.editor = window.CKEDITOR.appendTo(self.$element[0], oConfig);
self.editor.on('key', function(oEvent) {
@ -307,9 +305,6 @@
self.editor.removeMenuItem('paste');
}
self.editor.setKeystroke(window.CKEDITOR.CTRL + 65 /* A */, 'selectAll');
self.__resizable = true;
self.__inited = true;

View file

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

View file

@ -53,14 +53,8 @@
_.extend(AbstracCheckbox.prototype, AbstractComponent.prototype);
AbstracCheckbox.prototype.click = function() {
if (!this.readOnly && this.enable() && !this.disable())
{
this.value(!this.value());
}
};
AbstracCheckbox.prototype.keypress = function() {
AbstracCheckbox.prototype.click = function()
{
if (!this.readOnly && this.enable() && !this.disable())
{
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 = {
'init': function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) {
$(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 = {
'init': function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) {
$(oElement).on('keydown.koOnTab', function (oEvent) {

View file

@ -90,6 +90,15 @@
if (oCacheFolder)
{
if (!FolderStore.displaySpecSetting())
{
oCacheFolder.checkable(true);
}
else
{
oCacheFolder.checkable(!!oFolder.Checkable);
}
oCacheFolder.collapsed(!self.isFolderExpanded(oCacheFolder.fullNameHash));
if (oFolder.Extended)
@ -131,6 +140,14 @@
if (oData && 'Collection/FolderCollection' === oData['@Object'] &&
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(
Utils.isUnd(oData.Namespace) ? '' : oData.Namespace, oData['@Collection']));
}

View file

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

View file

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

View file

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

View file

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

1
dev/bootstrap.js vendored
View file

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