mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Added: New keyboard shortcuts for compose popup (Esc, Sift+Esc, `)
Fixed: Folders list tree viewer
This commit is contained in:
parent
3498700f61
commit
9b6b68e72b
36 changed files with 90 additions and 6 deletions
|
|
@ -342,6 +342,18 @@
|
|||
}
|
||||
};
|
||||
|
||||
HtmlEditor.prototype.hasFocus = function ()
|
||||
{
|
||||
if (this.editor)
|
||||
{
|
||||
try {
|
||||
return !!this.editor.focusManager.hasFocus;
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
HtmlEditor.prototype.blur = function ()
|
||||
{
|
||||
if (this.editor)
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
|
||||
this.hasSubScribedSubfolders = ko.computed(function () {
|
||||
return !!_.find(this.subFolders(), function (oFolder) {
|
||||
return oFolder.subScribed() && !oFolder.isSystemFolder();
|
||||
return (oFolder.subScribed() || oFolder.hasSubScribedSubfolders()) && !oFolder.isSystemFolder();
|
||||
});
|
||||
}, this);
|
||||
|
||||
|
|
|
|||
|
|
@ -150,6 +150,8 @@
|
|||
FolderStore.displaySpecSetting(0 >= iC || iLimit < iC);
|
||||
FolderStore.folderList(this.folderResponseParseRec(
|
||||
Utils.isUnd(oData.Namespace) ? '' : oData.Namespace, oData['@Collection']));
|
||||
|
||||
FolderStore.reComputeFolderListSubFolders();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -172,6 +172,7 @@
|
|||
Remote.folderSetSubscribe(Utils.emptyFunction, oFolder.fullNameRaw, true);
|
||||
|
||||
oFolder.subScribed(true);
|
||||
FolderStore.reComputeFolderListSubFolders();
|
||||
};
|
||||
|
||||
FoldersUserSettings.prototype.unSubscribeFolder = function (oFolder)
|
||||
|
|
@ -180,6 +181,7 @@
|
|||
Remote.folderSetSubscribe(Utils.emptyFunction, oFolder.fullNameRaw, false);
|
||||
|
||||
oFolder.subScribed(false);
|
||||
FolderStore.reComputeFolderListSubFolders();
|
||||
};
|
||||
|
||||
FoldersUserSettings.prototype.checkableTrueFolder = function (oFolder)
|
||||
|
|
|
|||
|
|
@ -241,6 +241,26 @@
|
|||
return aResult;
|
||||
};
|
||||
|
||||
FolderUserStore.prototype.reComputeFolderListSubFolders = function ()
|
||||
{
|
||||
return;
|
||||
|
||||
var
|
||||
func = function (aList) {
|
||||
_.each(aList, function (oFolder) {
|
||||
if (oFolder && oFolder.subFolders)
|
||||
{
|
||||
func(oFolder.subFolders());
|
||||
|
||||
oFolder.subFolders.valueHasMutated();
|
||||
}
|
||||
});
|
||||
}
|
||||
;
|
||||
|
||||
func(this.folderList());
|
||||
};
|
||||
|
||||
module.exports = new FolderUserStore();
|
||||
|
||||
}());
|
||||
|
|
|
|||
|
|
@ -124,6 +124,8 @@
|
|||
}, this).extend({'notify': 'always'});
|
||||
|
||||
this.subject = ko.observable('');
|
||||
this.subject.focused = ko.observable(false);
|
||||
|
||||
this.isHtml = ko.observable(false);
|
||||
|
||||
this.requestDsn = ko.observable(false);
|
||||
|
|
@ -1423,11 +1425,28 @@
|
|||
oScript = null
|
||||
;
|
||||
|
||||
key('ctrl+q, command+q', Enums.KeyState.Compose, function () {
|
||||
key('ctrl+q, command+q, ctrl+w, command+w', Enums.KeyState.Compose, function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
key('`', Enums.KeyState.Compose, function () {
|
||||
if (self.oEditor && !self.oEditor.hasFocus() && !Utils.inFocus())
|
||||
{
|
||||
self.identitiesDropdownTrigger(true);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
key('ctrl+`', Enums.KeyState.Compose, function () {
|
||||
self.identitiesDropdownTrigger(true);
|
||||
return false;
|
||||
});
|
||||
|
||||
key('esc, ctrl+down, command+down', Enums.KeyState.Compose, function () {
|
||||
self.skipCommand();
|
||||
return false;
|
||||
});
|
||||
|
||||
if (this.allowFolders)
|
||||
{
|
||||
key('ctrl+s, command+s', Enums.KeyState.Compose, function () {
|
||||
|
|
@ -1444,7 +1463,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
key('esc', Enums.KeyState.Compose, function () {
|
||||
key('shift+esc', Enums.KeyState.Compose, function () {
|
||||
if (self.modalVisibility())
|
||||
{
|
||||
self.tryToClosePopup();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue