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

Commit

Permalink
Update ckeditor
Browse files Browse the repository at this point in the history
Move e2e tests
Code refactoring
  • Loading branch information
RainLoop committed Sep 12, 2016
1 parent 9993432 commit e5af98b
Show file tree
Hide file tree
Showing 122 changed files with 617 additions and 561 deletions.
2 changes: 2 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
./dev/

[options]
strip_root=true
module.system=haste

esproposal.class_static_fields=enable
esproposal.class_instance_fields=enable
esproposal.decorators=ignore

experimental.strict_type_args=true

Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
/rainloop/v/0.0.0/static/*
/rainloop/v/0.0.0/app/localization/moment/*
!/rainloop/v/0.0.0/app/localization/moment/.gitempty
/e2e/configuration.js
/e2e/output/*
!/e2e/output/.gitempty
/tests/e2e/configuration.js
/tests/e2e/output/*
!/tests/e2e/output/.gitempty
/vendors/.*
/node_modules
/build/local
Expand Down
2 changes: 1 addition & 1 deletion build/owncloud/rainloop-app/appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<ocsid>165254</ocsid>
<dependencies>
<php min-version="5.4" />
<owncloud min-version="6" max-version="9.1" />
<owncloud min-version="6" max-version="9.2" />
</dependencies>
<category>productivity</category>
<website>http://www.rainloop.net/</website>
Expand Down
17 changes: 10 additions & 7 deletions dev/App/Abstract.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
import window from 'window';
import $ from '$';
import _ from '_';
import ko from 'ko';
import key from 'key';
import ssm from 'ssm';

import {
$win, $html, $doc,
Expand All @@ -22,6 +24,10 @@ import {toggle as toggleCmd} from 'Common/Cmd';
import * as Events from 'Common/Events';
import * as Settings from 'Storage/Settings';

import LanguageStore from 'Stores/Language';
import ThemeStore from 'Stores/Theme';
import SocialStore from 'Stores/Social';

import {routeOff, setHash} from 'Knoin/Knoin';
import {AbstractBoot} from 'Knoin/AbstractBoot';

Expand Down Expand Up @@ -289,10 +295,7 @@ class AbstractApp extends AbstractBoot

Events.pub('rl.bootstart');

const
mobile = Settings.appSettingsGet('mobile'),
ssm = require('ssm'),
ko = require('ko');
const mobile = Settings.appSettingsGet('mobile');

ko.components.register('SaveTrigger', require('Component/SaveTrigger'));
ko.components.register('Input', require('Component/Input'));
Expand Down Expand Up @@ -395,9 +398,9 @@ class AbstractApp extends AbstractBoot

leftPanelDisabled.valueHasMutated();

require('Stores/Language').populate();
require('Stores/Theme').populate();
require('Stores/Social').populate();
LanguageStore.populate();
ThemeStore.populate();
SocialStore.populate();
}
}

Expand Down
5 changes: 3 additions & 2 deletions dev/App/Admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {pInt, isNormal, isArray, inArray, isUnd} from 'Common/Utils';
import * as Settings from 'Storage/Settings';

import AppStore from 'Stores/Admin/App';
import CapaStore from 'Stores/Admin/Capa';
import DomainStore from 'Stores/Admin/Domain';
import PluginStore from 'Stores/Admin/Plugin';
import LicenseStore from 'Stores/Admin/License';
Expand Down Expand Up @@ -217,8 +218,8 @@ class AdminApp extends AbstractApp

super.bootstart();

require('Stores/Admin/App').populate();
require('Stores/Admin/Capa').populate();
AppStore.populate();
CapaStore.populate();

hideLoading();

Expand Down
14 changes: 8 additions & 6 deletions dev/App/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,16 @@ import * as Events from 'Common/Events';
import {getNotification, i18n} from 'Common/Translator';

import SocialStore from 'Stores/Social';
import AppStore from 'Stores/User/App';
import SettingsStore from 'Stores/User/Settings';
import NotificationStore from 'Stores/User/Notification';
import AccountStore from 'Stores/User/Account';
import ContactStore from 'Stores/User/Contact';
import IdentityStore from 'Stores/User/Identity';
import TemplateStore from 'Stores/User/Template';
import FolderStore from 'Stores/User/Folder';
import PgpStore from 'Stores/User/Pgp';
import MessageStore from 'Stores/User/Message';
import ContactStore from 'Stores/User/Contact';
import QuotaStore from 'Stores/User/Quota';

import * as Local from 'Storage/Client';
Expand Down Expand Up @@ -1258,11 +1260,11 @@ class AppUser extends AbstractApp

super.bootstart();

require('Stores/User/App').populate();
require('Stores/User/Settings').populate();
require('Stores/User/Notification').populate();
require('Stores/User/Account').populate();
require('Stores/User/Contact').populate();
AppStore.populate();
SettingsStore.populate();
NotificationStore.populate();
AccountStore.populate();
ContactStore.populate();

let
contactsSyncInterval = pInt(Settings.settingsGet('ContactsSyncInterval'));
Expand Down
4 changes: 3 additions & 1 deletion dev/Model/Filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {pString, inArray, isNonEmptyArray, fakeMd5, delegateRunOnDestroy, window
import {i18n} from 'Common/Translator';
import {getFolderFromCacheList} from 'Common/Cache';

import AccountStore from 'Stores/User/Account';

import {FilterConditionModel} from 'Model/FilterCondition';
import {AbstractModel} from 'Knoin/AbstractModel';

Expand Down Expand Up @@ -214,7 +216,7 @@ class FilterModel extends AbstractModel
}

setRecipients() {
this.actionValueFourth(require('Stores/User/Account').accountsEmails().join(', '));
this.actionValueFourth(AccountStore.accountsEmails().join(', '));
}

parse(json) {
Expand Down
9 changes: 6 additions & 3 deletions dev/Model/Message.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import {
import {$win} from 'Common/Globals';
import {messageViewLink, messageDownloadLink} from 'Common/Links';

import FolderStore from 'Stores/User/Folder';
import PgpStore from 'Stores/User/Pgp';

import {emailArrayFromJson, emailArrayToStringClear, emailArrayToString, replyHelper} from 'Helper/Message';

import {AttachmentModel, staticCombinedIconClass} from 'Model/Attachment';
Expand Down Expand Up @@ -211,8 +214,8 @@ class MessageModel extends AbstractModel

computeSenderEmail() {
const
sentFolder = require('Stores/User/Folder').sentFolder(),
draftFolder = require('Stores/User/Folder').draftFolder();
sentFolder = FolderStore.sentFolder(),
draftFolder = FolderStore.draftFolder();

this.senderEmailsString(this.folderFullNameRaw === sentFolder || this.folderFullNameRaw === draftFolder ?
this.toEmailsString() : this.fromEmailString());
Expand Down Expand Up @@ -307,7 +310,7 @@ class MessageModel extends AbstractModel

this.proxy = !!json.ExternalProxy;

if (require('Stores/User/Pgp').capaOpenPGP())
if (PgpStore.capaOpenPGP())
{
this.isPgpSigned(!!json.PgpSigned);
this.isPgpEncrypted(!!json.PgpEncrypted);
Expand Down
2 changes: 1 addition & 1 deletion dev/Promises/User/Ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ class UserAjaxUserPromises extends AbstractAjaxPromises
}
}

module.exports = new UserAjaxUserPromises();
export default new UserAjaxUserPromises();
6 changes: 4 additions & 2 deletions dev/Promises/User/Populator.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import * as Local from 'Storage/Client';
import AppStore from 'Stores/User/App';
import FolderStore from 'Stores/User/Folder';

import Remote from 'Remote/User/Ajax';

import {FolderModel} from 'Model/Folder';
import {AbstractBasicPromises} from 'Promises/AbstractBasic';

Expand Down Expand Up @@ -165,7 +167,7 @@ class PromisesUserPopulator extends AbstractBasicPromises

if (update)
{
require('Remote/User/Ajax').saveSystemFolders(noop, {
Remote.saveSystemFolders(noop, {
SentFolder: FolderStore.sentFolder(),
DraftFolder: FolderStore.draftFolder(),
SpamFolder: FolderStore.spamFolder(),
Expand All @@ -180,4 +182,4 @@ class PromisesUserPopulator extends AbstractBasicPromises
}
}

module.exports = new PromisesUserPopulator();
export default new PromisesUserPopulator();
2 changes: 1 addition & 1 deletion dev/Remote/Admin/Ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,4 +279,4 @@ class RemoteAdminAjax extends AbstractAjaxRemote
}
}

module.exports = new RemoteAdminAjax();
export default new RemoteAdminAjax();
2 changes: 1 addition & 1 deletion dev/Remote/User/Ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -854,4 +854,4 @@ class RemoteUserAjax extends AbstractAjaxRemote
}
}

module.exports = new RemoteUserAjax();
export default new RemoteUserAjax();
3 changes: 2 additions & 1 deletion dev/Settings/Admin/General.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import {phpInfo} from 'Common/Links';
import {settingsGet} from 'Storage/Settings';
import {showScreenPopup} from 'Knoin/Knoin';

import Remote from 'Remote/Admin/Ajax';

import ThemeStore from 'Stores/Theme';
import LanguageStore from 'Stores/Language';
import AppAdminStore from 'Stores/Admin/App';
Expand Down Expand Up @@ -63,7 +65,6 @@ class GeneralAdminSettings
onBuild() {
_.delay(() => {
const
Remote = require('Remote/Admin/Ajax'),
f1 = settingsSaveHelperSimpleFunction(this.attachmentLimitTrigger, this),
f2 = settingsSaveHelperSimpleFunction(this.languageTrigger, this),
f3 = settingsSaveHelperSimpleFunction(this.themeTrigger, this),
Expand Down
6 changes: 3 additions & 3 deletions dev/Settings/Admin/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {settingsGet} from 'Storage/Settings';

import AppStore from 'Stores/Admin/App';

import Remote from 'Remote/Admin/Ajax';

class LoginAdminSettings
{
constructor() {
Expand All @@ -21,9 +23,7 @@ class LoginAdminSettings

onBuild() {
_.delay(() => {
const
Remote = require('Remote/Admin/Ajax'),
f1 = settingsSaveHelperSimpleFunction(this.defaultDomain.trigger, this);
const f1 = settingsSaveHelperSimpleFunction(this.defaultDomain.trigger, this);

this.determineUserLanguage.subscribe((value) => {
Remote.saveAdminConfig(null, {
Expand Down
3 changes: 2 additions & 1 deletion dev/Settings/Admin/Social.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {settingsSaveHelperSimpleFunction, trim, boolToAjax} from 'Common/Utils';

import SocialStore from 'Stores/Social';

import Remote from 'Remote/Admin/Ajax';

class SocialAdminSettings
{
constructor() {
Expand Down Expand Up @@ -51,7 +53,6 @@ class SocialAdminSettings
onBuild() {
_.delay(() => {
const
Remote = require('Remote/Admin/Ajax'),
f1 = settingsSaveHelperSimpleFunction(this.facebookTrigger1, this),
f2 = settingsSaveHelperSimpleFunction(this.facebookTrigger2, this),
f3 = settingsSaveHelperSimpleFunction(this.twitterTrigger1, this),
Expand Down
2 changes: 1 addition & 1 deletion dev/Stores/Admin/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ class AppAdminStore extends AbstractAppStore
}
}

module.exports = new AppAdminStore();
export default new AppAdminStore();
2 changes: 1 addition & 1 deletion dev/Stores/Admin/Capa.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ class CapaAdminStore
}
}

module.exports = new CapaAdminStore();
export default new CapaAdminStore();
2 changes: 1 addition & 1 deletion dev/Stores/Admin/Core.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ class CoreAdminStore
}
}

module.exports = new CoreAdminStore();
export default new CoreAdminStore();
2 changes: 1 addition & 1 deletion dev/Stores/Admin/Domain.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ class DomainAdminStore
}
}

module.exports = new DomainAdminStore();
export default new DomainAdminStore();
2 changes: 1 addition & 1 deletion dev/Stores/Admin/License.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ class LicenseAdminStore
}
}

module.exports = new LicenseAdminStore();
export default new LicenseAdminStore();
2 changes: 1 addition & 1 deletion dev/Stores/Admin/Package.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ class PackageAdminStore
}
}

module.exports = new PackageAdminStore();
export default new PackageAdminStore();
2 changes: 1 addition & 1 deletion dev/Stores/Admin/Plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ class PluginAdminStore
}
}

module.exports = new PluginAdminStore();
export default new PluginAdminStore();
2 changes: 1 addition & 1 deletion dev/Stores/Language.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ class LanguageStore
}
}

module.exports = new LanguageStore();
export default new LanguageStore();
2 changes: 1 addition & 1 deletion dev/Stores/Social.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ class SocialStore
}
}

module.exports = new SocialStore();
export default new SocialStore();
2 changes: 1 addition & 1 deletion dev/Stores/Theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ class ThemeStore
}
}

module.exports = new ThemeStore();
export default new ThemeStore();
2 changes: 1 addition & 1 deletion dev/Stores/User/Account.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ class AccountUserStore
}
}

module.exports = new AccountUserStore();
export default new AccountUserStore();
2 changes: 1 addition & 1 deletion dev/Stores/User/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ class AppUserStore extends AbstractAppStore
}
}

module.exports = new AppUserStore();
export default new AppUserStore();
2 changes: 1 addition & 1 deletion dev/Stores/User/Contact.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ class ContactUserStore
}
}

module.exports = new ContactUserStore();
export default new ContactUserStore();
2 changes: 1 addition & 1 deletion dev/Stores/User/Filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ class FilterUserStore
}
}

module.exports = new FilterUserStore();
export default new FilterUserStore();
6 changes: 4 additions & 2 deletions dev/Stores/User/Folder.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {UNUSED_OPTION_VALUE} from 'Common/Consts';
import {isArray, folderListOptionsBuilder} from 'Common/Utils';
import {getFolderInboxName, getFolderFromCacheList} from 'Common/Cache';

import {momentNowUnix} from 'Common/Momentor';

class FolderUserStore
{
constructor() {
Expand Down Expand Up @@ -157,7 +159,7 @@ class FolderUserStore
const
result = [],
limit = 5,
utc = require('Common/Momentor').momentNowUnix(),
utc = momentNowUnix(),
timeout = utc - 60 * 5,
timeouts = [],
inboxFolderName = getFolderInboxName(),
Expand Down Expand Up @@ -208,4 +210,4 @@ class FolderUserStore
}
}

module.exports = new FolderUserStore();
export default new FolderUserStore();
2 changes: 1 addition & 1 deletion dev/Stores/User/Identity.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ class IdentityUserStore
}
}

module.exports = new IdentityUserStore();
export default new IdentityUserStore();
Loading

0 comments on commit e5af98b

Please sign in to comment.