Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Commit 5fc83df

Browse files
author
Andreas Adler
committed
Merge pull request #3 from RainLoop/master
Merge with base
2 parents f22b260 + a74a778 commit 5fc83df

File tree

140 files changed

+3341
-1333
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+3341
-1333
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
RainLoop Webmail
22
==================
33

4+
[![Join the chat at https://gitter.im/RainLoop/rainloop-webmail](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/RainLoop/rainloop-webmail?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5+
46
Simple, modern & fast web-based email client.
57

68
Modest system requirements, decent performance, simple installation and upgrade, no database required - all these make RainLoop Webmail a perfect choice for your email solution.

build/langs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function saveLangStructure($sLangFile, $aLang)
4848
}
4949
}
5050

51-
\file_put_contents(LANGS_PATH.'/'.$sLangFile, implode("\n", $aResultLines));
51+
\file_put_contents(LANGS_PATH.'/'.$sLangFile, implode("\n", $aResultLines)."\n");
5252
}
5353

5454
$sNL = "\n";

build/test.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
// simple connection test
4+
5+
$host = 'imap.gmail.com';
6+
$port = 993;
7+
8+
echo $host.':'.$port;
9+
10+
$errorStr = '';
11+
$errorNo = 0;
12+
13+
$connection = stream_socket_client($host.':'.$port, $errorNo, $errorStr, 5, STREAM_CLIENT_CONNECT);
14+
if (is_resource($connection)) {
15+
echo ' = OK';
16+
fclose($connection);
17+
} else {
18+
echo ' = ERROR ([#'.$errorNo.'] '.$errorStr.')';
19+
}

dev/App/Abstract.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373

7474
}, 50));
7575

76-
// TODO
76+
// DEBUG
7777
// Events.sub({
7878
// 'window.resize': function () {
7979
// window.console.log('window.resize');
@@ -284,14 +284,17 @@
284284

285285
ko.components.register('x-script', require('Component/Script'));
286286

287-
if (Settings.settingsGet('MaterialDesign') && Globals.bAnimationSupported)
287+
if (/**false && /**/Settings.settingsGet('MaterialDesign') && Globals.bAnimationSupported)
288288
{
289289
ko.components.register('Checkbox', require('Component/MaterialDesign/Checkbox'));
290+
ko.components.register('CheckboxSimple', require('Component/Checkbox'));
290291
}
291292
else
292293
{
293294
// ko.components.register('Checkbox', require('Component/Classic/Checkbox'));
295+
// ko.components.register('CheckboxSimple', require('Component/Classic/Checkbox'));
294296
ko.components.register('Checkbox', require('Component/Checkbox'));
297+
ko.components.register('CheckboxSimple', require('Component/Checkbox'));
295298
}
296299

297300
Translator.initOnStartOrLangChange(Translator.initNotificationLanguage, Translator);

dev/App/User.js

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@
9797
Events.pub('interval.20m');
9898
}, 60000 * 15);
9999

100+
window.setTimeout(function () {
101+
window.setInterval(function () {
102+
Events.pub('interval.2m-after5m');
103+
}, 60000 * 2);
104+
}, 60000 * 5);
105+
100106
window.setTimeout(function () {
101107
window.setInterval(function () {
102108
Events.pub('interval.5m-after5m');
@@ -174,7 +180,15 @@
174180
if (Utils.isUnd(bDropPagePosition) ? false : !!bDropPagePosition)
175181
{
176182
MessageStore.messageListPage(1);
183+
MessageStore.messageListPageBeforeThread(1);
177184
iOffset = 0;
185+
186+
kn.setHash(Links.mailBox(
187+
FolderStore.currentFolderFullNameHash(),
188+
MessageStore.messageListPage(),
189+
MessageStore.messageListSearch(),
190+
MessageStore.messageListThreadUid()
191+
), true, true);
178192
}
179193

180194
MessageStore.messageListLoading(true);
@@ -201,17 +215,18 @@
201215
);
202216
}
203217

204-
}, FolderStore.currentFolderFullNameRaw(), iOffset, SettingsStore.messagesPerPage(), MessageStore.messageListSearch());
218+
}, FolderStore.currentFolderFullNameRaw(), iOffset, SettingsStore.messagesPerPage(),
219+
MessageStore.messageListSearch(), MessageStore.messageListThreadUid());
205220
};
206221

207222
AppUser.prototype.recacheInboxMessageList = function ()
208223
{
209-
Remote.messageList(Utils.emptyFunction, Cache.getFolderInboxName(), 0, SettingsStore.messagesPerPage(), '', true);
224+
Remote.messageList(Utils.emptyFunction, Cache.getFolderInboxName(), 0, SettingsStore.messagesPerPage(), '', '', true);
210225
};
211226

212227
/**
213228
* @param {Function} fResultFunc
214-
* @returns {boolean}
229+
* @return {boolean}
215230
*/
216231
AppUser.prototype.contactsSync = function (fResultFunc)
217232
{
@@ -754,7 +769,7 @@
754769
var
755770
self = this,
756771
iUtc = Momentor.momentNowUnix(),
757-
aFolders = FolderStore.getNextFolderNames(bBoot)
772+
aFolders = FolderStore.getNextFolderNames()
758773
;
759774

760775
if (Utils.isNonEmptyArray(aFolders))
@@ -824,7 +839,8 @@
824839
});
825840

826841
if (bBoot)
827-
{ _.delay(function () {
842+
{
843+
_.delay(function () {
828844
self.folderInformationMultiply(true);
829845
}, 2000);
830846
}
@@ -843,10 +859,8 @@
843859
AppUser.prototype.messageListAction = function (sFolderFullNameRaw, mUid, iSetAction, aMessages)
844860
{
845861
var
846-
bRoot = false,
847-
aAllUids = [],
848-
aRootUids = [],
849862
oFolder = null,
863+
aRootUids = [],
850864
iAlreadyUnread = 0
851865
;
852866

@@ -855,31 +869,16 @@
855869
aMessages = MessageStore.messageListChecked();
856870
}
857871

858-
if (true === mUid)
859-
{
860-
bRoot = true;
861-
}
862-
else if (aMessages && aMessages[0] && mUid &&
863-
sFolderFullNameRaw === aMessages[0].uid && mUid === aMessages[0].uid)
864-
{
865-
bRoot = true;
866-
}
872+
aRootUids = _.uniq(_.compact(_.map(aMessages, function (oMessage) {
873+
return (oMessage && oMessage.uid) ? oMessage.uid : null;
874+
})));
867875

868-
_.each(aMessages, function (oMessage) {
869-
aRootUids.push(oMessage.uid);
870-
aAllUids = _.union(aAllUids, oMessage.threads(), [oMessage.uid]);
871-
});
872-
873-
aAllUids = _.uniq(aAllUids);
874-
aRootUids = _.uniq(aRootUids);
875-
aRootUids = aAllUids; // always all
876-
877-
if ('' !== sFolderFullNameRaw && 0 < aAllUids.length)
876+
if ('' !== sFolderFullNameRaw && 0 < aRootUids.length)
878877
{
879878
switch (iSetAction) {
880879
case Enums.MessageSetAction.SetSeen:
881880

882-
_.each(bRoot ? aAllUids : aRootUids, function (sSubUid) {
881+
_.each(aRootUids, function (sSubUid) {
883882
iAlreadyUnread += Cache.storeMessageFlagsToCacheBySetAction(
884883
sFolderFullNameRaw, sSubUid, iSetAction);
885884
});
@@ -890,7 +889,7 @@
890889
oFolder.messageCountUnread(oFolder.messageCountUnread() - iAlreadyUnread);
891890
}
892891

893-
Remote.messageSetSeen(Utils.emptyFunction, sFolderFullNameRaw, bRoot ? aAllUids : aRootUids, true);
892+
Remote.messageSetSeen(Utils.emptyFunction, sFolderFullNameRaw, aRootUids, true);
894893
break;
895894

896895
case Enums.MessageSetAction.UnsetSeen:
@@ -921,12 +920,12 @@
921920

922921
case Enums.MessageSetAction.UnsetFlag:
923922

924-
_.each(bRoot ? aAllUids : aRootUids, function (sSubUid) {
923+
_.each(aRootUids, function (sSubUid) {
925924
Cache.storeMessageFlagsToCacheBySetAction(
926925
sFolderFullNameRaw, sSubUid, iSetAction);
927926
});
928927

929-
Remote.messageSetFlagged(Utils.emptyFunction, sFolderFullNameRaw, bRoot ? aAllUids : aRootUids, false);
928+
Remote.messageSetFlagged(Utils.emptyFunction, sFolderFullNameRaw, aRootUids, false);
930929
break;
931930
}
932931

@@ -1369,7 +1368,7 @@
13691368
}
13701369
});
13711370

1372-
Events.sub('interval.5m-after5m', function () {
1371+
Events.sub('interval.2m-after5m', function () {
13731372
self.folderInformationMultiply();
13741373
});
13751374

0 commit comments

Comments
 (0)